]> git.mxchange.org Git - mailer.git/blobdiff - inc/extensions/ext-order.php
Renamed some all-capitalized variables small
[mailer.git] / inc / extensions / ext-order.php
index 3d97ba65b5a2f21edec7731fd5407365391cb02e..87b84ce3b43c9a8adbdda49125518a8991b4113a 100644 (file)
@@ -49,7 +49,7 @@ setExtensionVersionHistory(array('0.0', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1
 switch (getExtensionMode()) {
        case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
                // SQL commands to run
-               addMemberMenuSql('order','order','Mailbuchung','N','Y',1);
+               addMemberMenuSql('order', 'order', 'Mailbuchung', 'N', 'Y', 1);
                break;
 
        case 'remove': // Do stuff when removing extension
@@ -74,7 +74,7 @@ switch (getExtensionMode()) {
        case 'update': // Update an extension
                switch (getCurrentExtensionVersion()) {
                        case '0.1.0': // SQL queries for v0.1
-                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `order_max_full` ENUM('ORDER','MAX') NOT NULL DEFAULT 'MAX'");
+                               addConfigAddSql('order_max_full', "ENUM('ORDER','MAX') NOT NULL DEFAULT 'MAX'");
                                addAdminMenuSql('setup','config_order','Mailbuchungsseite','Einstellungen am Mailbuchungsformular.',7);
 
                                // Update notes (these will be set as task text!)
@@ -141,10 +141,10 @@ switch (getExtensionMode()) {
                                break;
 
                        case '0.2.3': // SQL queries for v0.2.3
-                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD order_min BIGINT(20) UNSIGNED NOT NULL DEFAULT 10");
+                               addConfigAddSql('order_min', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 10');
 
                                // Update notes (these will be set as task text!)
-                               setExtensionUpdateNotes("Minimum an Empfänger pro Mailbuchung einstellbar. Standart: 10 Empfänger");
+                               setExtensionUpdateNotes("Minimum an Empfänger pro Mailbuchung einstellbar. Standard: 10 Empfänger");
                                break;
 
                        case '0.2.4': // SQL queries for v0.2.4
@@ -193,8 +193,8 @@ nicht die vom Mitglied eingegebene. Resultat: Das Script beschwerte sich, der Us
                                break;
 
                        case '0.3.1': // SQL queries for v0.3.1
-                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD order_select VARCHAR(255) NOT NULL DEFAULT 'userid'");
-                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD order_mode ENUM('ASC','DESC') NOT NULL DEFAULT 'DESC'");
+                               addConfigAddSql('order_select', "VARCHAR(255) NOT NULL DEFAULT 'userid'");
+                               addConfigAddSql('order_mode', "ENUM('ASC','DESC') NOT NULL DEFAULT 'DESC'");
 
                                // Update notes (these will be set as task text!)
                                setExtensionUpdateNotes("Beworbene URL wird nun getestet.");
@@ -271,8 +271,8 @@ nicht die vom Mitglied eingegebene. Resultat: Das Script beschwerte sich, der Us
                                break;
 
                        case '0.4.6': // SQL queries for v0.4.6
-                               addMemberMenuSql('order',NULL,'Mailbuchungen','N','Y',3);
-                               addMemberMenuSql('order','order2','Framekiller-Mails','N','Y',2);
+                               addMemberMenuSql('order', NULL, 'Mailbuchungen', 'N', 'Y', 3);
+                               addMemberMenuSql('order', 'order2', 'Framekiller-Mails', 'N', 'Y', 2);
                                addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `action`='order', `sort`=1, `title`='Klick-Mails' WHERE `what`='order' LIMIT 1");
 
                                // Update notes (these will be set as task text!)
@@ -292,7 +292,7 @@ nicht die vom Mitglied eingegebene. Resultat: Das Script beschwerte sich, der Us
                                break;
 
                        case '0.4.9': // SQL queries for v0.4.9
-                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD repay_deleted_mails ENUM('REPAY','JACKPOT','SHRED') NOT NULL DEFAULT 'REPAY'");
+                               addConfigAddSql('repay_deleted_mails', "ENUM('REPAY','JACKPOT','SHRED') NOT NULL DEFAULT 'REPAY'");
 
                                // Update notes (these will be set as task text!)
                                setExtensionUpdateNotes("Bei Löschung von Mailbuchungen kann nun scripteweit entschieden werden (Einstellungen also), ob die verbliebenen {?POINTS?} wieder gutgeschrieben werden sollen oder in den Jackpot landen.");
@@ -300,7 +300,7 @@ nicht die vom Mitglied eingegebene. Resultat: Das Script beschwerte sich, der Us
 
                        case '0.5.0': // SQL queries for v0.5.0
                                addDropTableSql('url_blacklist');
-                               addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_url_blacklist` (
+                               addCreateTableSql('url_blacklist', "(
 `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 `url` VARCHAR(255) NOT NULL DEFAULT '',
 `pool_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
@@ -314,10 +314,10 @@ INDEX (`pool_id`)
                                break;
 
                        case '0.5.2': // SQL queries for v0.5.2
-                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` DROP `test_text`");
-                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` DROP `test_subj`");
-                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `allow_url_in_text` ENUM('Y','N') NOT NULL DEFAULT 'N'");
-                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `allow_url_in_subject` ENUM('Y','N') NOT NULL DEFAULT 'N'");
+                               addConfigDropSql('test_text');
+                               addConfigDropSql('test_subj');
+                               addConfigAddSql('allow_url_in_text', "ENUM('Y','N') NOT NULL DEFAULT 'N'");
+                               addConfigAddSql('allow_url_in_subject', "ENUM('Y','N') NOT NULL DEFAULT 'N'");
 
                                // Update notes (these will be set as task text!)
                                setExtensionUpdateNotes("Inkonsistenz in Konfigurationsnamen korregiert.");