]> git.mxchange.org Git - mailer.git/blobdiff - inc/extensions/ext-bonus.php
Also reset (aka daily reset scripts) renamed. The naming 'reset' came from the time...
[mailer.git] / inc / extensions / ext-bonus.php
index dd020aaabab589aeb73bcf160be223a6b04ec099..cea0cbce6a76b486f315c087a580944bb7e91a8f 100644 (file)
@@ -48,6 +48,9 @@ setExtensionVersionHistory(array('0.0', '0.1.6', '0.2.0', '0.2.1', '0.2.2', '0.2
 
 switch (getExtensionMode()) {
        case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
+               // Add dependency to 'user'
+               addExtensionDependency('user');
+
                // SQL commands to run
                addAdminMenuSql('email','send_bonus','Bonusmail senden','Versenden Sie hier Bonus-Mails an alle Mitglieder oder nur an alle aus einer Kategorie. Es spielt keine Rolle, wie viele Mails bereits versendet worden, Sie können hier immer senden.', 5);
                addMemberMenuSql('main','bonus','Bonuspunkte','N','Y',7);
@@ -68,7 +71,7 @@ switch (getExtensionMode()) {
 `mails_sent` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 KEY (`cat_id`),
 PRIMARY KEY  (`id`)
-) TYPE={?_TABLE_TYPE?} COMMENT='Bonus mails'");
+) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT = 'Bonus mails'");
                addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_links` MODIFY `link_type` ENUM('NORMAL','BONUS') NOT NULL DEFAULT 'NORMAL'");
                addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_links` ADD `bonus_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
                addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_links` ADD INDEX (`bonus_id`)");
@@ -116,7 +119,7 @@ PRIMARY KEY  (`id`)
                                addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_bonus` SET `target_send`=`mails_sent` WHERE `target_send`=0 AND `mails_sent`>0 AND `receivers` != ''");
 
                                // Update notes (these will be set as task text!)
-                               setExtensionUpdateNotes("Behebt ein Versand-Problem mit den Bonus-Mails. Es wurde die Spalte target_send nicht beim Einf&uuml;gen der Buchung gessetzt. Bitte laden Sie sich dazu - wenn nicht bereits geschehen - alle Patches bis mindestens Patch 240 unter <strike>Updates pr&uuml;fen</strike> herunter.");
+                               setExtensionUpdateNotes("Behebt ein Versand-Problem mit den Bonus-Mails. Es wurde die Spalte target_send nicht beim Einf&uuml;gen der Buchung gessetzt.");
                                break;
 
                        case '0.2.1': // SQL queries for v0.2.1
@@ -148,7 +151,7 @@ PRIMARY KEY (`id`),
 INDEX `mail_id` (`mail_id`),
 INDEX `bonus_id` (`bonus_id`),
 INDEX `userid` (`userid`)
-) TYPE={?_TABLE_TYPE?}");
+) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci");
 
                                // Update notes (these will be set as task text!)
                                setExtensionUpdateNotes("Turbo-Bonus wird in Tabelle gez&auml;hlt f&uuml;r Anzeige, wer alles bereits geklickt hat und welchen Platz er gemacht hat.");
@@ -258,7 +261,7 @@ INDEX `userid` (`userid`)
                                break;
 
                        case '0.4.0': // SQL queries for v0.4.0
-                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `bonus_timeout` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('ONE_DAY')*7)."");
+                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `bonus_timeout` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getOneDay()*7)."");
                                addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `bonus_lines` BIGINT(20) UNSIGNED NOT NULL DEFAULT 10");
 
                                // Update notes (these will be set as task text!)
@@ -482,7 +485,7 @@ WHERE `last_online` < ".$mark." ORDER BY `userid` ASC");
                                break;
 
                        case '0.7.9': // SQL queries for v0.7.9
-                               setExtensionUpdateNotes("Dollarzeichen fehlte in <strong>inc/reset/reset_bonus.php</strong>, Zeile 39");
+                               setExtensionUpdateNotes("Dollarzeichen fehlte in <strong>inc/daily/daily_bonus.php</strong>, Zeile 39");
                                break;
 
                        case '0.8.0': // SQL queries for v0.8.0