summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDerek Jones <derek.jones@ellislab.com>2009-10-13 16:32:48 +0200
committerDerek Jones <derek.jones@ellislab.com>2009-10-13 16:32:48 +0200
commit172e16191889558ca6f6710cf34755200d3e6334 (patch)
tree9eb0b0fdea2529533a1ee02d6d0bccbf14f8dd96
parentc1895834c410f04419febe83d29547201bbab7d0 (diff)
numerous changes from DIR_WRITE_MODE to FILE_WRITE_MODE
chmod operations on files were using the DIR_ constant permisisons
-rw-r--r--system/database/DB_cache.php2
-rw-r--r--system/libraries/Image_lib.php12
-rw-r--r--system/libraries/Output.php2
-rw-r--r--user_guide/changelog.html1
4 files changed, 9 insertions, 8 deletions
diff --git a/system/database/DB_cache.php b/system/database/DB_cache.php
index 8b0ad4fb4..f01bc8212 100644
--- a/system/database/DB_cache.php
+++ b/system/database/DB_cache.php
@@ -146,7 +146,7 @@ class CI_DB_Cache {
return FALSE;
}
- @chmod($dir_path.$filename, DIR_WRITE_MODE);
+ @chmod($dir_path.$filename, FILE_WRITE_MODE);
return TRUE;
}
diff --git a/system/libraries/Image_lib.php b/system/libraries/Image_lib.php
index 169c6e489..59aefc55c 100644
--- a/system/libraries/Image_lib.php
+++ b/system/libraries/Image_lib.php
@@ -459,7 +459,7 @@ class CI_Image_lib {
{
if (@copy($this->full_src_path, $this->full_dst_path))
{
- @chmod($this->full_dst_path, DIR_WRITE_MODE);
+ @chmod($this->full_dst_path, FILE_WRITE_MODE);
}
}
@@ -534,7 +534,7 @@ class CI_Image_lib {
imagedestroy($src_img);
// Set the file to 777
- @chmod($this->full_dst_path, DIR_WRITE_MODE);
+ @chmod($this->full_dst_path, FILE_WRITE_MODE);
return TRUE;
}
@@ -604,7 +604,7 @@ class CI_Image_lib {
}
// Set the file to 777
- @chmod($this->full_dst_path, DIR_WRITE_MODE);
+ @chmod($this->full_dst_path, FILE_WRITE_MODE);
return TRUE;
}
@@ -690,7 +690,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($this->full_dst_path, DIR_WRITE_MODE);
+ @chmod($this->full_dst_path, FILE_WRITE_MODE);
return TRUE;
}
@@ -749,7 +749,7 @@ class CI_Image_lib {
// Set the file to 777
- @chmod($this->full_dst_path, DIR_WRITE_MODE);
+ @chmod($this->full_dst_path, FILE_WRITE_MODE);
return true;
}
@@ -833,7 +833,7 @@ class CI_Image_lib {
imagedestroy($src_img);
// Set the file to 777
- @chmod($this->full_dst_path, DIR_WRITE_MODE);
+ @chmod($this->full_dst_path, FILE_WRITE_MODE);
return TRUE;
}
diff --git a/system/libraries/Output.php b/system/libraries/Output.php
index 4423ac726..0cf6739bd 100644
--- a/system/libraries/Output.php
+++ b/system/libraries/Output.php
@@ -331,7 +331,7 @@ class CI_Output {
return;
}
fclose($fp);
- @chmod($cache_path, DIR_WRITE_MODE);
+ @chmod($cache_path, FILE_WRITE_MODE);
log_message('debug', "Cache file written: ".$cache_path);
}
diff --git a/user_guide/changelog.html b/user_guide/changelog.html
index f11310309..791b1ddef 100644
--- a/user_guide/changelog.html
+++ b/user_guide/changelog.html
@@ -81,6 +81,7 @@ SVN Revision: </p>
<li>Fixed or clarified assorted user guide typos or examples.</li>
<li>Made <kbd>get_mime_by_extension()</kbd> case insensitive.</li>
<li>Fixed a bug in the Form Validation library where fields passed as rule parameters were not being translated (#9132)</li>
+ <li>Switched some DIR_WRITE_MODE constant uses to FILE_WRITE_MODE where files and not directories are being operated on.</li>
</ul>
<h2>Version 1.7.2</h2>