Partially revert PR #2190
The core shouldn't depend on constants that are not defined by itself
diff --git a/system/libraries/Image_lib.php b/system/libraries/Image_lib.php
index ac3db41..df0df3f 100644
--- a/system/libraries/Image_lib.php
+++ b/system/libraries/Image_lib.php
@@ -734,7 +734,7 @@
{
if ($this->source_image !== $this->new_image && @copy($this->full_src_path, $this->full_dst_path))
{
- @chmod($this->full_dst_path, FILE_WRITE_MODE);
+ @chmod($this->full_dst_path, 0666);
}
return TRUE;
@@ -811,7 +811,7 @@
imagedestroy($src_img);
// Set the file to 666
- @chmod($this->full_dst_path, FILE_WRITE_MODE);
+ @chmod($this->full_dst_path, 0666);
return TRUE;
}
@@ -881,7 +881,7 @@
}
// Set the file to 777
- @chmod($this->full_dst_path, FILE_WRITE_MODE);
+ @chmod($this->full_dst_path, 0666);
return TRUE;
}
@@ -969,7 +969,7 @@
// 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, FILE_WRITE_MODE);
+ @chmod($this->full_dst_path, 0666);
return TRUE;
}
@@ -1014,7 +1014,7 @@
imagedestroy($src_img);
// Set the file to 777
- @chmod($this->full_dst_path, FILE_WRITE_MODE);
+ @chmod($this->full_dst_path, 0666);
return TRUE;
}
@@ -1087,7 +1087,7 @@
imagedestroy($src_img);
// Set the file to 777
- @chmod($this->full_dst_path, FILE_WRITE_MODE);
+ @chmod($this->full_dst_path, 0666);
return TRUE;
}