X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fextensions%2Fext-country.php;h=33b40947d572e602d472731426019f91537d86dd;hp=09afaa24d8f77cf68e160142f571fd91e11ba55c;hb=963e55ca1ea79e255f235e359cde9f7862191dc5;hpb=f826c4fd4d320bba92787423dbebe74f03f70514 diff --git a/inc/extensions/ext-country.php b/inc/extensions/ext-country.php index 09afaa24d8..33b40947d5 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); } @@ -53,10 +52,10 @@ case "register": // Do stuff when installtion is running (modules.php?module=adm // SQL commands to run $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_countries"; $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_countries ( -id bigint(20) 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', +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', KEY(code), PRIMARY KEY(id) ) TYPE=MyISAM"; @@ -67,7 +66,7 @@ PRIMARY KEY(id) $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) not null default '1'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD country_code BIGINT(20) UNSIGNED NOT NULL DEFAULT '1'"; break; case "remove": // Do stuff when removing extension @@ -119,7 +118,7 @@ default: // Do stuff when extension is loaded $EXT_LANG_PREFIX = "country"; // Extension is always active? -$EXT_ALWAYS_ACTIVE = 'Y'; +$EXT_ALWAYS_ACTIVE = "Y"; // ?>