aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acm
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2007-06-30 15:04:49 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2007-06-30 15:04:49 +0000
commit5634fad4ae67fd6fa9251ff4aa50cc8553e826a4 (patch)
treed498a39d667e8afa273029c2210783af0eb8fbd0 /phpBB/includes/acm
parentb1b542f69b3fd2f5fad3f2b757bc9a1593628c8d (diff)
downloadforums-5634fad4ae67fd6fa9251ff4aa50cc8553e826a4.tar
forums-5634fad4ae67fd6fa9251ff4aa50cc8553e826a4.tar.gz
forums-5634fad4ae67fd6fa9251ff4aa50cc8553e826a4.tar.bz2
forums-5634fad4ae67fd6fa9251ff4aa50cc8553e826a4.tar.xz
forums-5634fad4ae67fd6fa9251ff4aa50cc8553e826a4.zip
some fixes...
git-svn-id: file:///svn/phpbb/trunk@7813 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/acm')
-rw-r--r--phpBB/includes/acm/acm_file.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/phpBB/includes/acm/acm_file.php b/phpBB/includes/acm/acm_file.php
index f98873fdbf..faa6403a2e 100644
--- a/phpBB/includes/acm/acm_file.php
+++ b/phpBB/includes/acm/acm_file.php
@@ -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;
}
}