1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-06 14:46:56 +02:00

Thumbnail cache issue #1648

This commit is contained in:
Cameron
2016-05-13 07:14:49 -07:00
parent a94eb4084d
commit 0afa769dab
2 changed files with 20 additions and 10 deletions

View File

@@ -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 );

View File

@@ -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."<br />";
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);