From 7cf682abf46bcaa112b63c500a884ba25c0dd8b3 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 13 Mar 2014 14:55:45 +0200 Subject: Partially revert PR #2190 The core shouldn't depend on constants that are not defined by itself --- system/core/Log.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'system/core/Log.php') diff --git a/system/core/Log.php b/system/core/Log.php index 707964ccc..a949c3f39 100644 --- a/system/core/Log.php +++ b/system/core/Log.php @@ -108,7 +108,7 @@ class CI_Log { $this->_file_ext = (isset($config['log_file_extension']) && $config['log_file_extension'] !== '') ? ltrim($config['log_file_extension'], '.') : 'php'; - file_exists($this->_log_path) OR mkdir($this->_log_path, DIR_WRITE_MODE, TRUE); + file_exists($this->_log_path) OR mkdir($this->_log_path, 0777, TRUE); if ( ! is_dir($this->_log_path) OR ! is_really_writable($this->_log_path)) { @@ -170,7 +170,7 @@ class CI_Log { } } - if ( ! $fp = @fopen($filepath, FOPEN_WRITE_CREATE)) + if ( ! $fp = @fopen($filepath, 'ab')) { return FALSE; } @@ -192,7 +192,7 @@ class CI_Log { if (isset($newfile) && $newfile === TRUE) { - @chmod($filepath, FILE_WRITE_MODE); + @chmod($filepath, 0666); } return is_int($result); -- cgit v1.2.3-24-g4f1b