Index: branches/RC/core/units/images/image_tag_processor.php =================================================================== diff -u -r8929 -r9256 --- branches/RC/core/units/images/image_tag_processor.php (.../image_tag_processor.php) (revision 8929) +++ branches/RC/core/units/images/image_tag_processor.php (.../image_tag_processor.php) (revision 9256) @@ -173,31 +173,15 @@ if ($object->GetDBField('SameImages') && $object->GetDBField('ThumbPath')) { // we can auto-resize image, when source image available & we use same image for thumbnail & full image in admin - $image_helper =& $this->Application->recallObject('ImageHelper'); - /* @var $image_helper ImageHelper */ - $max_width = $this->getImageDimension('Width', $params); $max_height = $this->getImageDimension('Height', $params); if ($max_width > 0 || $max_height > 0) { - // image auto-resize is required - $src_image = FULL_PATH.$object->GetDBField('ThumbPath'); - list ($max_width, $max_height, $resized) = $image_helper->GetImageDimensions($src_image, $max_width, $max_height); + $image_helper =& $this->Application->recallObject('ImageHelper'); + /* @var $image_helper ImageHelper */ - if ($resized) { - $src_path = FULL_PATH.($this->Application->IsAdmin() ? IMAGES_PENDING_PATH : IMAGES_PATH); - $dst_image = preg_replace('/^'.preg_quote($src_path, '/').'(.*)\.(.*)$/', $src_path.'resized/\\1_'.$max_width.'x'.$max_height.'.\\2', $src_image); - if (!file_exists($dst_image) || filemtime($src_image) > filemtime($dst_image)) { - // resized image not available OR should be recreated due source image change - $image_resized = $image_helper->ScaleImage($src_image, $dst_image, $max_width, $max_height); - if (!$image_resized) { - // resize failed, because of server error - $dst_image = $src_image; - } - } - - return preg_replace('/^'.preg_quote(FULL_PATH, '/').'(.*)/', $base_url.'\\1', $dst_image); - } + $src_image = FULL_PATH.$object->GetDBField('ThumbPath'); + return $image_helper->ResizeImage($src_image, $max_width, $max_height); } }