From f66ce71a8f34310511b9219d6f5800ccbf0c2e8c Mon Sep 17 00:00:00 2001 From: e107steved Date: Mon, 21 Jul 2008 21:07:07 +0000 Subject: [PATCH] Bugtracker #4460 - return forum threads according to current user class access - thanks marj --- e107_plugins/forum/e_rss.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/e107_plugins/forum/e_rss.php b/e107_plugins/forum/e_rss.php index 4ca1f0737..24895e110 100644 --- a/e107_plugins/forum/e_rss.php +++ b/e107_plugins/forum/e_rss.php @@ -109,7 +109,7 @@ switch($this->parm){ "SELECT t.thread_thread, t.thread_id, t.thread_name, t.thread_datestamp, t.thread_parent, t.thread_user, t.thread_views, t.thread_lastpost, t.thread_lastuser, t.thread_total_replies, u.user_name, u.user_email FROM #forum_t AS t LEFT JOIN #user AS u ON SUBSTRING_INDEX(t.thread_user,'.',1) = u.user_id LEFT JOIN #forum AS f ON f.forum_id = t.thread_forum_id - WHERE f.forum_class IN (0, 251, 252) AND t.thread_parent=0 + WHERE f.forum_class IN (".USERCLASS_LIST.") AND t.thread_parent=0 ORDER BY t.thread_datestamp DESC LIMIT 0,".$this -> limit; $sqlrss->db_Select_gen($this -> rssQuery); $tmp = $sqlrss->db_getList(); @@ -141,7 +141,7 @@ switch($this->parm){ LEFT JOIN #user AS u ON SUBSTRING_INDEX(t.thread_user,'.',1) = u.user_id LEFT JOIN #forum_t AS tp ON t.thread_parent = tp.thread_id LEFT JOIN #forum AS f ON f.forum_id = t.thread_forum_id - WHERE f.forum_class IN (0, 251, 252) + WHERE f.forum_class IN (".USERCLASS_LIST.") ORDER BY t.thread_datestamp DESC LIMIT 0,".$this -> limit; $sqlrss->db_Select_gen($this -> rssQuery); $tmp = $sqlrss->db_getList(); @@ -183,7 +183,7 @@ switch($this->parm){ FROM #forum_t AS t LEFT JOIN #user AS u ON SUBSTRING_INDEX(t.thread_user,'.',1) = u.user_id LEFT JOIN #forum AS f ON f.forum_id = t.thread_forum_id - WHERE f.forum_class IN (0, 251, 255) AND t.thread_id=".intval($this -> topicid); + WHERE f.forum_class IN (".USERCLASS_LIST.") AND t.thread_id=".intval($this -> topicid); $sqlrss->db_Select_gen($this -> rssQuery); $topic = $sqlrss->db_Fetch(); @@ -192,7 +192,7 @@ switch($this->parm){ FROM #forum_t AS t LEFT JOIN #user AS u ON SUBSTRING_INDEX(t.thread_user,'.',1) = u.user_id LEFT JOIN #forum AS f ON f.forum_id = t.thread_forum_id - WHERE f.forum_class IN (0, 251, 255) AND t.thread_parent=".intval($this -> topicid); + WHERE f.forum_class IN (".USERCLASS_LIST.") AND t.thread_parent=".intval($this -> topicid); $sqlrss->db_Select_gen($this -> rssQuery); $replies = $sqlrss->db_getList();