mirror of
https://github.com/e107inc/e107.git
synced 2025-08-04 21:57:51 +02:00
Type checks and corrections for e_parse::thumbSrcSet()
This commit is contained in:
@@ -2999,6 +2999,7 @@ class e_parse extends e_parser
|
|||||||
}
|
}
|
||||||
elseif($multiply === '2x' || $multiply === '3x' || $multiply === '4x')
|
elseif($multiply === '2x' || $multiply === '3x' || $multiply === '4x')
|
||||||
{
|
{
|
||||||
|
$multiply = intval($multiply);
|
||||||
|
|
||||||
if(empty($parm['w']) && isset($parm['h']))
|
if(empty($parm['w']) && isset($parm['h']))
|
||||||
{
|
{
|
||||||
@@ -3006,8 +3007,8 @@ class e_parse extends e_parser
|
|||||||
return $this->thumbUrl($src, $parm)." ".$parm['h']."h ".$multiply;
|
return $this->thumbUrl($src, $parm)." ".$parm['h']."h ".$multiply;
|
||||||
}
|
}
|
||||||
|
|
||||||
$width = (!empty($parm['w']) || !empty($parm['h'])) ? (intval($parm['w']) * $multiply) : (intval($this->thumbWidth) * $multiply);
|
$width = !empty($parm['w']) ? (intval($parm['w']) * $multiply) : (intval($this->thumbWidth) * $multiply);
|
||||||
$height = (!empty($parm['h']) || !empty($parm['w'])) ? (intval($parm['h']) * $multiply) : (intval($this->thumbHeight) * $multiply);
|
$height = !empty($parm['h']) ? (intval($parm['h']) * $multiply) : (intval($this->thumbHeight) * $multiply);
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@@ -160,11 +160,13 @@ class e_formTest extends \Codeception\Test\Unit
|
|||||||
$this->assertTrue(false, "Couldn't load e_form object");
|
$this->assertTrue(false, "Couldn't load e_form object");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
include_once(e_CORE."templates/admin_icons_template.php");
|
||||||
|
include_once(e_PLUGIN.'forum/forum_class.php');
|
||||||
|
include_once(e_PLUGIN.'forum/templates/forum_icons_template.php');
|
||||||
|
|
||||||
$legacyDir = APP_PATH."/e107_files/downloadimages/";
|
$legacyDir = APP_PATH."/e107_files/downloadimages/";
|
||||||
$legacyFile = APP_PATH."/e107_files/downloadimages/butterfly.jpg";
|
$legacyFile = APP_PATH."/e107_files/downloadimages/butterfly.jpg";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(!is_dir($legacyDir))
|
if(!is_dir($legacyDir))
|
||||||
{
|
{
|
||||||
mkdir($legacyDir, 0775, true);
|
mkdir($legacyDir, 0775, true);
|
||||||
|
Reference in New Issue
Block a user