X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fextensions%2Fext-country.php;h=e2c8df89cb7faeb57862b7b622c342faebdaa32a;hb=497d9d8fcda61391c149af3747118bb2772c7c26;hp=10af68b4f74bccd1666a51d3571067703dd2adba;hpb=82d53dfb7f59fa1e37bd500e3db3d10a9d4a78da;p=mailer.git diff --git a/inc/extensions/ext-country.php b/inc/extensions/ext-country.php index 10af68b4f7..e2c8df89cb 100644 --- a/inc/extensions/ext-country.php +++ b/inc/extensions/ext-country.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,22 +48,22 @@ $EXT_VER_HISTORY = array("0.0", "0.0.1", "0.0.2", "0.0.3", "0.0.4"); 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[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_countries"; $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_countries ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, code CHAR(2) NOT NULL DEFAULT 'DE', descr VARCHAR(255) NOT NULL DEFAULT 'Deutschland', -is_active ENUM('Y', 'N') NOT NULL DEFAULT 'N', +is_active ENUM('Y','N') NOT NULL DEFAULT 'N', KEY(code), PRIMARY KEY(id) ) TYPE=MyISAM"; - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_countries (code, descr, is_active) VALUES ('DE', 'Deutschland', 'Y')"; + $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_countries (code, descr, is_active) VALUES ('DE','Deutschland','Y')"; // Admin menu - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES('country', NULL, 'Ländercodes verwalten', 'Stellen Sie hier Ländercodes ein, damit auch internationale Mitglieder sich zu Ihrem ".MT_WORD." anmelden können.', 8)"; - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES('country', 'list_country', 'Verwalten', 'Hinzufügen, Ändern und Löschen von Ländercodes.', 1)"; + $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('country', NULL, 'Ländercodes verwalten','Stellen Sie hier Ländercodes ein, damit auch internationale Mitglieder sich zu Ihrem ".MT_WORD." anmelden können.', 8)"; + $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('country','list_country','Verwalten','Hinzufügen, Ändern und Löschen von Ländercodes.', 1)"; // Add entry to user table $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD country_code BIGINT(20) UNSIGNED NOT NULL DEFAULT '1'"; @@ -118,7 +117,7 @@ default: // Do stuff when extension is loaded // Language file prefix $EXT_LANG_PREFIX = "country"; -// Extension is always active? +// Keep this extension always active! $EXT_ALWAYS_ACTIVE = "Y"; //