diff options
Diffstat (limited to 'phpBB/includes/cache.php')
-rw-r--r-- | phpBB/includes/cache.php | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/phpBB/includes/cache.php b/phpBB/includes/cache.php index 01dcf5b722..6266d32c0f 100644 --- a/phpBB/includes/cache.php +++ b/phpBB/includes/cache.php @@ -70,13 +70,13 @@ class cache extends acm * Obtain list of naughty words and build preg style replacement arrays for use by the * calling script */ - function obtain_word_list(&$censors) + function obtain_word_list() { global $config, $user, $db; if (!$user->optionget('viewcensors') && $config['allow_nocensors']) { - return false; + return array(); } if (($censors = $this->get('word_censors')) === false) @@ -96,13 +96,13 @@ class cache extends acm $this->put('word_censors', $censors); } - return true; + return $censors; } /** * Obtain currently listed icons */ - function obtain_icons(&$icons) + function obtain_icons() { if (($icons = $this->get('icons')) === false) { @@ -127,13 +127,13 @@ class cache extends acm $this->put('icons', $icons); } - return; + return $icons; } /** * Obtain ranks */ - function obtain_ranks(&$ranks) + function obtain_ranks() { if (($ranks = $this->get('ranks')) === false) { @@ -168,13 +168,13 @@ class cache extends acm $this->put('ranks', $ranks); } - return; + return $ranks; } /** * Obtain allowed extensions */ - function obtain_attach_extensions(&$extensions, $forum_id = false) + function obtain_attach_extensions($forum_id = false) { if (($extensions = $this->get('_extensions')) === false) { @@ -254,13 +254,13 @@ class cache extends acm $extensions['_allowed_'] = array(); } - return; + return $extensions; } /** * Obtain active bots */ - function obtain_bots(&$bots) + function obtain_bots() { if (($bots = $this->get('bots')) === false) { @@ -303,7 +303,7 @@ class cache extends acm $this->put('bots', $bots); } - return; + return $bots; } /** @@ -355,9 +355,12 @@ class cache extends acm return $parsed_items; } - function obtain_disallowed_usernames(&$usernames) + /** + * Obtain disallowed usernames + */ + function obtain_disallowed_usernames() { - if (($usernames = $this->get('disallowed_usernames')) === false) + if (($usernames = $this->get('_disallowed_usernames')) === false) { global $db; @@ -372,10 +375,10 @@ class cache extends acm } $db->sql_freeresult($result); - $this->put('disallowed_usernames', $usernames); + $this->put('_disallowed_usernames', $usernames); } - return true; + return $usernames; } } |