mirror of
https://github.com/e107inc/e107.git
synced 2025-08-07 23:26:41 +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);
|
$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 = 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 );
|
// $parms = !empty($this->thumbCrop) ? array('aw' => $width, 'ah' => $height, 'x'=>$encode) : array('w' => $width, 'h' => $height, 'x'=>$encode );
|
||||||
|
18
thumb.php
18
thumb.php
@@ -16,7 +16,6 @@
|
|||||||
* @package e107
|
* @package e107
|
||||||
* @subpackage core
|
* @subpackage core
|
||||||
* @author secretr
|
* @author secretr
|
||||||
* @version $Id$
|
|
||||||
*
|
*
|
||||||
* @todo cache management - max age, max size, image cache manager (?), cron (?)
|
* @todo cache management - max age, max size, image cache manager (?), cron (?)
|
||||||
*
|
*
|
||||||
@@ -88,6 +87,10 @@ class e_thumbpage
|
|||||||
// initial path
|
// initial path
|
||||||
$self = realpath(dirname(__FILE__));
|
$self = realpath(dirname(__FILE__));
|
||||||
|
|
||||||
|
$mySQLdefaultdb = '';
|
||||||
|
$HANDLERS_DIRECTORY = '';
|
||||||
|
$mySQLprefix = '';
|
||||||
|
|
||||||
// Config
|
// Config
|
||||||
include($self.'/e107_config.php');
|
include($self.'/e107_config.php');
|
||||||
|
|
||||||
@@ -214,16 +217,13 @@ class e_thumbpage
|
|||||||
$this->_src_path = $path;
|
$this->_src_path = $path;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
$this->_placeholder = true;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// echo "path=".$path."<br />";
|
$this->_placeholder = true;
|
||||||
return false;
|
return true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function sendImage()
|
function sendImage()
|
||||||
{
|
{
|
||||||
//global $bench;
|
//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['lmodified'] = filemtime(e_CACHE_IMAGE.$fname);
|
||||||
$thumbnfo['md5s'] = md5_file(e_CACHE_IMAGE.$fname);
|
$thumbnfo['md5s'] = md5_file(e_CACHE_IMAGE.$fname);
|
||||||
|
Reference in New Issue
Block a user