diff options
author | Andreas Fischer <bantu@phpbb.com> | 2011-08-25 16:58:58 +0200 |
---|---|---|
committer | Andreas Fischer <bantu@phpbb.com> | 2011-08-25 17:12:42 +0200 |
commit | 4491746c73700b45bc536c3a4cc90b84a07340f1 (patch) | |
tree | 842ea4c2df3620a104a96db2d5fb24891b3000ce /phpBB/feed.php | |
parent | 540ca1a8d88279b120b142c244c96c9fae9a867b (diff) | |
download | forums-4491746c73700b45bc536c3a4cc90b84a07340f1.tar forums-4491746c73700b45bc536c3a4cc90b84a07340f1.tar.gz forums-4491746c73700b45bc536c3a4cc90b84a07340f1.tar.bz2 forums-4491746c73700b45bc536c3a4cc90b84a07340f1.tar.xz forums-4491746c73700b45bc536c3a4cc90b84a07340f1.zip |
[ticket/10320] Move phpbb_feed_base::get_passworded_forums() to user class.
PHPBB3-10320
Diffstat (limited to 'phpBB/feed.php')
-rw-r--r-- | phpBB/feed.php | 25 |
1 files changed, 2 insertions, 23 deletions
diff --git a/phpBB/feed.php b/phpBB/feed.php index d737b8e10c..4b1836497b 100644 --- a/phpBB/feed.php +++ b/phpBB/feed.php @@ -604,30 +604,9 @@ class phpbb_feed_base function get_passworded_forums() { - global $db, $user; - - // Exclude passworded forums - $sql = 'SELECT f.forum_id, fa.user_id - FROM ' . FORUMS_TABLE . ' f - LEFT JOIN ' . FORUMS_ACCESS_TABLE . " fa - ON (fa.forum_id = f.forum_id - AND fa.session_id = '" . $db->sql_escape($user->session_id) . "') - WHERE f.forum_password <> ''"; - $result = $db->sql_query($sql); - - $forum_ids = array(); - while ($row = $db->sql_fetchrow($result)) - { - $forum_id = (int) $row['forum_id']; - - if ($row['user_id'] != $user->data['user_id']) - { - $forum_ids[$forum_id] = $forum_id; - } - } - $db->sql_freeresult($result); + global $user; - return $forum_ids; + return $user->get_passworded_forums(); } function get_item() |