]> git.mxchange.org Git - mailer.git/blobdiff - inc/extensions/ext-bonus.php
Rewrote handling of 'menu adverts' to a filter. This allows e.g. ext-clickbanner...
[mailer.git] / inc / extensions / ext-bonus.php
index b2bc87acd55eac50fb4aff845fff05e838bcc622..640f8384c45ac48740773252a2741d1105fcc11c 100644 (file)
@@ -74,7 +74,7 @@ INDEX (`cat_id`)",
                        'Bonus mails');
 
                addExtensionAddTableColumnSql('user_links', 'bonus_id', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 0');
-               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_links` ADD INDEX (`bonus_id`)");
+               addExtensionAddTableIndexSql('user_links', 'bonus_id', '(`bonus_id`)');
                addExtensionAddTableColumnSql('bonus', 'html_msg', "ENUM('Y','N') NOT NULL DEFAULT 'N'");
                break;
 
@@ -203,8 +203,8 @@ INDEX `userid` (`userid`)",
                                addExtensionChangeTableColumnSql('user_data', 'login_bonus', 'login_bonus', 'FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000');
 
                                // For configuration, we need different entries
-                               addConfigChangeSql('user_data', 'turbo_bonus', 'turbo_bonus', 'FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000');
-                               addConfigChangeSql('user_data', 'login_bonus', 'login_bonus', 'FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000');
+                               addExtensionAddTableColumnSql('user_data', 'turbo_bonus', 'turbo_bonus', 'FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000');
+                               addExtensionAddTableColumnSql('user_data', 'login_bonus', 'login_bonus', 'FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000');
 
                                // Update notes (these will be set as task text!)
                                setExtensionUpdateNotes("5 Nachkommastellen implementiert");
@@ -365,8 +365,7 @@ INDEX `userid` (`userid`)",
 
                        case '0.5.6': // SQL queries for v0.5.6
                                // Get current month
-                               $curr = getMonth();
-                               if (strlen($curr) == 1) $curr = '0' . $curr;
+                               $curr = str_pad(getMonth(), 2, '0', STR_PAD_LEFT);
                                if ($curr == '00') $curr = '12';
 
                                // Generate timemark...
@@ -481,7 +480,7 @@ ORDER BY
                                break;
 
                        case '0.7.6': // SQL queries for v0.7.6
-                               setExtensionUpdateNotes("Auswahlmechanismus der Gewinner repariert. Trotz Hinzuschalten von weiteren zu berücksichtigen Boni wurden diese bei der Sortierung der Mitglied-Ids nicht berücksichtig.");
+                               setExtensionUpdateNotes("Auswahlmechanismus der Gewinner repariert. Trotz Hinzuschalten von weiteren zu berücksichtigen Boni wurden diese bei der Sortierung der Mitglieds-Ids nicht berücksichtig.");
                                break;
 
                        case '0.7.7': // SQL queries for v0.7.7
@@ -490,9 +489,9 @@ ORDER BY
                                addConfigAddSql('bonus_new_mem_notify', "ENUM('Y','N') NOT NULL DEFAULT 'N'");
                                addConfigAddSql('bonus_notify_points', 'FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000');
                                addConfigAddSql('bonus_notify_wait', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 30');
-                               addExtensionAddTableColumnSql('online', 'bonus_ral_en_notify', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 0');
-                               addExtensionAddTableColumnSql('online', 'bonus_ral_di_notify', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 0');
-                               addExtensionAddTableColumnSql('online', 'bonus_ral_notify', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 0');
+                               addExtensionAddTableColumnSql('user_data', 'bonus_ral_en_notify', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 0');
+                               addExtensionAddTableColumnSql('user_data', 'bonus_ral_di_notify', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 0');
+                               addExtensionAddTableColumnSql('user_data', 'bonus_ral_notify', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 0');
 
                                // Update notes (these will be set as task text!)
                                setExtensionUpdateNotes("Optionale automatische Benachrichtigung über aktivierte und/oder deaktivierte Aktiv-Rallye einstellbar.");
@@ -520,7 +519,7 @@ ORDER BY
                                addExtensionAddTableColumnSql('bonus', 'is_notify', "ENUM('Y','N') NOT NULL DEFAULT 'N'");
 
                                // Update notes (these will be set as task text!)
-                               setExtensionUpdateNotes("Eigene Mitglied-Ids sind von der Aktiv-Rallye nun ausschliessbar. Benachrichtigungsmails sind von Aktiv-Rallye ausgeschlossen.");
+                               setExtensionUpdateNotes("Eigene Mitglieds-Ids sind von der Aktiv-Rallye nun ausschliessbar. Benachrichtigungsmails sind von Aktiv-Rallye ausgeschlossen.");
                                break;
 
                        case '0.8.3': // SQL queries for v0.8.3
@@ -581,9 +580,9 @@ ORDER BY
                                break;
 
                        case '0.9.2': // SQL queries for v0.9.2
-                               addExtensionChangeTableColumnSql('user_data', 'bonus_ral_en_notify` `bonus_ralley_enable_notify` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0');
-                               addExtensionChangeTableColumnSql('user_data', 'bonus_ral_di_notify` `bonus_ralley_disable_notify` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0');
-                               addExtensionChangeTableColumnSql('user_data', 'bonus_ral_notify` `bonus_rallley_notify` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0');
+                               addExtensionChangeTableColumnSql('user_data', 'bonus_ral_en_notify', 'bonus_ralley_enable_notify', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 0');
+                               addExtensionChangeTableColumnSql('user_data', 'bonus_ral_di_notify', 'bonus_ralley_disable_notify', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 0');
+                               addExtensionChangeTableColumnSql('user_data', 'bonus_ral_notify', 'bonus_rallley_notify` BIGINT(20)', 'UNSIGNED NOT NULL DEFAULT 0');
 
                                // Update notes
                                setExtensionUpdateNotes("Umbenannt nach neuer Konvention (bitte Einstellungen kontrollieren).");