summaryrefslogtreecommitdiffstats
path: root/system/libraries
diff options
context:
space:
mode:
authorRick Ellis <rick.ellis@ellislab.com>2008-10-17 08:45:32 +0200
committerRick Ellis <rick.ellis@ellislab.com>2008-10-17 08:45:32 +0200
commit701f6129cadcfb63c98a2738dfda1eb00de80e58 (patch)
treea2a1a467650db26535062d8e7e7fb205f4ee0203 /system/libraries
parent397000e69bb0f3bd527593b344b874b0a17f4e3b (diff)
Fixed bug: 4893
Diffstat (limited to 'system/libraries')
-rw-r--r--system/libraries/Image_lib.php16
1 files changed, 9 insertions, 7 deletions
diff --git a/system/libraries/Image_lib.php b/system/libraries/Image_lib.php
index d7404afcb..67b73096b 100644
--- a/system/libraries/Image_lib.php
+++ b/system/libraries/Image_lib.php
@@ -453,19 +453,21 @@ class CI_Image_lib {
// we'll simply make a copy of the original with the new name... assuming dynamic rendering is off.
if ($this->dynamic_output === FALSE)
{
- if (($this->orig_width == $this->width AND $this->orig_height == $this->height) AND ($this->source_image != $this->new_image))
+ if ($this->orig_width == $this->width AND $this->orig_height == $this->height)
{
- if ( ! @copy($this->full_src_path, $this->full_dst_path))
- {
- $this->set_error('imglib_copy_failed');
- return FALSE;
+ if ($this->source_image != $this->new_image)
+ {
+ if (@copy($this->full_src_path, $this->full_dst_path))
+ {
+ @chmod($this->full_dst_path, DIR_WRITE_MODE);
+ }
}
-
- @chmod($this->full_dst_path, DIR_WRITE_MODE);
+
return TRUE;
}
}
+ // Let's set up our values based on the action
if ($action == 'crop')
{
// Reassign the source width/height if cropping