From 1c892a0f9c45a311c194a0ee62792e5868610ae4 Mon Sep 17 00:00:00 2001 From: "Florian Aders (EleRas)" Date: Sat, 23 Oct 2010 15:20:23 +0000 Subject: [PATCH] Removing duplicate function, fixes #447 --- .../froxlor/function.versionInUpdate.php | 69 ------------------- 1 file changed, 69 deletions(-) delete mode 100644 lib/functions/froxlor/function.versionInUpdate.php diff --git a/lib/functions/froxlor/function.versionInUpdate.php b/lib/functions/froxlor/function.versionInUpdate.php deleted file mode 100644 index 3159613c..00000000 --- a/lib/functions/froxlor/function.versionInUpdate.php +++ /dev/null @@ -1,69 +0,0 @@ - (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -/** - * check whether the current version is - * lower than the given version - * - * @param string $current_version current installed version of froxlor - * @param string $version_to_check version to check for update - * - * @return bool - */ -function versionInUpdate($current_version, $version_to_check) -{ - if (!isFroxlor()) { - return true; - } - $pos_a = strpos($current_version, '-svn'); - $pos_b = strpos($version_to_check, '-svn'); - // if we compare svn-versions, we have to add -svn0 to the version - // to compare it correctly - if($pos_a === false && $pos_b !== false) - { - $current_version.= '-svn9999'; - } - - return version_compare($current_version, $version_to_check, '<'); -} - -/** - * check whether the current version is - * lower than the given version - * - without checking if this is Froxlor - * because we need this in our loadSettings - * functions and isFroxlor() needs settings - * already - * - * @param string $current_version current installed version of froxlor - * @param string $version_to_check version to check for update - * - * @return bool - */ -function compareFroxlorVersion($current_version, $version_to_check) -{ - $pos_a = strpos($current_version, '-svn'); - $pos_b = strpos($version_to_check, '-svn'); - // if we compare svn-versions, we have to add -svn0 to the version - // to compare it correctly - if($pos_a === false && $pos_b !== false) - { - $current_version.= '-svn9999'; - } - - return version_compare($current_version, $version_to_check, '<'); -}