-// Is the script installed?
-if (isInstalled()) {
- // Simply redirect... :-)
- LOAD_URL("modules.php?module=admin");
+// Set content type for e.g. search engines
+setContentType('text/html');
+
+// 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');