]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/admin-inc.php
Fixed a comparison problem like string1 < string2
[mailer.git] / inc / modules / admin / admin-inc.php
index e386039365eb9ed0c5e48518ed605dfd6657e1b7..ee90ca6bc94f638cd7b0789528b825d66b091e23 100644 (file)
@@ -107,8 +107,8 @@ function CHECK_ADMIN_LOGIN ($admin_login, $password)
                $data['password'] = generateHash($password);
 
                // Is the sql_patches not installed, than we cannot have a valid hashed password here!
-               if (($ret == "pass") && ((GET_EXT_VERSION("sql_patches") < "0.3.6") || (GET_EXT_VERSION("sql_patches") == ""))) $ret = "done";
-       } elseif ((GET_EXT_VERSION("sql_patches") < "0.3.6") || (GET_EXT_VERSION("sql_patches") == "")) {
+               if (($ret == "pass") && ((EXT_VERSION_IS_OLDER("sql_patches", "0.3.6")) || (GET_EXT_VERSION("sql_patches") == ""))) $ret = "done";
+       } elseif ((EXT_VERSION_IS_OLDER("sql_patches", "0.3.6")) || (GET_EXT_VERSION("sql_patches") == "")) {
                // Old hashing way
                return $ret;
        } elseif (!isset($data['password'])) {
@@ -180,7 +180,7 @@ function LOGIN_ADMIN ($adminLogin, $passHash) {
        global $cacheInstance;
 
        // Reset failture counter on matching admins version
-       if ((GET_EXT_VERSION("admins") >= "0.7.0") && ((GET_EXT_VERSION("sql_patches") < "0.3.6") || (GET_EXT_VERSION("sql_patches") == ""))) {
+       if ((GET_EXT_VERSION("admins") >= "0.7.0") && ((EXT_VERSION_IS_OLDER("sql_patches", "0.3.6")) || (GET_EXT_VERSION("sql_patches") == ""))) {
                // Reset counter on out-dated sql_patches version
                SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_admins SET login_failtures=0,last_failture='0000-00-00 00:00:00' WHERE login='%s' LIMIT 1",
                        array($adminLogin), __FILE__, __LINE__);