diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2007-07-03 15:36:18 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2007-07-03 15:36:18 +0000 |
commit | b883ff119f4e42fbc967a6b1971af2198762fbd8 (patch) | |
tree | 95341356c3efea7cad58309f28c224c45296f1f5 /phpBB/includes/acm | |
parent | 3d9b5e52d9a14495f42d676428b6d00aff756923 (diff) | |
download | forums-b883ff119f4e42fbc967a6b1971af2198762fbd8.tar forums-b883ff119f4e42fbc967a6b1971af2198762fbd8.tar.gz forums-b883ff119f4e42fbc967a6b1971af2198762fbd8.tar.bz2 forums-b883ff119f4e42fbc967a6b1971af2198762fbd8.tar.xz forums-b883ff119f4e42fbc967a6b1971af2198762fbd8.zip |
let's see if i can break something. :o
git-svn-id: file:///svn/phpbb/trunk@7830 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/acm')
-rw-r--r-- | phpBB/includes/acm/acm_file.php | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/phpBB/includes/acm/acm_file.php b/phpBB/includes/acm/acm_file.php index faa6403a2e..63eaa341f5 100644 --- a/phpBB/includes/acm/acm_file.php +++ b/phpBB/includes/acm/acm_file.php @@ -121,7 +121,7 @@ class acm @include($this->cache_dir . $entry); if ($expired) { - @unlink($this->cache_dir . $entry); + $this->remove_file($this->cache_dir . $entry); } } closedir($dir); @@ -215,7 +215,7 @@ class acm continue; } - @unlink($this->cache_dir . $entry); + $this->remove_file($this->cache_dir . $entry); } closedir($dir); @@ -273,7 +273,7 @@ class acm if ($found) { - @unlink($this->cache_dir . $entry); + $this->remove_file($this->cache_dir . $entry); } } closedir($dir); @@ -288,7 +288,7 @@ class acm if ($var_name[0] == '_') { - @unlink($this->cache_dir . 'data' . $var_name . ".$phpEx"); + $this->remove_file($this->cache_dir . 'data' . $var_name . ".$phpEx"); } else if (isset($this->vars[$var_name])) { @@ -351,7 +351,7 @@ class acm } else if ($expired) { - @unlink($this->cache_dir . 'sql_' . md5($query) . ".$phpEx"); + $this->remove_file($this->cache_dir . 'sql_' . md5($query) . ".$phpEx"); return false; } @@ -461,6 +461,18 @@ class acm return true; } + + /** + * Removes/unlinks file + */ + function remove_file($filename) + { + if (!@unlink($filename)) + { + // E_USER_ERROR - not using language entry - intended. + trigger_error('Unable to remove files within ' . $this->cache_dir . '. Please check directory permissions.', E_USER_ERROR); + } + } } ?>
\ No newline at end of file |