diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2006-03-15 13:03:57 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2006-03-15 13:03:57 +0000 |
commit | d907d066f2e0d7974766370b11dab69a59962f97 (patch) | |
tree | 146a203caa445298e084088c30311b959d00c9f1 /phpBB/includes/acm/acm_file.php | |
parent | 8c3f94f9ae8a1333be8c01dd2e0be74dffc91831 (diff) | |
download | forums-d907d066f2e0d7974766370b11dab69a59962f97.tar forums-d907d066f2e0d7974766370b11dab69a59962f97.tar.gz forums-d907d066f2e0d7974766370b11dab69a59962f97.tar.bz2 forums-d907d066f2e0d7974766370b11dab69a59962f97.tar.xz forums-d907d066f2e0d7974766370b11dab69a59962f97.zip |
- adding ability to assign moderator specific ban options
- fixing destroying of sql caches
- fixing referencing of sql cached queries if more than one are active on one page
- other fixes
git-svn-id: file:///svn/phpbb/trunk@5633 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/acm/acm_file.php')
-rw-r--r-- | phpBB/includes/acm/acm_file.php | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/phpBB/includes/acm/acm_file.php b/phpBB/includes/acm/acm_file.php index 3a11f5b6d6..c5162a36d3 100644 --- a/phpBB/includes/acm/acm_file.php +++ b/phpBB/includes/acm/acm_file.php @@ -154,11 +154,6 @@ class acm { global $phpEx; - if (!$this->_exists($var_name)) - { - return; - } - if ($var_name == 'sql' && !empty($table)) { $regex = '(' . ((is_array($table)) ? implode('|', $table) : $table) . ')'; @@ -166,7 +161,7 @@ class acm $dir = opendir($this->cache_dir); while ($entry = readdir($dir)) { - if (substr($entry, 0, 4) != 'sql_') + if (strpos($entry, 'sql_') !== 0) { continue; } @@ -181,8 +176,16 @@ class acm } } @closedir($dir); + + return; } - else if ($var_name{0} == '_') + + if (!$this->_exists($var_name)) + { + return; + } + + if ($var_name{0} == '_') { @unlink($this->cache_dir . 'data' . $var_name . ".$phpEx"); } @@ -251,7 +254,7 @@ class acm // Remove extra spaces and tabs $query = preg_replace('/[\n\r\s\t]+/', ' ', $query); - $query_id = 'Cache id #' . sizeof($this->sql_rowset); + $query_id = sizeof($this->sql_rowset); if (!file_exists($this->cache_dir . 'sql_' . md5($query) . ".$phpEx")) { @@ -285,7 +288,7 @@ class acm @flock($fp, LOCK_EX); $lines = array(); - $query_id = 'Cache id #' . sizeof($this->sql_rowset); + $query_id = sizeof($this->sql_rowset); $this->sql_rowset[$query_id] = array(); while ($row = $db->sql_fetchrow($query_result)) |