Changeset 1307 in ExiteCMS for trunk/forum/viewthread.php
- Timestamp:
- 02/27/08 09:57:44 (4 years ago)
- File:
-
- 1 edited
-
trunk/forum/viewthread.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/forum/viewthread.php
r1295 r1307 194 194 // include the users own posts 195 195 $result = dbquery(" 196 SELECT count(*) as unread, tr.thread_last_read , tr.thread_page196 SELECT count(*) as unread, tr.thread_last_read 197 197 FROM ".$db_prefix."posts p 198 198 LEFT JOIN ".$db_prefix."threads_read tr ON p.thread_id = tr.thread_id … … 206 206 // filter the users own posts 207 207 $result = dbquery(" 208 SELECT count(*) as unread, tr.thread_last_read , tr.thread_page208 SELECT count(*) as unread, tr.thread_last_read 209 209 FROM ".$db_prefix."posts p 210 210 LEFT JOIN ".$db_prefix."threads_read tr ON p.thread_id = tr.thread_id … … 222 222 $variables['unread_posts'] = $data['unread']; 223 223 $thread_last_read = $data['thread_last_read']; 224 $thread_page = $data['thread_page'];225 224 } else { 226 225 $variables['unread_posts'] = 0; 227 226 $thread_last_read = time(); 228 $thread_page = 0;229 227 } 230 228 } else { 231 229 $variables['unread_posts'] = 0; 232 230 $thread_last_read = time(); 233 $thread_page = 0;234 231 } 235 232 … … 397 394 // update the threads_read record for this user and thread when the last_post_datestamp is newer 398 395 if (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."'"); 400 397 } 401 398
Note: See TracChangeset
for help on using the changeset viewer.
