diff options
author | Nils Adermann <naderman@naderman.de> | 2006-01-05 12:10:31 +0000 |
---|---|---|
committer | Nils Adermann <naderman@naderman.de> | 2006-01-05 12:10:31 +0000 |
commit | 717424444680049eb0e2956486bcc149fe5cd851 (patch) | |
tree | 6108ed72507e5a32b1359810fe379c88b7df9f4d /phpBB/includes/acm | |
parent | 636ab0f5ea0fb55d8cafa8aea55babae2f7c7e34 (diff) | |
download | forums-717424444680049eb0e2956486bcc149fe5cd851.tar forums-717424444680049eb0e2956486bcc149fe5cd851.tar.gz forums-717424444680049eb0e2956486bcc149fe5cd851.tar.bz2 forums-717424444680049eb0e2956486bcc149fe5cd851.tar.xz forums-717424444680049eb0e2956486bcc149fe5cd851.zip |
- 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
Diffstat (limited to 'phpBB/includes/acm')
-rw-r--r-- | phpBB/includes/acm/acm_db.php | 6 | ||||
-rw-r--r-- | phpBB/includes/acm/acm_file.php | 11 | ||||
-rw-r--r-- | phpBB/includes/acm/acm_main.php | 37 |
3 files changed, 22 insertions, 32 deletions
diff --git a/phpBB/includes/acm/acm_db.php b/phpBB/includes/acm/acm_db.php index a9b75a9a77..0204666aa4 100644 --- a/phpBB/includes/acm/acm_db.php +++ b/phpBB/includes/acm/acm_db.php @@ -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)) { diff --git a/phpBB/includes/acm/acm_file.php b/phpBB/includes/acm/acm_file.php index 8f7e79aad5..0df3c05a98 100644 --- a/phpBB/includes/acm/acm_file.php +++ b/phpBB/includes/acm/acm_file.php @@ -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} == '_') { diff --git a/phpBB/includes/acm/acm_main.php b/phpBB/includes/acm/acm_main.php index a0e6267b53..3f9e3fa60f 100644 --- a/phpBB/includes/acm/acm_main.php +++ b/phpBB/includes/acm/acm_main.php @@ -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'; |