Changeset 1654 in ExiteCMS for trunk/forum/viewthread.php
- Timestamp:
- 08/19/08 11:02:58 (4 years ago)
- File:
-
- 1 edited
-
trunk/forum/viewthread.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/forum/viewthread.php
r1598 r1654 118 118 $variables['user_can_blacklist'] = checkrights("B"); 119 119 120 // check if there is a thread time limit defined for guests 121 $thread_limit = iMEMBER ? 0 : (time() - $settings['forum_guest_limit'] * 86400); 122 120 123 // get information about the current thread 121 124 $result = dbquery( 122 125 "SELECT * FROM ".$db_prefix."threads 123 WHERE thread_id='".$thread_id."' AND forum_id='".$fdata['forum_id']."'" 126 WHERE thread_id='".$thread_id."' AND forum_id='".$fdata['forum_id']."'".($thread_limit==0?"":" AND thread_lastpost > ".$thread_limit) 124 127 ); 125 // bail out if the requested forumdoes not exist128 // bail out if the requested thread does not exist 126 129 if (!dbrows($result)) { 127 fallback("index.php"); 128 } 130 fallback("viewforum.php?forum_id=".$forum_id); 131 } 132 129 133 // store the thread information 130 134 $tdata = dbarray($result); … … 342 346 } else { 343 347 // check if the post timestamp within the set unread threshold 344 if ($data['post_datestamp'] > $settings['unread_threshold'] || $data['post_editt time'] > $settings['unread_threshold']) {348 if ($data['post_datestamp'] > $settings['unread_threshold'] || $data['post_edittime'] > $settings['unread_threshold']) { 345 349 // check if it is newer that the first and last marker in the threads_read record 346 350 if ($data['post_datestamp'] > $thread_last_read || $data['post_edittime'] > $thread_last_read || $data['post_datestamp'] < $thread_first_read || ($data['post_edittime'] != 0 && $data['post_edittime'] < $thread_first_read)) { … … 349 353 $data['unread'] = false; 350 354 } 355 } else { 356 $data['unread'] = false; 351 357 } 352 358 }
Note: See TracChangeset
for help on using the changeset viewer.
