-if (isBooleanConstantAndTrue('mxchange_installed')) {
- // Simply redirect... :-)
- LOAD_URL("modules.php?module=admin&action=login");
- // Redirection should be done here
+if (!isInstalled()) {
+ // You have to install first!
+ redirectToUrl('install.php');
+} // END - if
+
+// Is the admin logged-in and no sql_patches installed?
+if ((IS_ADMIN()) && (!EXT_IS_ACTIVE('sql_patches'))) {
+ // Extension 'sql_patches' is missing!
+ redirectToUrl('modules.php?module=admin&sql_patches=1');