diff options
author | Rick Ellis <rick.ellis@ellislab.com> | 2008-10-17 08:45:32 +0200 |
---|---|---|
committer | Rick Ellis <rick.ellis@ellislab.com> | 2008-10-17 08:45:32 +0200 |
commit | 701f6129cadcfb63c98a2738dfda1eb00de80e58 (patch) | |
tree | a2a1a467650db26535062d8e7e7fb205f4ee0203 | |
parent | 397000e69bb0f3bd527593b344b874b0a17f4e3b (diff) |
Fixed bug: 4893
-rw-r--r-- | system/libraries/Image_lib.php | 16 |
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
|