Plugin Directory

Changeset 607212


Ignore:
Timestamp:
10/02/2012 09:43:50 PM (13 years ago)
Author:
codebycarter
Message:

Fixes bug where you cannot view your own messages if pagination has not started

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wp-bulletin-board/tags/1.0.2/php/wpbb-all-messages.php

    r607181 r607212  
    1515    </p>
    1616</a>
     17
    1718   
    1819<?php
    19 
    2020if ($user_id != 0) {
    2121    $options = get_option('wpbb_options');
     
    4040    if (($total_msgs > 0) && ($total_msgs > $topics_per_page)) {
    4141        wpbb_pagination(NULL, $current_page, $start, $limit, $total_msgs, $topics_per_page, true, 'messages');
    42         $msgs = $wpdb->get_results("SELECT * FROM ".MESSAGES_TABLE." WHERE `to` = $user_id ORDER BY sent DESC LIMIT $start, $limit;");
    4342    }
     43    $msgs = $wpdb->get_results("SELECT * FROM ".MESSAGES_TABLE." WHERE `to` = $user_id ORDER BY sent DESC LIMIT $start, $limit;");
    4444    if ($msgs) {
    4545        wpbb_goback1('all-messages', NULL);
Note: See TracChangeset for help on using the changeset viewer.