Fixes for missing secret file
[mailer.git] / inc / functions.php
index b3db62630d21ef8df21c4fd0b3e415ef01eb4acf..9a7b1fc6f1fb23c6758cf81baf23b15a7d45cf5b 100644 (file)
@@ -1927,7 +1927,7 @@ function generateHash ($plainText, $salt = "") {
        global $_CONFIG, $_SERVER;
 
        // Is the required extension "sql_patches" there and a salt is not given?
-       if (((EXT_VERSION_IS_OLDER("sql_patches", "0.3.6")) || (GET_EXT_VERSION("sql_patches") == "")) && (empty($salt))) {
+       if (((EXT_VERSION_IS_OLDER("sql_patches", "0.3.6")) || (EXT_IS_ACTIVE("sql_patches"))) && (empty($salt))) {
                // Extension sql_patches is missing/outdated so we return the plain text
                return $plainText;
        } // END - if
@@ -1941,7 +1941,7 @@ function generateHash ($plainText, $salt = "") {
        } // END - if
 
        // When the salt is empty build a new one, else use the first x configured characters as the salt
-       if ($salt == "") {
+       if (empty($salt)) {
                // Build server string
                $server = $_SERVER['PHP_SELF'].":".getenv('HTTP_USER_AGENT').":".getenv('SERVER_SOFTWARE').":".getenv('REMOTE_ADDR').":".":".filemtime(PATH."inc/databases.php");