From 5310b5036efecccb587387dfc9a41061c3597b82 Mon Sep 17 00:00:00 2001 From: mistic100 Date: Mon, 27 Jan 2014 17:33:28 +0000 Subject: remove *_version_compare methods in languages & plugins & themes classes, unused and outdated (preg_replace /e modifier) git-svn-id: http://piwigo.org/svn/trunk@26998 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin/include/languages.class.php | 10 ---------- admin/include/plugins.class.php | 19 ------------------- admin/include/themes.class.php | 10 ---------- 3 files changed, 39 deletions(-) (limited to 'admin/include') diff --git a/admin/include/languages.class.php b/admin/include/languages.class.php index bb9487bec..c4caa2dc9 100644 --- a/admin/include/languages.class.php +++ b/admin/include/languages.class.php @@ -402,16 +402,6 @@ UPDATE '.USER_INFOS_TABLE.' /** * Sort functions */ - function language_version_compare($a, $b) - { - $pattern = array('/([a-z])/ei', '/\.+/', '/\.\Z|\A\./'); - $replacement = array( "'.'.intval('\\1', 36).'.'", '.', ''); - - $array = preg_replace($pattern, $replacement, array($a, $b)); - - return version_compare($array[0], $array[1], '>='); - } - function extension_name_compare($a, $b) { return strcmp(strtolower($a['extension_name']), strtolower($b['extension_name'])); diff --git a/admin/include/plugins.class.php b/admin/include/plugins.class.php index b410ff647..7a6bc4036 100644 --- a/admin/include/plugins.class.php +++ b/admin/include/plugins.class.php @@ -615,25 +615,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; diff --git a/admin/include/themes.class.php b/admin/include/themes.class.php index 7832c42e0..824ccf4b9 100644 --- a/admin/include/themes.class.php +++ b/admin/include/themes.class.php @@ -689,16 +689,6 @@ SELECT /** * Sort functions */ - function theme_version_compare($a, $b) - { - $pattern = array('/([a-z])/ei', '/\.+/', '/\.\Z|\A\./'); - $replacement = array( "'.'.intval('\\1', 36).'.'", '.', ''); - - $array = preg_replace($pattern, $replacement, array($a, $b)); - - return version_compare($array[0], $array[1], '>='); - } - function extension_revision_compare($a, $b) { if ($a['revision_date'] < $b['revision_date']) return 1; -- cgit v1.2.3