1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-17 22:11:26 +02:00

some fixes...

git-svn-id: file:///svn/phpbb/trunk@7813 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen
2007-06-30 15:04:49 +00:00
parent b1b542f69b
commit 5634fad4ae
10 changed files with 50 additions and 10 deletions

View File

@@ -79,6 +79,8 @@ class acm
fwrite($fp, "<?php\n\$this->vars = " . var_export($this->vars, true) . ";\n\n\$this->var_expires = " . var_export($this->var_expires, true) . "\n?>");
@flock($fp, LOCK_UN);
fclose($fp);
@chmod($this->cache_dir . 'data_global.' . $phpEx, 0666);
}
else
{
@@ -181,6 +183,8 @@ class acm
fwrite($fp, "<?php\n\$expired = (time() > " . (time() + $ttl) . ") ? true : false;\nif (\$expired) { return; }\n\n\$data = " . var_export($var, true) . ";\n?>");
@flock($fp, LOCK_UN);
fclose($fp);
@chmod($this->cache_dir . "data{$var_name}.$phpEx", 0666);
}
}
else
@@ -365,8 +369,9 @@ class acm
// Remove extra spaces and tabs
$query = preg_replace('/[\n\r\s\t]+/', ' ', $query);
$filename = $this->cache_dir . 'sql_' . md5($query) . '.' . $phpEx;
if ($fp = @fopen($this->cache_dir . 'sql_' . md5($query) . '.' . $phpEx, 'wb'))
if ($fp = @fopen($filename, 'wb'))
{
@flock($fp, LOCK_EX);
@@ -387,6 +392,8 @@ class acm
@flock($fp, LOCK_UN);
fclose($fp);
@chmod($filename, 0666);
$query_result = $query_id;
}
}