Changeset 1260 in ExiteCMS


Ignore:
Timestamp:
02/11/08 09:42:47 (4 years ago)
Author:
hverton
Message:

fixed bug in updating the threads_read datestamp, should only happen if the post read is newer then the last recorded datestamp

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/forum/viewthread.php

    r1256 r1260  
    377377} 
    378378 
    379 // update the threads_read record for this user and thread 
     379// update the threads_read record for this user and thread when the last_post_datestamp is newer 
    380380if (iMEMBER && $last_post_datestamp) { 
    381     $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."'"); 
     381    $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."'"); 
    382382} 
    383383 
Note: See TracChangeset for help on using the changeset viewer.