]> git.mxchange.org Git - mailer.git/blobdiff - inc/extensions/ext-country.php
Full rewrite of extension updates (multiple updates are supported)
[mailer.git] / inc / extensions / ext-country.php
index 2d5ecdaa20ba4ffe1df99d4f9ea27758b80f9821..2fc6bc23dd531686cb03d782086eb65cb16a2f1a 100644 (file)
@@ -52,8 +52,8 @@ 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',
@@ -61,30 +61,30 @@ is_active ENUM('Y','N') NOT NULL DEFAULT 'N',
 KEY(code),
 PRIMARY KEY(id)
 ) TYPE={!_TABLE_TYPE!}");
-       ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_countries` (code, descr, is_active) VALUES ('DE','Deutschland','Y')");
+       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'");
+       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