aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorPaul S. Owen <psotfx@users.sourceforge.net>2001-06-18 23:18:40 +0000
committerPaul S. Owen <psotfx@users.sourceforge.net>2001-06-18 23:18:40 +0000
commitbaedfce292499e7ec10a3ccacc4719aa50f3d34f (patch)
tree04c1b9e2cc6038564aaf9015ab30d454fc424c21 /phpBB
parent499570030a88ac10a9b0601867e3ccc5d700f7cc (diff)
downloadforums-baedfce292499e7ec10a3ccacc4719aa50f3d34f.tar
forums-baedfce292499e7ec10a3ccacc4719aa50f3d34f.tar.gz
forums-baedfce292499e7ec10a3ccacc4719aa50f3d34f.tar.bz2
forums-baedfce292499e7ec10a3ccacc4719aa50f3d34f.tar.xz
forums-baedfce292499e7ec10a3ccacc4719aa50f3d34f.zip
Fixes for more messups on my part
git-svn-id: file:///svn/phpbb/trunk@512 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/includes/auth.php2
-rw-r--r--phpBB/index.php14
-rw-r--r--phpBB/viewforum.php2
3 files changed, 8 insertions, 10 deletions
diff --git a/phpBB/includes/auth.php b/phpBB/includes/auth.php
index 8ab3c593bf..692bfdc6f7 100644
--- a/phpBB/includes/auth.php
+++ b/phpBB/includes/auth.php
@@ -164,7 +164,7 @@ function auth($type, $forum_id, $userdata, $f_access = -1)
if($userdata['session_logged_in'])
{
- $forum_match_sql = ($forum_id != AUTH_LIST_ALL) ? "AND ( au.forum_id = $forum_id OR au.forum_id = 0 )" : "";
+ $forum_match_sql = ($forum_id != AUTH_LIST_ALL) ? "AND au.forum_id = $forum_id" : "";
$sql = "SELECT au.forum_id, $a_sql, au.auth_mod, g.group_single_user
FROM ".AUTH_ACCESS_TABLE." au, " . USER_GROUP_TABLE. " ug, " . GROUPS_TABLE. " g
WHERE ug.user_id = ".$userdata['user_id']. "
diff --git a/phpBB/index.php b/phpBB/index.php
index c2049e9c34..9c4227e044 100644
--- a/phpBB/index.php
+++ b/phpBB/index.php
@@ -139,18 +139,17 @@ if($total_categories)
case 'postgresql':
$limit_forums = ($viewcat != -1) ? "AND 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, p.post_username
- FROM ".FORUMS_TABLE." f, ".TOPICS_TABLE." t, ".POSTS_TABLE." p, ".USERS_TABLE." u, ".AUTH_FORUMS_TABLE." af
+ FROM " . FORUMS_TABLE . " f, " . TOPICS_TABLE . " t, " . POSTS_TABLE . " p, " . USERS_TABLE . " u
WHERE f.forum_last_post_id = p.post_id
AND p.post_id = t.topic_last_post_id
AND p.poster_id = u.user_id
- AND af.forum_id = f.forum_id
$limit_forums
UNION (
SELECT f.*, NULL, NULL, NULL, NULL, NULL, NULL, NULL
- FROM ".FORUMS_TABLE." f
+ FROM " . FORUMS_TABLE . " f
WHERE NOT EXISTS (
SELECT p.post_time
- FROM ".POSTS_TABLE." p
+ FROM " . POSTS_TABLE . " p
WHERE f.forum_last_post_id = p.post_id
)
$limit_forums
@@ -161,11 +160,10 @@ if($total_categories)
case 'oracle':
$limit_forums = ($viewcat != -1) ? "AND 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, p.post_username
- FROM ".FORUMS_TABLE." f, ".POSTS_TABLE." p, ".TOPICS_TABLE." t, ".USERS_TABLE." u, ".AUTH_FORUMS_TABLE." af
+ FROM " . FORUMS_TABLE . " f, " . POSTS_TABLE . " p, " . TOPICS_TABLE . " t, " . USERS_TABLE . " u
WHERE f.forum_last_post_id = p.post_id(+)
AND p.post_id = t.topic_last_post_id(+)
AND p.poster_id = u.user_id(+)
- AND af.forum_id = f.forum_id(+)
$limit_forums
ORDER BY f.cat_id, f.forum_order";
break;
@@ -205,8 +203,8 @@ 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 OR aa.forum_id = 0 )
- AND aa.auth_mod = 1
+ WHERE aa.forum_id = f.forum_id
+ AND aa.auth_mod = " . TRUE . "
AND ug.group_id = aa.group_id
AND u.user_id = ug.user_id
ORDER BY f.forum_id, u.user_id";
diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php
index 7f92827a42..7605dab9a2 100644
--- a/phpBB/viewforum.php
+++ b/phpBB/viewforum.php
@@ -60,7 +60,7 @@ if(isset($forum_id))
FROM ".FORUMS_TABLE." f, ".USERS_TABLE." u, ".USER_GROUP_TABLE." ug, ".AUTH_ACCESS_TABLE." aa
WHERE f.forum_id = $forum_id
AND aa.auth_mod = 1
- AND ( aa.forum_id = f.forum_id OR aa.forum_id = 0 )
+ AND aa.forum_id = f.forum_id
AND ug.group_id = aa.group_id
AND u.user_id = ug.user_id";
}