Changeset 1654 in ExiteCMS for trunk/forum/viewposts.php
- Timestamp:
- 08/19/08 11:02:58 (4 years ago)
- File:
-
- 1 edited
-
trunk/forum/viewposts.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/forum/viewposts.php
r1405 r1654 31 31 if (!isset($forum_id) || !isNum($forum_id)) $forum_id = false; 32 32 33 // is a thread time limit defined for guest users? 34 $thread_limit = iMEMBER ? 0 : (time() - $settings['forum_guest_limit'] * 86400); 35 33 36 // check if we have anything to display 34 37 $result = dbquery( 35 38 "SELECT tp.*, tf.* FROM ".$db_prefix."posts tp 39 INNER JOIN ".$db_prefix."threads th USING(thread_id) 36 40 INNER JOIN ".$db_prefix."forums tf USING(forum_id) 37 WHERE ". groupaccess('forum_access').($forum_id ? " AND tp.forum_id = '$forum_id'" : "")41 WHERE ".($thread_limit==0?"":" th.thread_lastpost > ".$thread_limit." AND ").groupaccess('forum_access').($forum_id ? " AND tp.forum_id = '$forum_id'" : "") 38 42 ); 43 39 44 $rows = dbrows($result); 40 45 $variables['rows'] = $rows; … … 46 51 $result = dbquery( 47 52 "SELECT tp.*, tf.* FROM ".$db_prefix."posts tp 53 INNER JOIN ".$db_prefix."threads th USING(thread_id) 48 54 INNER JOIN ".$db_prefix."forums tf USING(forum_id) 49 WHERE ". groupaccess('forum_access').($forum_id ? " AND tp.forum_id = '$forum_id'" : "")."55 WHERE ".($thread_limit==0?"":" th.thread_lastpost > ".$thread_limit." AND ").groupaccess('forum_access').($forum_id ? " AND tp.forum_id = '$forum_id'" : "")." 50 56 ORDER BY post_datestamp DESC 51 57 LIMIT $rowstart,".ITEMS_PER_PAGE
Note: See TracChangeset
for help on using the changeset viewer.
