]> git.mxchange.org Git - mailer.git/blobdiff - inc/extensions/ext-admintheme_default.php
Heavily rewritten API:
[mailer.git] / inc / extensions / ext-admintheme_default.php
index 97517cc3838c41ccccbb0560eb3e04ade8b5e3c6..5934c04fd14d35f307a3c0b2cc71fa4e224fc938 100644 (file)
@@ -32,8 +32,7 @@
  ************************************************************************/
 
 // Some security stuff...
-if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])))
-{
+if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
 }
@@ -49,12 +48,12 @@ $EXT_VER_HISTORY = array("0.0");
 
 switch ($EXT_LOAD_MODE)
 {
-case "register": // Do stuff when installtion is running (modules.php?module=admin&action=login is called)
+case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
        // Remove all other menu themes
        $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_extensions WHERE ext_name LIKE 'admintheme%'";
-       $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET action='misc' WHERE what='usr_online' LIMIT 1";
-       $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET action='stats' WHERE what='email' LIMIT 1";
-       $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET action='setup' WHERE what='maintenance' LIMIT 1";
+       $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_admin_menu` SET action='misc' WHERE what='usr_online' LIMIT 1";
+       $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_admin_menu` SET action='stats' WHERE what='email' LIMIT 1";
+       $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_admin_menu` SET action='setup' WHERE what='maintenance' LIMIT 1";
        break;
 
 case "remove": // Do stuff when removing extension
@@ -82,14 +81,12 @@ case "update": // Update an extension
        }
        break;
 
+case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+       break;
+
 default: // Do stuff when extension is loaded
        break;
 }
-// Language file prefix
-$EXT_LANG_PREFIX = "admintheme";
-
-// Extension is always active?
-$EXT_ALWAYS_ACTIVE = "N";
 
 //
 ?>