From ff58fc5e7c66ea43a292c48ffb58061b0d1c52a8 Mon Sep 17 00:00:00 2001 From: "Paul S. Owen" Date: Mon, 7 Jul 2003 23:43:57 +0000 Subject: Move certain methods out of ucp class, move ucp class into ucp, break half a dozen other features, introduce x hundred new, exciting bugs git-svn-id: file:///svn/phpbb/trunk@4213 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/posting.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'phpBB/posting.php') diff --git a/phpBB/posting.php b/phpBB/posting.php index 809e79f59f..065c35bd6f 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -109,7 +109,8 @@ switch ($mode) $sql = 'SELECT t.*, f.* FROM ' . TOPICS_TABLE . ' t, ' . FORUMS_TABLE . " f WHERE t.topic_id = $topic_id - AND f.forum_id IN (t.forum_id, $forum_id)"; + AND (f.forum_id = t.forum_id + OR f.forum_id = $forum_id)"; $forum_validate = $topic_validate = true; break; @@ -131,7 +132,8 @@ switch ($mode) WHERE p.post_id = $post_id AND t.topic_id = p.topic_id AND u.user_id = p.poster_id - AND f.forum_id IN (t.forum_id, $forum_id)"; + AND (f.forum_id = t.forum_id + OR f.forum_id = $forum_id)"; $forum_validate = $topic_validate = $post_validate = true; break; @@ -667,10 +669,9 @@ if ($submit || $preview || $refresh) if (($username != '' && $user->data['user_id'] == ANONYMOUS) || ($mode == 'edit' && $post_username != '')) { include($phpbb_root_path . 'includes/functions_user.' . $phpEx); - $ucp = new ucp(); $username = strip_tags(htmlspecialchars($username)); - if (($result = $ucp->validate_username($username)) != false) + if (($result = validate_username($username)) != false) { $error[] = $result; } -- cgit v1.2.1