$result = false;
// Is the script installed?
- if (isBooleanConstantAndTrue('mxchange_installed')) {
+ if (isInstalled()) {
// Check if cache is valid
if ((GET_EXT_VERSION("cache") >= "0.1.2") && (isset($GLOBALS['cache_array']['modules']['module'])) && (in_array($mod, $GLOBALS['cache_array']['modules']['module']))) {
// Load from cache
$ret = "major";
// Check if script is installed if not return a "done" to prevent some errors
- if ((!isBooleanConstantAndTrue('mxchange_installed')) || (isInstalling()) || (!isBooleanConstantAndTrue('admin_registered'))) {
+ if ((!isInstalled()) || (isInstalling()) || (!isAdminRegistered())) {
// Not installed or no admin registered or in installation phase
return "done";
} // END - if
// Free memory
SQL_FREERESULT($result);
} elseif ((GET_EXT_VERSION("sql_patches") == "") && ($MODE != "admin")) {
- // No sql_patches installed!
- LOAD_URL("admin.php");
+ // No sql_patches installed, but maybe we need to register an admin?
+ if (isAdminRegistered()) {
+ // Redirect
+ // @TODO Why does this lead into an endless loop but we still need it???
+ LOAD_URL("admin.php");
+ } // END - if
}
// Return action value