// Refactoring
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16704 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
+27
-27
@@ -1774,38 +1774,38 @@ FileETag INode MTime Size
|
|||||||
if (function_exists('property_exists'))
|
if (function_exists('property_exists'))
|
||||||
return property_exists($class, $property);
|
return property_exists($class, $property);
|
||||||
|
|
||||||
if (is_object($class))
|
if (is_object($class))
|
||||||
$vars = get_object_vars($class);
|
$vars = get_object_vars($class);
|
||||||
else
|
else
|
||||||
$vars = get_class_vars($class);
|
$vars = get_class_vars($class);
|
||||||
|
|
||||||
return array_key_exists($property, $vars);
|
return array_key_exists($property, $vars);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @desc identify the version of php
|
* @desc identify the version of php
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function checkPhpVersion()
|
public static function checkPhpVersion()
|
||||||
{
|
{
|
||||||
$version = null;
|
$version = null;
|
||||||
|
|
||||||
if (defined('PHP_VERSION'))
|
if (defined('PHP_VERSION'))
|
||||||
$version = PHP_VERSION;
|
$version = PHP_VERSION;
|
||||||
else
|
else
|
||||||
$version = phpversion('');
|
$version = phpversion('');
|
||||||
|
|
||||||
//Case management system of ubuntu, php version return 5.2.4-2ubuntu5.2
|
//Case management system of ubuntu, php version return 5.2.4-2ubuntu5.2
|
||||||
if (strpos($version, '-') !== false)
|
if (strpos($version, '-') !== false)
|
||||||
$version = substr($version, 0, strpos($version, '-'));
|
$version = substr($version, 0, strpos($version, '-'));
|
||||||
|
|
||||||
return $version;
|
return $version;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @desc try to open a zip file in order to check if it's valid
|
* @desc try to open a zip file in order to check if it's valid
|
||||||
* @return bool success
|
* @return bool success
|
||||||
*/
|
*/
|
||||||
public static function ZipTest($from_file)
|
public static function ZipTest($from_file)
|
||||||
{
|
{
|
||||||
if (class_exists('ZipArchive', false))
|
if (class_exists('ZipArchive', false))
|
||||||
@@ -2194,12 +2194,12 @@ FileETag INode MTime Size
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Compare 2 prices to sort products
|
* Compare 2 prices to sort products
|
||||||
*
|
*
|
||||||
* @param float $a
|
* @param float $a
|
||||||
* @param float $b
|
* @param float $b
|
||||||
* @return integer
|
* @return integer
|
||||||
*/
|
*/
|
||||||
/* Externalized because of a bug in PHP 5.1.6 when inside an object */
|
/* Externalized because of a bug in PHP 5.1.6 when inside an object */
|
||||||
function cmpPriceAsc($a, $b)
|
function cmpPriceAsc($a, $b)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user