mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-05 08:17:47 +02:00
consistant obtain_* functions
git-svn-id: file:///svn/phpbb/trunk@6572 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user