2 /************************************************************************
3 * Mailer v0.2.1-FINAL Start: 06/25/2013 *
4 * =================== Last change: 06/25/2013 *
6 * -------------------------------------------------------------------- *
7 * File : mode-update.php *
8 * -------------------------------------------------------------------- *
9 * Short description : Referral rallye *
10 * -------------------------------------------------------------------- *
11 * Kurzbeschreibung : Referral Rallyes starten *
12 * -------------------------------------------------------------------- *
15 * $Tag:: 0.2.1-FINAL $ *
17 * -------------------------------------------------------------------- *
18 * Copyright (c) 2003 - 2009 by Roland Haeder *
19 * Copyright (c) 2009 - 2013 by Mailer Developer Team *
20 * For more information visit: http://mxchange.org *
22 * This program is free software; you can redistribute it and/or modify *
23 * it under the terms of the GNU General Public License as published by *
24 * the Free Software Foundation; either version 2 of the License, or *
25 * (at your option) any later version. *
27 * This program is distributed in the hope that it will be useful, *
28 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
29 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
30 * GNU General Public License for more details. *
32 * You should have received a copy of the GNU General Public License *
33 * along with this program; if not, write to the Free Software *
34 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, *
36 ************************************************************************/
38 // Some security stuff...
39 if (!defined('__SECURITY')) {
43 // @TODO Remove double tabs from all lines
44 switch (getCurrentExtensionVersion()) {
45 case '0.0.1': // SQL queries for v0.0.1
46 addExtensionAddTableColumnSql('rallye_data', 'expired', "ENUM('Y','N') NOT NULL DEFAULT 'N'");
48 // Update notes (these will be set as task text!)
49 setExtensionUpdateNotes("Ablaufen der Rallyes intergriert.");
52 case '0.0.2': // SQL queries for v0.0.2
53 addExtensionAddTableColumnSql('rallye_users', 'curr_points', 'FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000');
55 // Update notes (these will be set as task text!)
56 setExtensionUpdateNotes("Aktueller {?POINTS?}-Stand wird beachtet.");
59 case '0.0.6': // SQL queries for v0.0.6
60 // Update notes (these will be set as task text!)
61 setExtensionUpdateNotes("Fehler <span class=\"notice\">Unknown column 'd.useid' in 'on clause'</span> behoben.");
64 case '0.0.7': // SQL queries for v0.0.7
65 // Update notes (these will be set as task text!)
66 setExtensionUpdateNotes("Fehlende Abfrage im Mitlieder-Modul, on Erweiterung auch aktiviert ist.");
69 case '0.0.8': // SQL queries for v0.0.8
70 // Update notes (these will be set as task text!)
71 setExtensionUpdateNotes("Fehler <u>Template nicht gefunden</u> behoben und Admin-Formulare ausgelagert");
74 case '0.0.9': // SQL queries for v0.0.9
75 // Update notes (these will be set as task text!)
76 setExtensionUpdateNotes("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist. Und der vorherige Fehler <u>Template nicht gefunden</u> ist endlich beseitigt.");
79 case '0.1.0': // SQL queries for v0.2.1
80 addExtensionChangeTableColumnSql('rallye_users', 'curr_points', 'curr_points', 'FLOAT(23,5) UNSIGNED NOT NULL DEFAULT 0.00000');
82 // Update notes (these will be set as task text!)
83 setExtensionUpdateNotes("5 Nachkommastellen implementiert.");
86 case '0.1.1': // SQL queries for v0.1.1
87 // Update notes (these will be set as task text!)
88 setExtensionUpdateNotes("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
91 case '0.1.2': // SQL queries for v0.1.2
92 // Update notes (these will be set as task text!)
93 setExtensionUpdateNotes("Problem mit Speicherung der Einstellungen beseitigt.");
96 case '0.1.3': // SQL queries for v0.1.3
97 // Update notes (these will be set as task text!)
98 setExtensionUpdateNotes("Anzeigefehler im Gast-/Mitgliedsbereich behoben.");
101 case '0.1.4': // SQL queries for v0.1.4
102 // Update notes (these will be set as task text!)
103 setExtensionUpdateNotes("Admin-Mails korregiert.");
106 case '0.1.5': // SQL queries for v0.1.5
107 // Update notes (these will be set as task text!)
108 setExtensionUpdateNotes("Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist.");
111 case '0.1.6': // SQL queries for v0.1.6
112 // Update notes (these will be set as task text!)
113 setExtensionUpdateNotes("Seit <strong>Patch 340</strong> überflüssige HTML-Tags entfernt.");
116 case '0.1.7': // SQL queries for v0.1.7
117 // Update notes (these will be set as task text!)
118 setExtensionUpdateNotes("Aktivierte bzw. abgelaufene Rallyes werden nur ausserhalb des CSS-Modus geladen (wenn also nicht css.php aufgerufen wurde)");
121 case '0.1.8': // SQL queries for v0.1.8
122 // Update notes (these will be set as task text!)
123 setExtensionUpdateNotes("Weitere Templates vom Admin-Bereich ausgelagert und Referral-Anazahl in der Mail zur Rallye-Ankündigung repariert.");
126 case '0.1.9': // SQL queries for v0.1.9
127 // Update notes (these will be set as task text!)
128 setExtensionUpdateNotes("Funktion <u>generateUserProfileLink()</u> mit Verlinkung auf Referral-Liste implementiert.");
131 case '0.2.0': // SQL queries for v0.2.0
132 addExtensionAddTableColumnSql('rallye_data', 'min_users', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 0');
133 addExtensionAddTableColumnSql('rallye_data', 'min_prices', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 3');
135 // Update notes (these will be set as task text!)
136 setExtensionUpdateNotes("Ablaufen der Rallyes intergriert. Bauen Sie in Ihr Template <strong>templates/de/emails/member/member_rallye_notify.tpl</strong> folgende zwei Zeilen ein:<br />
138 <li>$DATA[min_users]</li>
139 <li>$DATA[min_prices]</li>
141 Zudem sollten Sie mindestens folgende Templates (in <strong>templates/".getLanguage()."/html/guest/</strong> !) aktualisieren:<br />
143 <li><strong>guest_rallye_footer.tpl</strong></li>
144 <li><strong>guest_rallye_header.tpl</strong></li>
148 case '0.2.1': // SQL queries for v0.2.1
149 // Update notes (these will be set as task text!)
150 setExtensionUpdateNotes("Wörter <strong>{?mt_word?}</strong>, <strong>{?mt_word2?}</strong> und <strong>{?mt_word3?}</strong> sind austauschbar.");
153 case '0.2.2': // SQL queries for v0.2.2
154 // Update notes (these will be set as task text!)
155 setExtensionUpdateNotes("Links wegen <strong>what=admins_contct</strong> geändert.");
158 case '0.2.3': // SQL queries for v0.2.3
159 // Update notes (these will be set as task text!)
160 setExtensionUpdateNotes("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert.");
163 case '0.2.4': // SQL queries for v0.2.4
164 // Update notes (these will be set as task text!)
165 setExtensionUpdateNotes("Abspeichern von Einstellungen repariert.");
168 case '0.2.5': // SQL queries for v0.2.5
169 // Update notes (these will be set as task text!)
170 setExtensionUpdateNotes("Menüpunkt "Rallyes verwalten" repariert.");
173 case '0.2.6': // SQL queries for v0.2.6
174 // Update notes (these will be set as task text!)
175 setExtensionUpdateNotes("Automatisches Starten von Referral-Rallyes repariert.");
178 case '0.2.7': // SQL queries for v0.2.7
179 // Update notes (these will be set as task text!)
180 setExtensionUpdateNotes("Fatalen Fehler beseitigt.");
183 case '0.2.8': // SQL queries for v0.2.8
184 // Update notes (these will be set as task text!)
186 setExtensionUpdateNotes("Vorbereitung auf die neue Mediendaten v0.0.4.");
189 case '0.2.9': // SQL queries for v0.2.9
190 // Update notes (these will be set as task text!)
191 setExtensionUpdateNotes("Sicherheitsupdate für die Include-Befehle.");
194 case '0.3.0': // SQL queries for v0.3.0
195 // Update notes (these will be set as task text!)
196 setExtensionUpdateNotes("if-Anweisungen auf Funktion <strong>empty()</strong> umgestellt.");
199 case '0.3.1': // SQL queries for v0.3.1
200 // Update notes (these will be set as task text!)
201 setExtensionUpdateNotes("Erweiterung für automatisch generierte Admin-Kontaktlinks geändert.");
204 case '0.3.2': // SQL queries for v0.3.2
205 addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `action`='rals',`title`='Referral-Rallye',`sort`=1 WHERE `what`='rallyes' LIMIT 1");
207 // Update notes (these will be set as task text!)
208 setExtensionUpdateNotes("Mitgliedsmenü komplett umgebaut.");
211 case '0.3.3': // SQL queries for v0.3.3
212 // Update notes (these will be set as task text!)
213 setExtensionUpdateNotes("Rallyes werden nun nur dann automatisch beseitigt, wenn die Erweiterung <strong>autopurge</strong> installiert und aktiviert ist.");
216 case '0.3.4': // SQL queries for v0.3.4
217 // Update notes (these will be set as task text!)
218 setExtensionUpdateNotes("Fehlerhinweis bei deaktivierter Erweiterung verbessert.");
221 case '0.3.5': // SQL queries for 0.3.5
223 registerFilter(__FILE__, __LINE__, 'extra_autopurge', 'RALLYE_EXTRA_AUTOPURGE', FALSE, TRUE, isExtensionDryRun());
225 // Update notes (these will be set as task text!)
226 setExtensionUpdateNotes("Filter hinzugefügt und ist von <strong>sql_patches</strong> abhängig.");
229 case '0.3.6': // SQL queries for v0.3.6
230 // Register points data
231 registerExtensionPointsData('rallye_winner', 'points', 'LOCKED', 'DIRECT');
234 setExtensionUpdateNotes("Gewinn aus der Referral-Rallye wird nun über die Tabelle <strong>{OPEN_CONFIG}_MYSQL_PREFIX{CLOSE_CONFIG}_points_data</strong> verwaltet.");
237 case '0.3.7': // SQL queries for v0.3.7
239 registerFilter(__FILE__, __LINE__, 'init', 'RALLYE_NOTIFY_USERS', FALSE, TRUE, isExtensionDryRun());
240 registerFilter(__FILE__, __LINE__, 'add_rallye_notify_sqls', 'ADD_RALLYE_SQL_COLUMNS', FALSE, TRUE, isExtensionDryRun());
243 setExtensionUpdateNotes("Weitere Filter hinzugefügt.");
246 case '0.3.8': // SQL queries for v0.3.8
247 addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET `what`='list_rallye_prices' WHERE `action`='rallye' AND `what`='config_rallye_prices' LIMIT 1");
250 setExtensionUpdateNotes("Menü umbenannt, da "config" nur für die Konfigurationstabelle <strong>{?_MYSQL_PREFIX?}_config</strong> ist.");