1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 05:50:42 +02:00

merge revisions #r8384, #r8387, #r8388, #r8389 and #r8390

git-svn-id: file:///svn/phpbb/trunk@8391 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen
2008-02-23 14:23:34 +00:00
parent 6dc85449c1
commit 2cedbbac09
30 changed files with 442 additions and 335 deletions

View File

@@ -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);
}
}