X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fextensions%2Fext-country.php;h=fd04c72618c112742059f0a731b05c7e8fcefd76;hp=8a81b8ec74e75770feacac3d772a7c4db81f01fc;hb=6f8a68c6c5ed9eeae1bf790f5d758c800b5d5d5d;hpb=4b7f401f2a4680ae46ca41c57f749cfe35163660 diff --git a/inc/extensions/ext-country.php b/inc/extensions/ext-country.php index 8a81b8ec74..fd04c72618 100644 --- a/inc/extensions/ext-country.php +++ b/inc/extensions/ext-country.php @@ -14,11 +14,9 @@ * $Date:: $ * * $Tag:: 0.2.1-FINAL $ * * $Author:: $ * - * Needs to be in all Files and every File needs "svn propset * - * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009, 2010 by Mailer Developer Team * + * Copyright (c) 2009 - 2011 by Mailer Developer Team * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -54,15 +52,15 @@ setExtensionAlwaysActive('Y'); switch (getExtensionMode()) { case 'register': // Do stuff when installation is running (modules.php?module=admin is called) // SQL commands to run - addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_countries`'); + addDropTableSql('countries'); addExtensionSql("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', -KEY (code), -PRIMARY KEY (id) -) TYPE={?_TABLE_TYPE?}"); +`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`) +) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT = 'Country codes and their full-length descriptions'"); addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_countries` (code, descr, is_active) VALUES ('DE','Deutschland','Y')"); // Admin menu @@ -75,7 +73,7 @@ PRIMARY KEY (id) case 'remove': // Do stuff when removing extension // SQL commands to run - addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_countries`'); + addDropTableSql('countries'); addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `action`='country'"); break; @@ -117,7 +115,7 @@ PRIMARY KEY (id) case 'modify': // When the extension got modified break; - case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. + case 'test': // For testing purposes break; case 'init': // Do stuff when extension is initialized