mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-03-28 17:42:57 +01:00
Merged revision(s) 26972, 26998 from trunk:
replace more preg_replace callback ........ remove *_version_compare methods in languages & plugins & themes classes, unused and outdated (preg_replace /e modifier) git-svn-id: http://piwigo.org/svn/branches/2.6@26999 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -614,25 +614,6 @@ DELETE FROM '. PLUGINS_TABLE .'
|
||||
/**
|
||||
* Sort functions
|
||||
*/
|
||||
function plugin_version_compare($a, $b)
|
||||
{
|
||||
if (strtolower($a) == 'auto') return false;
|
||||
|
||||
$array = preg_replace(
|
||||
array('/\.+/', '/\.\Z|\A\./'),
|
||||
array('.', ''),
|
||||
array($a, $b)
|
||||
);
|
||||
|
||||
$array = preg_replace_callback(
|
||||
'/([a-z])/i',
|
||||
create_function('$m', 'return intval($m[1], 36);'),
|
||||
$array
|
||||
);
|
||||
|
||||
return version_compare($array[0], $array[1], '>=');
|
||||
}
|
||||
|
||||
function extension_revision_compare($a, $b)
|
||||
{
|
||||
if ($a['revision_date'] < $b['revision_date']) return 1;
|
||||
|
||||
Reference in New Issue
Block a user