aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acm
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2008-02-23 14:23:34 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2008-02-23 14:23:34 +0000
commit2cedbbac0944da85a01f3a3afbac65756610f29d (patch)
treea2302e0bfabf2800b44870c8b14d3c75a12dc612 /phpBB/includes/acm
parent6dc85449c1feaed312bc25bbe624305f29e40036 (diff)
downloadforums-2cedbbac0944da85a01f3a3afbac65756610f29d.tar
forums-2cedbbac0944da85a01f3a3afbac65756610f29d.tar.gz
forums-2cedbbac0944da85a01f3a3afbac65756610f29d.tar.bz2
forums-2cedbbac0944da85a01f3a3afbac65756610f29d.tar.xz
forums-2cedbbac0944da85a01f3a3afbac65756610f29d.zip
merge revisions #r8384, #r8387, #r8388, #r8389 and #r8390
git-svn-id: file:///svn/phpbb/trunk@8391 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/acm')
-rw-r--r--phpBB/includes/acm/acm_file.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/phpBB/includes/acm/acm_file.php b/phpBB/includes/acm/acm_file.php
index f123f1383d..f952b372c6 100644
--- a/phpBB/includes/acm/acm_file.php
+++ b/phpBB/includes/acm/acm_file.php
@@ -306,7 +306,7 @@ class acm
if ($var_name[0] === '_')
{
- $this->remove_file($this->cache_dir . 'data' . $var_name . ".$phpEx");
+ $this->remove_file($this->cache_dir . 'data' . $var_name . ".$phpEx", true);
}
else if (isset($this->vars[$var_name]))
{
@@ -369,7 +369,7 @@ class acm
}
else if ($expired)
{
- $this->remove_file($this->cache_dir . 'sql_' . md5($query) . ".$phpEx");
+ $this->remove_file($this->cache_dir . 'sql_' . md5($query) . ".$phpEx", true);
return false;
}
@@ -452,13 +452,15 @@ class acm
/**
* Removes/unlinks file
*/
- private function remove_file($filename)
+ private function remove_file($filename, $check = false)
{
- if (!@unlink($filename))
+ if ($check && !@is_writeable($this->cache_dir))
{
// 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);
}
+
+ return @unlink($filename);
}
}