Heacy rewrite/cleanup:
[mailer.git] / inc / extensions / rallye / mode-update.php
1 <?php
2 /************************************************************************
3  * Mailer v0.2.1-FINAL                                Start: 06/25/2013 *
4  * ===================                          Last change: 06/25/2013 *
5  *                                                                      *
6  * -------------------------------------------------------------------- *
7  * File              : mode-update.php                                  *
8  * -------------------------------------------------------------------- *
9  * Short description : Referral rallye                                  *
10  * -------------------------------------------------------------------- *
11  * Kurzbeschreibung  : Referral Rallyes starten                         *
12  * -------------------------------------------------------------------- *
13  * $Revision::                                                        $ *
14  * $Date::                                                            $ *
15  * $Tag:: 0.2.1-FINAL                                                 $ *
16  * $Author::                                                          $ *
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                      *
21  *                                                                      *
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.                                  *
26  *                                                                      *
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.                         *
31  *                                                                      *
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,               *
35  * MA  02110-1301  USA                                                  *
36  ************************************************************************/
37
38 // Some security stuff...
39 if (!defined('__SECURITY')) {
40         die();
41 } // END - if
42
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'");
47
48                                 // Update notes (these will be set as task text!)
49                                 setExtensionUpdateNotes("Ablaufen der Rallyes intergriert.");
50                                 break;
51
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');
54
55                                 // Update notes (these will be set as task text!)
56                                 setExtensionUpdateNotes("Aktueller {?POINTS?}-Stand wird beachtet.");
57                                 break;
58
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.");
62                                 break;
63
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.");
67                                 break;
68
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");
72                                 break;
73
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.");
77                                 break;
78
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');
81
82                                 // Update notes (these will be set as task text!)
83                                 setExtensionUpdateNotes("5 Nachkommastellen implementiert.");
84                                 break;
85
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.");
89                                 break;
90
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.");
94                                 break;
95
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.");
99                                 break;
100
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.");
104                                 break;
105
106                         case '0.1.5': // SQL queries for v0.1.5
107                                 // Update notes (these will be set as task text!)
108                                 setExtensionUpdateNotes("Men&uuml;punkte im Gast-/Mitgliedsbereich k&ouml;nnen nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist.");
109                                 break;
110
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> &uuml;berfl&uuml;ssige HTML-Tags entfernt.");
114                                 break;
115
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)");
119                                 break;
120
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&uuml;ndigung repariert.");
124                                 break;
125
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.");
129                                 break;
130
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');
134
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 />
137 <ul>
138   <li>&#36;DATA&#91;min_users&#93;</li>
139   <li>&#36;DATA&#91;min_prices&#93;</li>
140 </ul>
141 Zudem sollten Sie mindestens folgende Templates (in <strong>templates/".getLanguage()."/html/guest/</strong> !) aktualisieren:<br />
142 <ul>
143   <li><strong>guest_rallye_footer.tpl</strong></li>
144   <li><strong>guest_rallye_header.tpl</strong></li>
145 </ul>");
146                                 break;
147
148                         case '0.2.1': // SQL queries for v0.2.1
149                                 // Update notes (these will be set as task text!)
150                                 setExtensionUpdateNotes("W&ouml;rter <strong>{?mt_word?}</strong>, <strong>{?mt_word2?}</strong> und <strong>{?mt_word3?}</strong> sind austauschbar.");
151                                 break;
152
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&auml;ndert.");
156                                 break;
157
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.");
161                                 break;
162
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.");
166                                 break;
167
168                         case '0.2.5': // SQL queries for v0.2.5
169                                 // Update notes (these will be set as task text!)
170                                 setExtensionUpdateNotes("Men&uuml;punkt &quot;Rallyes verwalten&quot; repariert.");
171                                 break;
172
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.");
176                                 break;
177
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.");
181                                 break;
182
183                         case '0.2.8': // SQL queries for v0.2.8
184                                 // Update notes (these will be set as task text!)
185
186                                 setExtensionUpdateNotes("Vorbereitung auf die neue Mediendaten v0.0.4.");
187                                 break;
188
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&uuml;r die Include-Befehle.");
192                                 break;
193
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.");
197                                 break;
198
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&uuml;r automatisch generierte Admin-Kontaktlinks ge&auml;ndert.");
202                                 break;
203
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");
206
207                                 // Update notes (these will be set as task text!)
208                                 setExtensionUpdateNotes("Mitgliedsmen&uuml; komplett umgebaut.");
209                                 break;
210
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.");
214                                 break;
215
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.");
219                                 break;
220
221                         case '0.3.5': // SQL queries for 0.3.5
222                                 // Register filter
223                                 registerFilter(__FILE__, __LINE__, 'extra_autopurge', 'RALLYE_EXTRA_AUTOPURGE', FALSE, TRUE, isExtensionDryRun());
224
225                                 // Update notes (these will be set as task text!)
226                                 setExtensionUpdateNotes("Filter hinzugef&uuml;gt und ist von <strong>sql_patches</strong> abh&auml;ngig.");
227                                 break;
228
229                         case '0.3.6': // SQL queries for v0.3.6
230                                 // Register points data
231                                 registerExtensionPointsData('rallye_winner', 'points', 'LOCKED', 'DIRECT');
232
233                                 // Update notes
234                                 setExtensionUpdateNotes("Gewinn aus der Referral-Rallye wird nun &uuml;ber die Tabelle <strong>{OPEN_CONFIG}_MYSQL_PREFIX{CLOSE_CONFIG}_points_data</strong> verwaltet.");
235                                 break;
236
237                         case '0.3.7': // SQL queries for v0.3.7
238                                 // Register filter
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());
241
242                                 // Update notes
243                                 setExtensionUpdateNotes("Weitere Filter hinzugef&uuml;gt.");
244                                 break;
245
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");
248
249                                 // Update notes
250                                 setExtensionUpdateNotes("Men&uuml; umbenannt, da &quot;config&quot; nur f&uuml;r die Konfigurationstabelle <strong>{?_MYSQL_PREFIX?}_config</strong> ist.");
251                                 break;
252                 } // END - switch
253
254 // [EOF]
255 ?>