summaryrefslogtreecommitdiffstats
path: root/system/libraries/Image_lib.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2014-10-05 23:04:19 +0200
committerAndrey Andreev <narf@devilix.net>2014-10-05 23:04:19 +0200
commit4a485a73d64a8bebc7625aabc5fdc361d5e7dc56 (patch)
treecb18690c4de1c6ca008227260f9dd0cd2b9279d2 /system/libraries/Image_lib.php
parent39ec29585b7cdca7edc1a0757c913a13a2ee4f85 (diff)
parentd444d445ed0458a352ecb9ff79ffd158677ee805 (diff)
Merge branch 'develop' into feature/session
Diffstat (limited to 'system/libraries/Image_lib.php')
-rw-r--r--system/libraries/Image_lib.php23
1 files changed, 13 insertions, 10 deletions
diff --git a/system/libraries/Image_lib.php b/system/libraries/Image_lib.php
index f1339b57a..39753705b 100644
--- a/system/libraries/Image_lib.php
+++ b/system/libraries/Image_lib.php
@@ -327,6 +327,13 @@ class CI_Image_lib {
public $full_dst_path = '';
/**
+ * File permissions
+ *
+ * @var int
+ */
+ public $file_permissions = 0644;
+
+ /**
* Name of function to create image
*
* @var string
@@ -734,7 +741,7 @@ class CI_Image_lib {
{
if ($this->source_image !== $this->new_image && @copy($this->full_src_path, $this->full_dst_path))
{
- @chmod($this->full_dst_path, 0666);
+ chmod($this->full_dst_path, $this->file_permissions);
}
return TRUE;
@@ -810,8 +817,7 @@ class CI_Image_lib {
imagedestroy($dst_img);
imagedestroy($src_img);
- // Set the file to 666
- @chmod($this->full_dst_path, 0666);
+ chmod($this->full_dst_path, $this->file_permissions);
return TRUE;
}
@@ -880,8 +886,7 @@ class CI_Image_lib {
return FALSE;
}
- // Set the file to 666
- @chmod($this->full_dst_path, 0666);
+ chmod($this->full_dst_path, $this->file_permissions);
return TRUE;
}
@@ -969,7 +974,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, 0666);
+ chmod($this->full_dst_path, $this->file_permissions);
return TRUE;
}
@@ -1013,8 +1018,7 @@ class CI_Image_lib {
imagedestroy($dst_img);
imagedestroy($src_img);
- // Set the file to 666
- @chmod($this->full_dst_path, 0666);
+ chmod($this->full_dst_path, $this->file_permissions);
return TRUE;
}
@@ -1086,8 +1090,7 @@ class CI_Image_lib {
// Kill the file handles
imagedestroy($src_img);
- // Set the file to 666
- @chmod($this->full_dst_path, 0666);
+ chmod($this->full_dst_path, $this->file_permissions);
return TRUE;
}