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:
@@ -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 );
|
||||
|
20
thumb.php
20
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."<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);
|
||||
|
Reference in New Issue
Block a user