Changeset 1658 in ExiteCMS
- Timestamp:
- 08/19/08 17:20:13 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
modules/common/forum_threads_panel/php-files/modules/forum_threads_panel/forum_threads_panel.php
r865 r1658 21 21 $variables = array(); 22 22 23 // newest threads 23 // check if there is a thread time limit defined for guests 24 $thread_limit = iMEMBER ? 0 : (time() - $settings['forum_guest_limit'] * 86400); 24 25 25 26 $result = dbquery(" 26 27 SELECT * FROM ".$db_prefix."threads 27 28 INNER JOIN ".$db_prefix."forums ON ".$db_prefix."threads.forum_id=".$db_prefix."forums.forum_id 28 WHERE ".groupaccess('forum_access')." ORDER BY thread_lastpost DESC LIMIT ".NEWEST_THREADS); 29 WHERE ".groupaccess('forum_access').($thread_limit==0?"":" AND thread_lastpost > ".$thread_limit)." 30 ORDER BY thread_lastpost DESC LIMIT ".NEWEST_THREADS); 29 31 30 32 $variables['new_threads'] = array(); … … 40 42 INNER JOIN ".$db_prefix."threads tt USING(forum_id) 41 43 INNER JOIN ".$db_prefix."posts tp USING(thread_id) 42 WHERE ".groupaccess('forum_access')." GROUP BY thread_id ORDER BY count_posts DESC, thread_lastpost DESC LIMIT ".HOTTEST_THREADS); 44 WHERE ".groupaccess('forum_access').($thread_limit==0?"":" AND thread_lastpost > ".$thread_limit)." 45 GROUP BY thread_id 46 ORDER BY count_posts DESC, thread_lastpost DESC LIMIT ".HOTTEST_THREADS); 43 47 44 48 $variables['hot_threads'] = array();
Note: See TracChangeset
for help on using the changeset viewer.
