Merge branch 'development' of https://github.com/PrestaShop/PrestaShop into development
This commit is contained in:
commit
66f82b119c
3 files changed
+16
-1
No files matched your search
@@ -367,6 +367,18 @@ class ImageCore extends ObjectModel
|
|||||||
');
|
');
|
||||||
return self::$_cacheGetSize[$type];
|
return self::$_cacheGetSize[$type];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function getWidth($params, &$smarty)
|
||||||
|
{
|
||||||
|
$result = self::getSize($params['type']);
|
||||||
|
return $result['width'];
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function getHeight($params, &$smarty)
|
||||||
|
{
|
||||||
|
$result = self::getSize($params['type']);
|
||||||
|
return $result['height'];
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clear all images in tmp dir
|
* Clear all images in tmp dir
|
||||||
|
|||||||
@@ -389,7 +389,7 @@ abstract class ObjectModelCore
|
|||||||
return (int)$value;
|
return (int)$value;
|
||||||
|
|
||||||
case self::TYPE_FLOAT :
|
case self::TYPE_FLOAT :
|
||||||
return (float)$value;
|
return (float)str_replace(',', '.', $value);
|
||||||
|
|
||||||
case self::TYPE_DATE :
|
case self::TYPE_DATE :
|
||||||
if (!$value)
|
if (!$value)
|
||||||
|
|||||||
@@ -80,6 +80,9 @@ smartyRegisterFunction($smarty, 'function', 'displayPrice', array('Tools', 'disp
|
|||||||
smartyRegisterFunction($smarty, 'modifier', 'convertAndFormatPrice', array('Product', 'convertAndFormatPrice')); // used twice
|
smartyRegisterFunction($smarty, 'modifier', 'convertAndFormatPrice', array('Product', 'convertAndFormatPrice')); // used twice
|
||||||
smartyRegisterFunction($smarty, 'function', 'getAdminToken', array('Tools', 'getAdminTokenLiteSmarty'));
|
smartyRegisterFunction($smarty, 'function', 'getAdminToken', array('Tools', 'getAdminTokenLiteSmarty'));
|
||||||
smartyRegisterFunction($smarty, 'function', 'displayAddressDetail', array('AddressFormat', 'generateAddressSmarty'));
|
smartyRegisterFunction($smarty, 'function', 'displayAddressDetail', array('AddressFormat', 'generateAddressSmarty'));
|
||||||
|
smartyRegisterFunction($smarty, 'function', 'getWidthSize', array('Image', 'getWidth'));
|
||||||
|
smartyRegisterFunction($smarty, 'function', 'getHeightSize', array('Image', 'getHeight'));
|
||||||
|
|
||||||
|
|
||||||
function smartyDieObject($params, &$smarty)
|
function smartyDieObject($params, &$smarty)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in new issue
Block a user