Changeset 1307 in ExiteCMS for trunk/forum/viewthread.php


Ignore:
Timestamp:
02/27/08 09:57:44 (4 years ago)
Author:
root
Message:

removed the thread_page field from the threads_read table

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/forum/viewthread.php

    r1295 r1307  
    194194        // include the users own posts 
    195195        $result = dbquery(" 
    196             SELECT count(*) as unread, tr.thread_last_read, tr.thread_page 
     196            SELECT count(*) as unread, tr.thread_last_read 
    197197                FROM ".$db_prefix."posts p 
    198198                LEFT JOIN ".$db_prefix."threads_read tr ON p.thread_id = tr.thread_id 
     
    206206        // filter the users own posts 
    207207        $result = dbquery(" 
    208             SELECT count(*) as unread, tr.thread_last_read, tr.thread_page 
     208            SELECT count(*) as unread, tr.thread_last_read 
    209209                FROM ".$db_prefix."posts p 
    210210                LEFT JOIN ".$db_prefix."threads_read tr ON p.thread_id = tr.thread_id 
     
    222222        $variables['unread_posts'] = $data['unread']; 
    223223        $thread_last_read = $data['thread_last_read']; 
    224         $thread_page = $data['thread_page']; 
    225224    } else { 
    226225        $variables['unread_posts'] = 0; 
    227226        $thread_last_read = time(); 
    228         $thread_page = 0; 
    229227    } 
    230228} else { 
    231229    $variables['unread_posts'] = 0; 
    232230    $thread_last_read = time(); 
    233     $thread_page = 0; 
    234231} 
    235232 
     
    397394// update the threads_read record for this user and thread when the last_post_datestamp is newer 
    398395if (iMEMBER && $last_post_datestamp) { 
    399     $result = dbquery("UPDATE ".$db_prefix."threads_read SET thread_last_read = '".$last_post_datestamp."', thread_page = '".min($rowstart, $thread_page)."' WHERE user_id = '".$userdata['user_id']."' AND thread_id = '".$thread_id."' AND thread_last_read < '".$last_post_datestamp."'"); 
     396    $result = dbquery("UPDATE ".$db_prefix."threads_read SET thread_last_read = '".$last_post_datestamp."' WHERE user_id = '".$userdata['user_id']."' AND thread_id = '".$thread_id."' AND thread_last_read < '".$last_post_datestamp."'"); 
    400397} 
    401398 
Note: See TracChangeset for help on using the changeset viewer.