X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=inc%2Fextensions%2Fext-maintenance.php;h=e8990bd30329b7172e407490d819314284d95217;hb=ab92fb7241d00636b0eb940f147449758820cba1;hp=6609192764fa2f551f899a4b8ba43a479493104d;hpb=099b1d8158f107c8f1c61de466fd3f1c3c044f2e;p=mailer.git
diff --git a/inc/extensions/ext-maintenance.php b/inc/extensions/ext-maintenance.php
index 6609192764..e8990bd303 100644
--- a/inc/extensions/ext-maintenance.php
+++ b/inc/extensions/ext-maintenance.php
@@ -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,15 +48,15 @@ $EXT_VER_HISTORY = array("0.0", "0.0.1", "0.0.2", "0.0.3", "0.0.4", "0.0.5", "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)
// SQL commands to run
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD maintenance ENUM('Y', 'N') NOT NULL DEFAULT 'N';";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES('setup', 'maintenance', 'Wartungsmodus', 'Schalten Sie den Wartungsmodus ein, nur wenn sehr schwerwiegende Fehler vorliegen, die Sie oder mxchange.org nicht schenll genug beheben können.', '10')";
+ $SQLs[] = "ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD maintenance ENUM('Y','N') NOT NULL DEFAULT 'N';";
+ $SQLs[] = "INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','maintenance','Wartungsmodus','Schalten Sie den Wartungsmodus ein, nur wenn sehr schwerwiegende Fehler vorliegen, die Sie oder mxchange.org nicht schenll genug beheben können.','10')";
break;
case "remove": // Do stuff when removing extension
// SQL commands to run
- $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE what='maintenance' LIMIT 1";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE what='maintenance' LIMIT 1";
break;
case "activate": // Do stuff when admin activates this extension
@@ -90,7 +89,7 @@ case "update": // Update an extension
case "0.0.4": // SQL queries for v0.0.4
// Update notes (these will be set as task text!)
- $UPDATE_NOTES = "Seit Patch 340 überflüssige HTML-Tags entfernt.";
+ $UPDATE_NOTES = "Seit Patch 340 überflüssige HTML-Tags entfernt.";
break;
case "0.0.5": // SQL queries for v0.0.5
@@ -105,14 +104,14 @@ 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 = "maintenance";
-
-// Extension is always active?
+// Keep this extension always active!
$EXT_ALWAYS_ACTIVE = "Y";
//