- acm::exists() is considered private now and was renamed to acm::_exists()

git-svn-id: file:///svn/phpbb/trunk@5425 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Nils Adermann 2006-01-05 12:10:31 +00:00
parent 636ab0f5ea
commit 7174244446
4 changed files with 23 additions and 37 deletions

View file

@ -154,7 +154,7 @@ class acm
}
}
if ($this->exists($var_name))
if ($this->_exists($var_name))
{
if (empty($this->var_ready[$var_name]))
{
@ -166,7 +166,7 @@ class acm
}
else
{
return NULL;
return false;
}
}
@ -213,7 +213,7 @@ class acm
}
}
function exists($var_name)
function _exists($var_name)
{
if (!is_array($this->vars))
{

View file

@ -114,12 +114,17 @@ class acm
{
global $phpEx;
if (!$this->_exists($var_name))
{
return false;
}
include($this->cache_dir . 'data' . $var_name . ".$phpEx");
return (isset($data)) ? $data : NULL;
return (isset($data)) ? $data : false;
}
else
{
return ($this->exists($var_name)) ? $this->vars[$var_name] : NULL;
return ($this->_exists($var_name)) ? $this->vars[$var_name] : false;
}
}
@ -184,7 +189,7 @@ class acm
}
}
function exists($var_name)
function _exists($var_name)
{
if ($var_name{0} == '_')
{

View file

@ -72,11 +72,7 @@ class cache extends acm
return false;
}
if ($this->exists('word_censors'))
{
$censors = $this->get('word_censors');
}
else
if (!($censors = $this->get('word_censors')))
{
$sql = 'SELECT word, replacement
FROM ' . WORDS_TABLE;
@ -101,11 +97,7 @@ class cache extends acm
*/
function obtain_icons(&$icons)
{
if ($this->exists('icons'))
{
$icons = $this->get('icons');
}
else
if (!($icons = $this->get('icons')))
{
global $db;
@ -136,11 +128,7 @@ class cache extends acm
*/
function obtain_ranks(&$ranks)
{
if ($this->exists('ranks'))
{
$ranks = $this->get('ranks');
}
else
if (!($ranks = $this->get('ranks')))
{
global $db;
@ -181,11 +169,7 @@ class cache extends acm
*/
function obtain_attach_extensions(&$extensions, $forum_id = false)
{
if ($this->exists('_extensions'))
{
$extensions = $this->get('_extensions');
}
else
if (!($extensions = $this->get('_extensions')))
{
global $db;
@ -265,11 +249,7 @@ class cache extends acm
*/
function obtain_bots(&$bots)
{
if ($this->exists('bots'))
{
$bots = $this->get('bots');
}
else
if (!($bots = $this->get('bots')))
{
global $db;
@ -320,7 +300,12 @@ class cache extends acm
foreach ($parsed_items as $key => $parsed_array)
{
$parsed_array = ($this->exists('_' . $key . '_cfg')) ? $this->get('_' . $key . '_cfg') : array();
$parsed_array = $this->get('_' . $key . '_cfg');
if (!$parsed_array)
{
$parsed_array = array();
}
$reparse = false;
$filename = $phpbb_root_path . 'styles/' . $theme[$key . '_path'] . '/' . $key . '/' . $key . '.cfg';

View file

@ -666,11 +666,7 @@ function display_attachments($forum_id, $blockname, &$attachment_data, &$update_
if (!isset($attachment_tpl))
{
if ($cache->exists('attachment_tpl'))
{
$attachment_tpl = $cache->get('attachment_tpl');
}
else
if (!($attachment_tpl = $cache->get('attachment_tpl')))
{
$attachment_tpl = array();