mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-26 20:08:55 +00:00
- 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:
parent
636ab0f5ea
commit
7174244446
4 changed files with 23 additions and 37 deletions
|
@ -154,7 +154,7 @@ class acm
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->exists($var_name))
|
if ($this->_exists($var_name))
|
||||||
{
|
{
|
||||||
if (empty($this->var_ready[$var_name]))
|
if (empty($this->var_ready[$var_name]))
|
||||||
{
|
{
|
||||||
|
@ -166,7 +166,7 @@ class acm
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return NULL;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -213,7 +213,7 @@ class acm
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function exists($var_name)
|
function _exists($var_name)
|
||||||
{
|
{
|
||||||
if (!is_array($this->vars))
|
if (!is_array($this->vars))
|
||||||
{
|
{
|
||||||
|
|
|
@ -114,12 +114,17 @@ class acm
|
||||||
{
|
{
|
||||||
global $phpEx;
|
global $phpEx;
|
||||||
|
|
||||||
|
if (!$this->_exists($var_name))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
include($this->cache_dir . 'data' . $var_name . ".$phpEx");
|
include($this->cache_dir . 'data' . $var_name . ".$phpEx");
|
||||||
return (isset($data)) ? $data : NULL;
|
return (isset($data)) ? $data : false;
|
||||||
}
|
}
|
||||||
else
|
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} == '_')
|
if ($var_name{0} == '_')
|
||||||
{
|
{
|
||||||
|
|
|
@ -72,11 +72,7 @@ class cache extends acm
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->exists('word_censors'))
|
if (!($censors = $this->get('word_censors')))
|
||||||
{
|
|
||||||
$censors = $this->get('word_censors');
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
$sql = 'SELECT word, replacement
|
$sql = 'SELECT word, replacement
|
||||||
FROM ' . WORDS_TABLE;
|
FROM ' . WORDS_TABLE;
|
||||||
|
@ -101,11 +97,7 @@ class cache extends acm
|
||||||
*/
|
*/
|
||||||
function obtain_icons(&$icons)
|
function obtain_icons(&$icons)
|
||||||
{
|
{
|
||||||
if ($this->exists('icons'))
|
if (!($icons = $this->get('icons')))
|
||||||
{
|
|
||||||
$icons = $this->get('icons');
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
global $db;
|
global $db;
|
||||||
|
|
||||||
|
@ -136,11 +128,7 @@ class cache extends acm
|
||||||
*/
|
*/
|
||||||
function obtain_ranks(&$ranks)
|
function obtain_ranks(&$ranks)
|
||||||
{
|
{
|
||||||
if ($this->exists('ranks'))
|
if (!($ranks = $this->get('ranks')))
|
||||||
{
|
|
||||||
$ranks = $this->get('ranks');
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
global $db;
|
global $db;
|
||||||
|
|
||||||
|
@ -181,11 +169,7 @@ class cache extends acm
|
||||||
*/
|
*/
|
||||||
function obtain_attach_extensions(&$extensions, $forum_id = false)
|
function obtain_attach_extensions(&$extensions, $forum_id = false)
|
||||||
{
|
{
|
||||||
if ($this->exists('_extensions'))
|
if (!($extensions = $this->get('_extensions')))
|
||||||
{
|
|
||||||
$extensions = $this->get('_extensions');
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
global $db;
|
global $db;
|
||||||
|
|
||||||
|
@ -265,11 +249,7 @@ class cache extends acm
|
||||||
*/
|
*/
|
||||||
function obtain_bots(&$bots)
|
function obtain_bots(&$bots)
|
||||||
{
|
{
|
||||||
if ($this->exists('bots'))
|
if (!($bots = $this->get('bots')))
|
||||||
{
|
|
||||||
$bots = $this->get('bots');
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
global $db;
|
global $db;
|
||||||
|
|
||||||
|
@ -320,7 +300,12 @@ class cache extends acm
|
||||||
|
|
||||||
foreach ($parsed_items as $key => $parsed_array)
|
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;
|
$reparse = false;
|
||||||
$filename = $phpbb_root_path . 'styles/' . $theme[$key . '_path'] . '/' . $key . '/' . $key . '.cfg';
|
$filename = $phpbb_root_path . 'styles/' . $theme[$key . '_path'] . '/' . $key . '/' . $key . '.cfg';
|
||||||
|
|
|
@ -666,11 +666,7 @@ function display_attachments($forum_id, $blockname, &$attachment_data, &$update_
|
||||||
|
|
||||||
if (!isset($attachment_tpl))
|
if (!isset($attachment_tpl))
|
||||||
{
|
{
|
||||||
if ($cache->exists('attachment_tpl'))
|
if (!($attachment_tpl = $cache->get('attachment_tpl')))
|
||||||
{
|
|
||||||
$attachment_tpl = $cache->get('attachment_tpl');
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
$attachment_tpl = array();
|
$attachment_tpl = array();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue