From 2ec0206283d9a7112657829ddc8e9faa3011b35a Mon Sep 17 00:00:00 2001 From: "Paul S. Owen" Date: Sun, 17 Jun 2001 23:53:04 +0000 Subject: Switched forum_auth to the forums table git-svn-id: file:///svn/phpbb/trunk@506 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/index.php | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'phpBB/index.php') diff --git a/phpBB/index.php b/phpBB/index.php index 9f88c7febd..c2049e9c34 100644 --- a/phpBB/index.php +++ b/phpBB/index.php @@ -173,7 +173,7 @@ if($total_categories) default: // This works on: MySQL, MSSQL and ODBC (Access) $limit_forums = ($viewcat != -1) ? "WHERE f.cat_id = $viewcat " : ""; -/* + $sql = "SELECT f.*, t.topic_id, t.topic_replies, t.topic_last_post_id, u.username, u.user_id, p.post_time FROM ((( ".FORUMS_TABLE." f LEFT JOIN ".POSTS_TABLE." p ON f.forum_last_post_id = p.post_id ) @@ -181,15 +181,6 @@ if($total_categories) LEFT JOIN ".USERS_TABLE." u ON p.poster_id = u.user_id ) $limit_forums ORDER BY f.cat_id, f.forum_order"; -*/ - $sql = "SELECT f.*, t.topic_id, t.topic_replies, t.topic_last_post_id, u.username, u.user_id, p.post_time, p.post_username, af.auth_view, af.auth_read, af.auth_post, af.auth_reply, af.auth_edit, af.auth_delete, af.auth_votecreate, af.auth_vote - FROM ((( ".FORUMS_TABLE." f - LEFT JOIN ".POSTS_TABLE." p ON f.forum_last_post_id = p.post_id ) - LEFT JOIN ".TOPICS_TABLE." t ON p.post_id = t.topic_last_post_id ) - LEFT JOIN ".USERS_TABLE." u ON p.poster_id = u.user_id ) - LEFT JOIN ".AUTH_FORUMS_TABLE." af ON af.forum_id = f.forum_id - $limit_forums - ORDER BY f.cat_id, f.forum_order"; break; } @@ -214,7 +205,7 @@ if($total_categories) // $sql = "SELECT f.forum_id, u.username, u.user_id FROM ".FORUMS_TABLE." f, ".USERS_TABLE." u, ".USER_GROUP_TABLE." ug, ".AUTH_ACCESS_TABLE." aa - WHERE aa.forum_id = f.forum_id + WHERE ( aa.forum_id = f.forum_id OR aa.forum_id = 0 ) AND aa.auth_mod = 1 AND ug.group_id = aa.group_id AND u.user_id = ug.user_id -- cgit v1.2.1