Ignore:
Timestamp:
08/19/08 17:07:21 (4 years ago)
Author:
hverton
Message:

updated the theads list body panel to use the new forum setting to limit forum message visibility for guests

File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/common/forum_threads_list_panel/php-files/modules/forum_threads_list_panel/forum_threads_list_panel.php

    r865 r1657  
    1818require_once PATH_INCLUDES."forum_functions_include.php"; 
    1919 
     20// check if there is a thread time limit defined for guests 
     21$thread_limit = iMEMBER ? 0 : (time() - $settings['forum_guest_limit'] * 86400); 
     22 
    2023// get the list of latest threads 
    2124$result = dbquery( 
     
    2427    INNER JOIN ".$db_prefix."posts tp USING(thread_id) 
    2528    INNER JOIN ".$db_prefix."users tu ON tt.thread_lastuser=tu.user_id 
    26     WHERE ".groupaccess('forum_access')." GROUP BY thread_id ORDER BY thread_lastpost DESC LIMIT 0,".$settings['numofthreads'] 
     29    WHERE ".groupaccess('forum_access').($thread_limit==0?"":" AND tt.thread_lastpost > ".$thread_limit)." 
     30    GROUP BY tt.thread_id ORDER BY tt.thread_lastpost DESC LIMIT 0,".$settings['numofthreads'] 
    2731); 
    2832 
Note: See TracChangeset for help on using the changeset viewer.