X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fextensions%2Fext-country.php;h=2fc6bc23dd531686cb03d782086eb65cb16a2f1a;hb=46f2e389417a40f1029612b58cb285416ccae7a5;hp=e36370e5cbae53249f53518d3477f4fff754df69;hpb=e72031bcfdcd8e91f62bec6cc88f36b7a11d9221;p=mailer.git diff --git a/inc/extensions/ext-country.php b/inc/extensions/ext-country.php index e36370e5cb..2fc6bc23dd 100644 --- a/inc/extensions/ext-country.php +++ b/inc/extensions/ext-country.php @@ -10,7 +10,12 @@ * -------------------------------------------------------------------- * * Kurzbeschreibung : Laendercode-Management * * -------------------------------------------------------------------- * - * * + * $Revision:: $ * + * $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 - 2008 by Roland Haeder * * For more information visit: http://www.mxchange.org * @@ -47,39 +52,39 @@ switch ($EXT_LOAD_MODE) { case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) // SQL commands to run - ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_countries`"); - ADD_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_countries` ( + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_countries`"); + ADD_EXT_SQL("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=MyISAM"); - ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_countries` (code, descr, is_active) VALUES ('DE','Deutschland','Y')"); +) TYPE={!_TABLE_TYPE!}"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_countries` (code, descr, is_active) VALUES ('DE','Deutschland','Y')"); // Admin menu - ADD_SQL("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)"); - ADD_SQL("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_EXT_SQL("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)"); + ADD_EXT_SQL("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 - ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD country_code BIGINT(20) UNSIGNED NOT NULL DEFAULT 1"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD country_code BIGINT(20) UNSIGNED NOT NULL DEFAULT 1"); break; case "remove": // Do stuff when removing extension // SQL commands to run - ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_countries`"); - ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='country' LIMIT 2"); + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_countries`"); + ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='country'"); break; case "activate": // Do stuff when admin activates this extension // SQL commands to run - ADD_SQL(""); + ADD_EXT_SQL(""); break; case "deactivate": // Do stuff when admin deactivates this extension // SQL commands to run - ADD_SQL(""); + ADD_EXT_SQL(""); break; case "update": // Update an extension @@ -107,6 +112,9 @@ case "update": // Update an extension } break; +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. break;