[+] CORE : Add version_compare tools to align version sent with alignVersionNumber method.

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16135 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
vSchoener
2012-06-26 13:31:17 +00:00
parent 8a1bf45ae0
commit dce26dab08
2 changed files with 19 additions and 6 deletions
+16
View File
@@ -2108,6 +2108,22 @@ FileETag INode MTime Size
return $filtered_files;
}
/**
* Align version sent and use internal function
*
* @static
* @param $v1
* @param $v2
* @param string $operator
* @return mixed
*/
public static function version_compare($v1, $v2, $operator = '<')
{
Tools::alignVersionNumber($v1, $v2);
return version_compare($v1, $v2, $operator);
}
/**
* Align 2 version with the same number of sub version
* version_compare will work better for its comparison :)