X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=inc%2Fextensions%2Fext-bonus.php;h=dd020aaabab589aeb73bcf160be223a6b04ec099;hb=7abe06638f99ea90073779a154dd845a85376366;hp=f16ac0143d856170194cc8003c4a98af8cc1bbdd;hpb=dbb6aa4eaeff7c3bab27f143d881781380d43d41;p=mailer.git
diff --git a/inc/extensions/ext-bonus.php b/inc/extensions/ext-bonus.php
index f16ac0143d..dd020aaaba 100644
--- a/inc/extensions/ext-bonus.php
+++ b/inc/extensions/ext-bonus.php
@@ -1,7 +1,7 @@
paidlinks.");
+ setExtensionUpdateNotes("Paid-Links wurden verschoben in die Erweiterung sponsor.");
break;
case '0.2.0': // SQL queries for v0.2.0
- addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_bonus` SET target_send=mails_sent WHERE target_send=0 AND mails_sent>0 AND receivers != ''");
+ 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ügen der Buchung gessetzt. Bitte laden Sie sich dazu - wenn nicht bereits geschehen - alle Patches bis mindestens Patch 240 unter Updates prüfen herunter.");
+ setExtensionUpdateNotes("Behebt ein Versand-Problem mit den Bonus-Mails. Es wurde die Spalte target_send nicht beim Einfügen der Buchung gessetzt. Bitte laden Sie sich dazu - wenn nicht bereits geschehen - alle Patches bis mindestens Patch 240 unter Updates prüfen herunter.");
break;
case '0.2.1': // SQL queries for v0.2.1
- addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what`='config_bonus' LIMIT 1");
- addAdminMenuSql('setup','config_bonus','Bonus-{?POINTS?}',8,'Richten Sie Bonus-{?POINTS?} ein, die beim x'ten Klick auf die Mail verbucht werden sollen. Beispiele: Der 1. Klick sollte mehr {?POINTS?} zusätzlich bekommen, als der 10. Klick.');
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD login_bonus FLOAT(20,3) NOT NULL DEFAULT 10.000");
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD turbo_bonus FLOAT(20,3) NOT NULL DEFAULT 100.000");
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD login_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT ".getConfig('ONE_DAY')."");
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD turbo_rates VARCHAR(255) NOT NULL DEFAULT '50;20;10'");
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD bonus_ranks TINYINT(3) UNSIGNED NOT NULL DEFAULT 10");
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `login_bonus` FLOAT(20,3) NOT NULL DEFAULT 10.000");
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `turbo_bonus` FLOAT(20,3) NOT NULL DEFAULT 100.000");
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `login_timeout` BIGINT(20) UNSIGNED NOT NULL DEFAULT {?ONE_DAY?}");
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `turbo_rates` VARCHAR(255) NOT NULL DEFAULT '50;20;10'");
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `bonus_ranks` TINYINT(3) UNSIGNED NOT NULL DEFAULT 10");
// Use actual month for this update
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD login_bonus FLOAT(20,3) NOT NULL DEFAULT 0.000");
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD turbo_bonus FLOAT(20,3) NOT NULL DEFAULT 0.000");
- addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_extensions` SET ext_has_css='Y' WHERE `ext_name`='bonus' AND ext_has_css='N' LIMIT 1");
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `login_bonus` FLOAT(20,3) NOT NULL DEFAULT 0.000");
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `turbo_bonus` FLOAT(20,3) NOT NULL DEFAULT 0.000");
+ addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_extensions` SET `ext_has_css`='Y' WHERE `ext_name`='bonus' AND `ext_has_css`='N' LIMIT 1");
// Update notes (these will be set as task text!)
setExtensionUpdateNotes("Login-Bonus und Turbo-Klick-Bonus intergriert.");
break;
case '0.2.2': // SQL queries for v0.2.2
- addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_bonus_turbo`");
+ addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_bonus_turbo`');
addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_bonus_turbo` (
-id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
-userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
-mail_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
-bonus_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
-level BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
-points FLOAT(20,3) NOT NULL DEFAULT '0.000',
-timemark VARCHAR(32) NOT NULL DEFAULT 0,
-PRIMARY KEY (id),
-KEY mail_id (mail_id),
-KEY bonus_id (bonus_id),
-KEY userid (userid)
+`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
+`userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+`mail_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+`bonus_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+`level` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+`points` FLOAT(20,3) NOT NULL DEFAULT '0.000',
+`timemark` VARCHAR(32) NOT NULL DEFAULT 0,
+PRIMARY KEY (`id`),
+INDEX `mail_id` (`mail_id`),
+INDEX `bonus_id` (`bonus_id`),
+INDEX `userid` (`userid`)
) TYPE={?_TABLE_TYPE?}");
// Update notes (these will be set as task text!)
@@ -170,11 +168,11 @@ KEY userid (userid)
break;
case '0.2.5': // SQL queries for v0.2.5
- addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_bonus_urls`");
- addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_bonus_customer`");
+ addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_bonus_urls`');
+ addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_bonus_customer`');
// Update notes (these will be set as task text!)
- setExtensionUpdateNotes("Tabellen {?_MYSQL_PREFIX?}_bonus_urls und {?_MYSQL_PREFIX?}_bonus_customer entfernt, da dies bald von der Erweiterung paidlinks erledigt wird.");
+ setExtensionUpdateNotes("Tabellen {?_MYSQL_PREFIX?}_bonus_urls und {?_MYSQL_PREFIX?}_bonus_customer entfernt, da dies bald von der Erweiterung sponsor erledigt wird.");
break;
case '0.2.6': // SQL queries for v0.2.6
@@ -188,12 +186,12 @@ KEY userid (userid)
break;
case '0.2.8': // SQL queries for v0.2.8
- addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_bonus` SET timestamp=0 WHERE timestamp='0000000000'");
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_bonus_turbo` CHANGE points points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` CHANGE turbo_bonus turbo_bonus FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` CHANGE login_bonus login_bonus FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` CHANGE turbo_bonus turbo_bonus FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` CHANGE login_bonus login_bonus FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+ addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_bonus` SET `timestamp`=0 WHERE `timestamp`='0000000000'");
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_bonus_turbo` CHANGE `points` `points` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` CHANGE `turbo_bonus` `turbo_bonus` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` CHANGE `login_bonus` `login_bonus` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` CHANGE `turbo_bonus` `turbo_bonus` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` CHANGE `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");
@@ -283,13 +281,13 @@ KEY userid (userid)
break;
case '0.4.4': // SQL queries for v0.4.4
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD bonus_order FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 15.00000");
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD bonus_ref FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 100.00000");
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD bonus_stats FLOAT(20,5) UNSIGNED NOT NULL DEFAULT '5.00000'");
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD bonus_active ENUM('Y','N') NOT NULL DEFAULT 'Y'");
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD bonus_order FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD bonus_ref FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD bonus_stats FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `bonus_order` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 15.00000");
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `bonus_ref` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 100.00000");
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `bonus_stats` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT '5.00000'");
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `bonus_active` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `bonus_order` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `bonus_ref` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `bonus_stats` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
// Update notes (these will be set as task text!)
setExtensionUpdateNotes("Bonus-{?POINTS?} für: Mailbestellung, Referal-Werbung (bei Best. der EMail-Adresse) und wenn 100% Klickrate jeder Mailbuchung erreicht wurde.
Template admin_config_bonus_pro.tpl ist überflüssig geworden. Bitte löschen Sie dies!
Eingestellte Bonus-{?POINTS?} für Rank 2 war um eins verschoben.");
@@ -306,7 +304,7 @@ KEY userid (userid)
break;
case '0.4.7': // SQL queries for v0.4.7
- addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET login_bonus=0, turbo_bonus=0,bonus_ref=0,bonus_order=0,bonus_stats=0");
+ addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `login_bonus`=0, `turbo_bonus`=0, `bonus_ref`=0, `bonus_order`=0, `bonus_stats`=0");
// Update notes (these will be set as task text!)
setExtensionUpdateNotes("Die Aktiv-Rallye wurde nicht auf 0 {?POINTS?} gesetzt. Dieser Fehler ist nun behoben. Allerdings ist mit diesem Update auch die Aktiv-Rallye zurückgesetzt worden.");
@@ -334,7 +332,7 @@ KEY userid (userid)
case '0.5.2': // SQL queries for v0.5.2
// Update notes (these will be set as task text!)
- setExtensionUpdateNotes("Wörter Mailtausch, Mailtausches und Mailtauscher sind austauschbar.");
+ setExtensionUpdateNotes("Wörter {?mt_word?}, {?mt_word2?} und {?mt_word3?} sind austauschbar.");
break;
case '0.5.3': // SQL queries for v0.5.3
@@ -354,12 +352,12 @@ KEY userid (userid)
case '0.5.6': // SQL queries for v0.5.6
// Get current month
- $curr = date('m', time());
- if (strlen($curr) == 1) $curr = 0 . $curr;
- if ($curr == "00") $curr = "12";
+ $curr = getMonth();
+ if (strlen($curr) == 1) $curr = '0' . $curr;
+ if ($curr == '00') $curr = '12';
// Generate timemark...
- $mark = mktime(0, 0, 0, $curr, 1, date('Y', time()));
+ $mark = mktime(0, 0, 0, $curr, 1, getYear());
// Update accounts which are not active last months
addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_user_data`
@@ -399,8 +397,6 @@ WHERE `last_online` < ".$mark." ORDER BY `userid` ASC");
break;
case '0.6.4': // SQL queries for v0.6.4
- addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET `title`='Aktiv-Rallye' WHERE `what`='config_bonus' LIMIT 1");
-
// Update notes (these will be set as task text!)
setExtensionUpdateNotes("Der Menüpunkt "Bonus-{?POINTS?}" unter Einstellungen wird nach "Aktiv-Rallye umbenannt. Und die Aktiv-Rallye konnte aufgrund eines Template-Fehlers nicht gespeichert werden.");
break;
@@ -463,18 +459,18 @@ WHERE `last_online` < ".$mark." ORDER BY `userid` ASC");
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 User-IDs nicht berücksichtig.");
+ setExtensionUpdateNotes("Auswahlmechanismus der Gewinner repariert. Trotz Hinzuschalten von weiteren zu berücksichtigen Boni wurden diese bei der Sortierung der Mitglieder-Ids nicht berücksichtig.");
break;
case '0.7.7': // SQL queries for v0.7.7
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD bonus_en_notify ENUM('Y','N') NOT NULL DEFAULT 'N'");
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD bonus_di_notify ENUM('Y','N') NOT NULL DEFAULT 'N'");
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD bonus_new_mem_notify ENUM('Y','N') NOT NULL DEFAULT 'N'");
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD bonus_notify_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD bonus_notify_wait BIGINT(20) UNSIGNED NOT NULL DEFAULT '30'");
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD bonus_ral_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD bonus_ral_en_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD bonus_ral_di_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `bonus_en_notify` ENUM('Y','N') NOT NULL DEFAULT 'N'");
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `bonus_di_notify` ENUM('Y','N') NOT NULL DEFAULT 'N'");
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `bonus_new_mem_notify` ENUM('Y','N') NOT NULL DEFAULT 'N'");
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `bonus_notify_points` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `bonus_notify_wait` BIGINT(20) UNSIGNED NOT NULL DEFAULT '30'");
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `bonus_ral_en_notify` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `bonus_ral_di_notify` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `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.");
@@ -502,7 +498,7 @@ WHERE `last_online` < ".$mark." ORDER BY `userid` ASC");
addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_bonus` ADD is_notify ENUM('Y','N') NOT NULL DEFAULT 'N'");
// Update notes (these will be set as task text!)
- setExtensionUpdateNotes("Eigene User-ID von Aktiv-Rallye ausschliessbar. Benachrichtigungsmails sind von Aktiv-Rallye ausgeschlossen.");
+ setExtensionUpdateNotes("Eigene Mitglieder-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
@@ -537,7 +533,49 @@ WHERE `last_online` < ".$mark." ORDER BY `userid` ASC");
// Update notes
setExtensionUpdateNotes("Benachrichtigungsmails für z.B. Bettel- oder Aktiv-Rallye werden nun angezeigt.");
break;
- }
+
+ case '0.8.9': // SQL queries for v0.8.9
+ addAdminMenuSql('setup','config_bonus','Aktiv-Rallye','Richten Sie eine komplette Aktiv-Rallye hier ein. Legen Sie Vergütungen fest, die die Mitglieder für bestimmte Aktionen auf ihr Aktiv-Konto gutgeschrieben bekommen sollen.',8);
+
+ // Update notes
+ setExtensionUpdateNotes("Benachrichtigungsmails für z.B. Bettel- oder Aktiv-Rallye werden nun angezeigt.");
+ break;
+
+ case '0.9.0': // SQL queries for v0.9.0
+ // Register filter
+ registerFilter('member_login_check', 'ADD_LOGIN_BONUS', false, true, isExtensionDryRun());
+
+ // Update notes
+ setExtensionUpdateNotes("Filter hinzugefügt der den Login-Bonus aktualisiert (bzw. soll) (internes TODO).");
+ break;
+
+ case '0.9.1': // SQL queries for v0.9.1
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` CHANGE `bonus_en_notify` `bonus_enable_notify` ENUM('Y','N') NOT NULL DEFAULT 'N'");
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` CHANGE `bonus_di_notify` `bonus_disable_notify` ENUM('Y','N') NOT NULL DEFAULT 'N'");
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` CHANGE `bonus_new_mem_notify` `bonus_new_member_notify` ENUM('Y','N') NOT NULL DEFAULT 'N'");
+
+ // Update notes
+ setExtensionUpdateNotes("Umbenannt nach neuer Konvention (bitte Einstellungen kontrollieren).");
+ break;
+
+ case '0.9.2': // SQL queries for v0.9.2
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` CHANGE `bonus_ral_en_notify` `bonus_ralley_enable_notify` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` CHANGE `bonus_ral_di_notify` `bonus_ralley_disable_notify` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` CHANGE `bonus_ral_notify` `bonus_rallley_notify` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+
+ // Update notes
+ setExtensionUpdateNotes("Umbenannt nach neuer Konvention (bitte Einstellungen kontrollieren).");
+ break;
+
+ case '0.9.3': // SQL queries for v0.9.3
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` CHANGE `bonus_ralley_enable_notify` `bonus_rallye_enable_notify` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` CHANGE `bonus_ralley_disable_notify` `bonus_rallye_disable_notify` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` DROP `bonus_ralley_notify` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+
+ // Update notes
+ setExtensionUpdateNotes("Typos gefixt.");
+ break;
+ } // END - switch
break;
case 'modify': // When the extension got modified
@@ -547,29 +585,15 @@ WHERE `last_online` < ".$mark." ORDER BY `userid` ASC");
break;
case 'init': // Do stuff when extension is initialized
- if (isResetModeEnabled() && (!isDebugModeEnabled()) && (getOutputMode() != 1)) {
- // Daily reset was run so let's check if active rallye is activated
- if (getConfig('bonus_active') == 'Y') {
- // Run active rallye
- addIncludeToPool('reset', 'inc/monthly/monthly_bonus.php');
- } else {
- // Reset points
- addIncludeToPool('reset', 'inc/reset/reset_bonus.php');
- }
- } // END - if
-
// Check for bonus rallye is active and send mails out
- if ((getConfig('bonus_active') == 'Y') && (getConfig('bonus_new_mem_notify') == 'Y')) {
+ if ((isBonusRallyeActive()) && (isBonusNewMemberNotifyEnabled())) {
// Include file for sending out mails
addIncludeToPool('notify', 'inc/mails/bonus_mails.php');
} // END - if
break;
- case 'init': // Do stuff when extension is initialized
- break;
-
default: // Unknown extension mode
- DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown extension mode %s detected.", getExtensionMode()));
+ logDebugMessage(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName()));
break;
} // END - switch