// Maybe need setup of secret key!
require_once(PATH."inc/gen_sql_patches.php");
- if (GET_EXT_VERSION("cache") >= "0.1.2") {
+ if ((GET_EXT_VERSION("cache") >= "0.1.2") && (is_object($cacheInstance))) {
// Remove extensions and mod_reg cache file
require_once(PATH."inc/libs/cache_functions.php");
require_once(PATH."inc/extensions/ext-cache.php");
// Read file
$_CONFIG['secret_key'] = implode("", file($hashFile));
} else {
+ // Remove it from database
+ UPDATE_CONFIG("file_hash", "");
+
// Cannot read secret file!
- mxchange_die("Cannot read secret file!");
+ mxchange_die("Cannot read secret file! Please try to reload");
}
} // END - if
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
} // 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");
if (URL != "http://your-server.com") {
// Already installed???
$burl = URL;
-} elseif ($burl == "") {
+} elseif (empty($burl)) {
// Auto-detect URL
$burl = "http://".$SERVER_NAME.$_SERVER['PHP_SELF'];
$burl = substr($burl, 0, strpos($burl, "install.php"));