有些會員曾反映 "查看新貼" 不應該出現有密碼保護的版區內的主題
所以特此作出以下的修改
1. search.php
查找以下一段 (大約為 236 行)
代码:
$results = $DB->query_first("SELECT count(*) as count
FROM ".TABLE_PREFIX."thread
WHERE visible=1 AND forumid IN(".$forumlist.") AND lastpost > '".$last_time."'
);
修改成為
代码:
$results = $DB->query_first("SELECT count(*) as count
FROM ".TABLE_PREFIX."thread t, ".TABLE_PREFIX."forum f
WHERE t.visible=1 AND t.forumid IN(".$forumlist.") AND t.lastpost > '".$last_time."'
AND t.forumid = f.id AND f.password = ''"
);
另外於數行後查找
代码:
$query_to_cache = "SELECT *, title as threadtitle
FROM ".TABLE_PREFIX."thread
WHERE visible=1 AND forumid IN(".$forumlist.") AND lastpost > '".$last_time."'
ORDER BY lastpost DESC";
修改成為
代码:
$query_to_cache = "SELECT t.*, t.title as threadtitle
FROM ".TABLE_PREFIX."thread t, ".TABLE_PREFIX."forum f
WHERE t.visible=1 AND t.forumid IN(".$forumlist.") AND t.lastpost > '".$last_time."'
AND t.forumid = f.id AND f.password = ''
ORDER BY t.lastpost DESC";
保存後重新整理便可~