From 44dbc7826dc34c86829b734fcec0015271b7873f Mon Sep 17 00:00:00 2001 From: Derek Allard Date: Tue, 29 Jan 2008 20:38:55 +0000 Subject: Fixed a bug (#3024) in which master_dim wasn't getting reset by clear() in the Image library. Documented clear() --- system/libraries/Image_lib.php | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'system') diff --git a/system/libraries/Image_lib.php b/system/libraries/Image_lib.php index 260075ecd..dbb6f82e0 100644 --- a/system/libraries/Image_lib.php +++ b/system/libraries/Image_lib.php @@ -110,7 +110,10 @@ class CI_Image_lib { foreach ($props as $val) { $this->$val = ''; - } + } + + // special consideration for master_dim + $this->master_dim = 'auto'; } // -------------------------------------------------------------------- @@ -497,12 +500,6 @@ class CI_Image_lib { } // Create The Image - // - // old conditional which users report cause problems with shared GD libs who report themselves as "2.0 or greater" - // it appears that this is no longer the issue that it was in 2004, so we've removed it, retaining it in the comment - // below should that ever prove inaccurate. - // - // if ($this->image_library == 'gd2' AND function_exists('imagecreatetruecolor') AND $v2_override == FALSE) if ($this->image_library == 'gd2' AND function_exists('imagecreatetruecolor')) { $create = 'imagecreatetruecolor'; @@ -692,7 +689,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, 0777); + @chmod($dst_image, 0777); return TRUE; } -- cgit v1.2.3-24-g4f1b