summaryrefslogtreecommitdiffstats
path: root/system/core/Output.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2014-03-13 13:55:45 +0100
committerAndrey Andreev <narf@devilix.net>2014-03-13 13:55:45 +0100
commit7cf682abf46bcaa112b63c500a884ba25c0dd8b3 (patch)
treeec4283976055d986add2da7b0dad16c1e75dcba5 /system/core/Output.php
parentd2e3a6fbf820b819bd7b2abc4794766f4c1d4e1a (diff)
Partially revert PR #2190
The core shouldn't depend on constants that are not defined by itself
Diffstat (limited to 'system/core/Output.php')
-rw-r--r--system/core/Output.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/system/core/Output.php b/system/core/Output.php
index 7a35b02da..df9ef0778 100644
--- a/system/core/Output.php
+++ b/system/core/Output.php
@@ -555,7 +555,7 @@ class CI_Output {
$cache_path .= md5($uri);
- if ( ! $fp = @fopen($cache_path, FOPEN_WRITE_CREATE_DESTRUCTIVE))
+ if ( ! $fp = @fopen($cache_path, 'w+b'))
{
log_message('error', 'Unable to write cache file: '.$cache_path);
return;
@@ -606,7 +606,7 @@ class CI_Output {
if (is_int($result))
{
- @chmod($cache_path, FILE_WRITE_MODE);
+ @chmod($cache_path, 0666);
log_message('debug', 'Cache file written: '.$cache_path);
// Send HTTP cache-control headers to browser to match file cache settings.
@@ -639,7 +639,7 @@ class CI_Output {
$uri = $CFG->item('base_url').$CFG->item('index_page').$URI->uri_string;
$filepath = $cache_path.md5($uri);
- if ( ! file_exists($filepath) OR ! $fp = @fopen($filepath, FOPEN_READ))
+ if ( ! file_exists($filepath) OR ! $fp = @fopen($filepath, 'rb'))
{
return FALSE;
}