From 3ad8efe07deb3ec27a205815dc9097c20c728e9b Mon Sep 17 00:00:00 2001 From: Derek Jones Date: Fri, 4 Apr 2008 18:56:04 +0000 Subject: added constants.php file and implemented constants for file system modes --- system/libraries/Image_lib.php | 12 ++++++------ system/libraries/Log.php | 2 +- system/libraries/Output.php | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) (limited to 'system/libraries') diff --git a/system/libraries/Image_lib.php b/system/libraries/Image_lib.php index 395742092..85435f6c9 100644 --- a/system/libraries/Image_lib.php +++ b/system/libraries/Image_lib.php @@ -484,7 +484,7 @@ class CI_Image_lib { return FALSE; } - @chmod($this->full_dst_path, 0777); + @chmod($this->full_dst_path, DIR_WRITE_MODE); return TRUE; } @@ -539,7 +539,7 @@ class CI_Image_lib { imagedestroy($src_img); // Set the file to 777 - @chmod($this->full_dst_path, 0777); + @chmod($this->full_dst_path, DIR_WRITE_MODE); return TRUE; } @@ -609,7 +609,7 @@ class CI_Image_lib { } // Set the file to 777 - @chmod($this->full_dst_path, 0777); + @chmod($this->full_dst_path, DIR_WRITE_MODE); return TRUE; } @@ -695,7 +695,7 @@ class CI_Image_lib { // we have to rename the temp file. copy ($this->dest_folder.'netpbm.tmp', $this->full_dst_path); unlink ($this->dest_folder.'netpbm.tmp'); - @chmod($dst_image, 0777); + @chmod($dst_image, DIR_WRITE_MODE); return TRUE; } @@ -754,7 +754,7 @@ class CI_Image_lib { // Set the file to 777 - @chmod($this->full_dst_path, 0777); + @chmod($this->full_dst_path, DIR_WRITE_MODE); return true; } @@ -838,7 +838,7 @@ class CI_Image_lib { imagedestroy($src_img); // Set the file to 777 - @chmod($this->full_dst_path, 0777); + @chmod($this->full_dst_path, DIR_WRITE_MODE); return TRUE; } diff --git a/system/libraries/Log.php b/system/libraries/Log.php index f9ca85a30..1aa8bd0f4 100644 --- a/system/libraries/Log.php +++ b/system/libraries/Log.php @@ -109,7 +109,7 @@ class CI_Log { flock($fp, LOCK_UN); fclose($fp); - @chmod($filepath, 0666); + @chmod($filepath, FILE_WRITE_MODE); return TRUE; } diff --git a/system/libraries/Output.php b/system/libraries/Output.php index a4d8d34b8..07990eb16 100644 --- a/system/libraries/Output.php +++ b/system/libraries/Output.php @@ -308,7 +308,7 @@ class CI_Output { fwrite($fp, $expire.'TS--->'.$output); flock($fp, LOCK_UN); fclose($fp); - @chmod($cache_path, 0777); + @chmod($cache_path, DIR_WRITE_MODE); log_message('debug', "Cache file written: ".$cache_path); } -- cgit v1.2.3-24-g4f1b