X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fextensions%2Fext-top10.php;h=909be12a8157fe0ea152934698562e31a0f146a0;hb=8401d620295d27ad2c7804da2a593bba1ac6ff47;hp=e21a58a0821ec1a64f1cc7ff96b8a07a33e704e8;hpb=44c5b87eca387e02d33b4c0e728920aeca2a9840;p=mailer.git diff --git a/inc/extensions/ext-top10.php b/inc/extensions/ext-top10.php index e21a58a082..909be12a81 100644 --- a/inc/extensions/ext-top10.php +++ b/inc/extensions/ext-top10.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,11 +48,11 @@ $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[] = "INSERT INTO "._MYSQL_PREFIX."_guest_menu (action, what, title, visible, locked, sort) VALUES ('main', 'top10', 'TOP-10', 'Y', 'Y', 7)"; - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES ('setup', 'config_top10', 'TOP-10 Listen', 'Stellen Sie hier ein, wie lang die TOP-Listen sein sollen, also wie viele Plätze angezeigt werden sollen.', 8)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD top10_max TINYINT(3) NOT NULL DEFAULT '10'"; + $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_guest_menu (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','top10','TOP-10','Y','Y', 7)"; + $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_top10','TOP-10 Listen','Stellen Sie hier ein, wie lang die TOP-Listen sein sollen, also wie viele Plätze angezeigt werden sollen.', 8)"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD top10_max TINYINT(3) UNSIGNED NOT NULL DEFAULT 10"; // Load CSS file? $EXT_CSS = "Y"; @@ -63,7 +62,6 @@ case "remove": // Do stuff when removing extension // SQL commands to run $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_guest_menu WHERE what='top10' LIMIT 1"; $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE what='config_top10' LIMIT 1"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config DROP top10_max"; break; case "activate": // Do stuff when admin activates this extension @@ -142,17 +140,8 @@ case "update": // Update an extension break; default: // Do stuff when extension is loaded - $dummy = LOAD_CONFIG(); - $_CONFIG = merge_array($_CONFIG, $dummy); - unset($dummy); break; } -// Language file prefix -$EXT_LANG_PREFIX = "top10"; - -// Extension is always active? -$EXT_ALWAYS_ACTIVE = "N"; - // ?>