Wrapper functions introduced for configuration, loaders refactured:
[mailer.git] / inc / extensions / ext-beg.php
index 249dd1a..ca95040 100644 (file)
@@ -260,21 +260,21 @@ PRIMARY KEY (`id`)
                                break;
 
                        case '0.2.7': // SQL queries for v0.2.7
-                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` CHANGE `beg_ral_en_notify` `beg_ral_enable_notify` ENUM('Y','N') NOT NULL DEFAULT 'N'");
-                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` CHANGE `beg_ral_di_notify` `beg_ral_disable_notify` ENUM('Y','N') NOT NULL DEFAULT 'N'");
-                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` CHANGE `beg_new_mem_notify` `beg_new_member_notify` ENUM('Y','N') NOT NULL DEFAULT 'N'");
-                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` CHANGE `beg_ral_en_notify` `beg_ral_enable_notify` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
-                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` CHANGE `beg_ral_di_notify` `beg_ral_disable_notify` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+                               addConfigChangeSql('beg_ral_en_notify', 'beg_ral_enable_notify`', "ENUM('Y','N') NOT NULL DEFAULT 'N'");
+                               addConfigChangeSql('beg_ral_di_notify', 'beg_ral_disable_notify`', "ENUM('Y','N') NOT NULL DEFAULT 'N'");
+                               addConfigChangeSql('beg_new_mem_notify', 'beg_new_member_notify`', "ENUM('Y','N') NOT NULL DEFAULT 'N'");
+                               addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` CHANGE `beg_ral_en_notify` `beg_ral_enable_notify` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0');
+                               addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` CHANGE `beg_ral_di_notify` `beg_ral_disable_notify` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0');
 
                                // Update notes (these will be set as task text!)
                                setExtensionUpdateNotes("Umbenannt nach neuer Namenskonvention");
                                break;
 
                        case '0.2.8': // SQL queries for v0.2.8
-                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` CHANGE `beg_ral_enable_notify` `beg_rallye_enable_notify` ENUM('Y','N') NOT NULL DEFAULT 'N'");
-                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` CHANGE `beg_ral_disable_notify` `beg_rallye_disable_notify` ENUM('Y','N') NOT NULL DEFAULT 'N'");
-                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` CHANGE `beg_ral_enable_notify` `beg_rallye_enable_notify` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
-                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` CHANGE `beg_ral_disable_notify` `beg_rallye_disable_notify` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+                               addConfigChangeSql('beg_ral_enable_notify', 'beg_rallye_enable_notify`', "ENUM('Y','N') NOT NULL DEFAULT 'N'");
+                               addConfigChangeSql('beg_ral_disable_notify', 'beg_rallye_disable_notify`', "ENUM('Y','N') NOT NULL DEFAULT 'N'");
+                               addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` CHANGE `beg_ral_enable_notify` `beg_rallye_enable_notify` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0');
+                               addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` CHANGE `beg_ral_disable_notify` `beg_rallye_disable_notify` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0');
 
                                // Update notes (these will be set as task text!)
                                setExtensionUpdateNotes("Umbenannt nach neuer Namenskonvention");