diff --git a/e107_handlers/e_parse_class.php b/e107_handlers/e_parse_class.php index fd1c562e1..710b70c17 100644 --- a/e107_handlers/e_parse_class.php +++ b/e107_handlers/e_parse_class.php @@ -2456,6 +2456,16 @@ class e_parse extends e_parser $height = (($this->thumbHeight * $width) / $this->thumbWidth); } + if(!isset($parm['aw'])) + { + $parm['aw'] = null; + } + + if(!isset($parm['ah'])) + { + $parm['ah'] = null; + } + $parms = array('w'=>$width,'h'=>$height,'crop'=> $parm['crop'],'x'=>$parm['x'], 'aw'=>$parm['aw'],'ah'=>$parm['ah']); // $parms = !empty($this->thumbCrop) ? array('aw' => $width, 'ah' => $height, 'x'=>$encode) : array('w' => $width, 'h' => $height, 'x'=>$encode ); diff --git a/thumb.php b/thumb.php index 3694c7932..cce2e1a52 100644 --- a/thumb.php +++ b/thumb.php @@ -16,7 +16,6 @@ * @package e107 * @subpackage core * @author secretr - * @version $Id$ * * @todo cache management - max age, max size, image cache manager (?), cron (?) * @@ -88,6 +87,10 @@ class e_thumbpage // initial path $self = realpath(dirname(__FILE__)); + $mySQLdefaultdb = ''; + $HANDLERS_DIRECTORY = ''; + $mySQLprefix = ''; + // Config include($self.'/e107_config.php'); @@ -214,16 +217,13 @@ class e_thumbpage $this->_src_path = $path; return true; } - else - { - $this->_placeholder = true; - return true; - } - - // echo "path=".$path."
"; - return false; + + $this->_placeholder = true; + return true; + } + function sendImage() { //global $bench; @@ -258,7 +258,7 @@ class e_thumbpage - if($this->_cache = true && is_file(e_CACHE_IMAGE.$fname) && is_readable(e_CACHE_IMAGE.$fname) && ($this->_debug !== true)) + if(($this->_cache === true) && is_file(e_CACHE_IMAGE.$fname) && is_readable(e_CACHE_IMAGE.$fname) && ($this->_debug !== true)) { $thumbnfo['lmodified'] = filemtime(e_CACHE_IMAGE.$fname); $thumbnfo['md5s'] = md5_file(e_CACHE_IMAGE.$fname);