X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fextensions%2Fext-country.php;h=e515b87a387611f281bf0de69fae519f5cb62824;hb=508228c85fba8448d00865b1639cb8cd7a69e457;hp=5bed3a3d1e7e7ca7cb41ba8a6f9d7bccfa5e97e7;hpb=cca98f57dff720b174d21d071cee8303462485d7;p=mailer.git diff --git a/inc/extensions/ext-country.php b/inc/extensions/ext-country.php index 5bed3a3d1e..e515b87a38 100644 --- a/inc/extensions/ext-country.php +++ b/inc/extensions/ext-country.php @@ -10,7 +10,12 @@ * -------------------------------------------------------------------- * * Kurzbeschreibung : Laendercode-Management * * -------------------------------------------------------------------- * - * * + * $Revision:: 856 $ * + * $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 * @@ -38,51 +43,48 @@ if (!defined('__SECURITY')) { } // Version number -$EXT_VERSION = "0.0.4"; - -// Auto-set extension version -if (empty($EXT_VER)) $EXT_VER = $EXT_VERSION; +EXT_SET_VERSION("0.0.4"); // Version history array (add more with , "0.1" and so on) -$EXT_VER_HISTORY = array("0.0", "0.0.1", "0.0.2", "0.0.3", "0.0.4"); +EXT_SET_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 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` ( + ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_countries`"); + ADD_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"; - $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_countries` (code, descr, is_active) VALUES ('DE','Deutschland','Y')"; +) TYPE={!_TABLE_TYPE!}"); + ADD_SQL("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)"; + 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 entry to user table - $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_user_data` ADD country_code BIGINT(20) UNSIGNED NOT NULL DEFAULT 1"; + ADD_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 - $SQLs[] = "DROP TABLE IF EXISTS `{!MYSQL_PREFIX!}_countries`"; - $SQLs[] = "DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_admin_menu` WHERE action='country' LIMIT 2"; + ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_countries`"); + ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='country' LIMIT 2"); break; case "activate": // Do stuff when admin activates this extension // SQL commands to run - $SQLs[] = ""; + ADD_SQL(""); break; case "deactivate": // Do stuff when admin deactivates this extension // SQL commands to run - $SQLs[] = ""; + ADD_SQL(""); break; case "update": // Update an extension @@ -90,26 +92,29 @@ case "update": // Update an extension { case "0.0.1": // SQL queries for v0.0.1 // Update notes (these will be set as task text!) - $UPDATE_NOTES = "SQL-Dateien hinzugefügt, die Sie mit z.B. phpMyAdmin einspielen können. (DOCS/country/README.de lesen!)"; + EXT_SET_UPDATE_NOTES("SQL-Dateien hinzugefügt, die Sie mit z.B. phpMyAdmin einspielen können. (DOCS/country/README.de lesen!)"); break; case "0.0.2": // SQL queries for v0.0.2 // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Sicherheitsupdate: SQL-Anweisungen geschützt."; + EXT_SET_UPDATE_NOTES("Sicherheitsupdate: SQL-Anweisungen geschützt."); break; case "0.0.3": // SQL queries for v0.0.3 // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Abspeichern von Einstellungen repariert."; + EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert."); break; case "0.0.4": // SQL queries for v0.0.4 // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Sicherheitsupdate für die Include-Befehle."; + EXT_SET_UPDATE_NOTES("Sicherheitsupdate für die Include-Befehle."); break; } 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; @@ -118,7 +123,7 @@ default: // Do stuff when extension is loaded } // Keep this extension always active! -$EXT_ALWAYS_ACTIVE = "Y"; +EXT_SET_ALWAYS_ACTIVE("Y"); // ?>