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