Added update_year.sh (still not fully flexible) and updated all years with it.
[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  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
14  * Copyright (c) 2009 - 2015 by Mailer Developer Team                   *
15  * For more information visit: http://mxchange.org                      *
16  *                                                                      *
17  * This program is free software; you can redistribute it and/or modify *
18  * it under the terms of the GNU General Public License as published by *
19  * the Free Software Foundation; either version 2 of the License, or    *
20  * (at your option) any later version.                                  *
21  *                                                                      *
22  * This program is distributed in the hope that it will be useful,      *
23  * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
24  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
25  * GNU General Public License for more details.                         *
26  *                                                                      *
27  * You should have received a copy of the GNU General Public License    *
28  * along with this program; if not, write to the Free Software          *
29  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
30  * MA  02110-1301  USA                                                  *
31  ************************************************************************/
32
33 // Some security stuff...
34 if (!defined('__SECURITY')) {
35         die();
36 } // END - if
37
38 // @TODO Remove double tabs from all lines
39                 switch (getCurrentExtensionVersion()) {
40                         case '0.0.1': // SQL queries for v0.0.1
41                                 addExtensionAddTableColumnSql('rallye_data', 'expired', "ENUM('Y','N') NOT NULL DEFAULT 'N'");
42
43                                 // Update notes (these will be set as task text!)
44                                 setExtensionUpdateNotes("Ablaufen der Rallyes intergriert.");
45                                 break;
46
47                         case '0.0.2': // SQL queries for v0.0.2
48                                 addExtensionAddTableColumnSql('rallye_users', 'curr_points', 'FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000');
49
50                                 // Update notes (these will be set as task text!)
51                                 setExtensionUpdateNotes("Aktueller {?POINTS?}-Stand wird beachtet.");
52                                 break;
53
54                         case '0.0.6': // SQL queries for v0.0.6
55                                 // Update notes (these will be set as task text!)
56                                 setExtensionUpdateNotes("Fehler <span class=\"notice\">Unknown column 'd.useid' in 'on clause'</span> behoben.");
57                                 break;
58
59                         case '0.0.7': // SQL queries for v0.0.7
60                                 // Update notes (these will be set as task text!)
61                                 setExtensionUpdateNotes("Fehlende Abfrage im Mitlieder-Modul, on Erweiterung auch aktiviert ist.");
62                                 break;
63
64                         case '0.0.8': // SQL queries for v0.0.8
65                                 // Update notes (these will be set as task text!)
66                                 setExtensionUpdateNotes("Fehler <u>Template nicht gefunden</u> behoben und Admin-Formulare ausgelagert");
67                                 break;
68
69                         case '0.0.9': // SQL queries for v0.0.9
70                                 // Update notes (these will be set as task text!)
71                                 setExtensionUpdateNotes("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist. Und der vorherige Fehler <u>Template nicht gefunden</u> ist endlich beseitigt.");
72                                 break;
73
74                         case '0.1.0': // SQL queries for v0.2.1
75                                 addExtensionChangeTableColumnSql('rallye_users', 'curr_points', 'curr_points', 'FLOAT(23,5) UNSIGNED NOT NULL DEFAULT 0.00000');
76
77                                 // Update notes (these will be set as task text!)
78                                 setExtensionUpdateNotes("5 Nachkommastellen implementiert.");
79                                 break;
80
81                         case '0.1.1': // SQL queries for v0.1.1
82                                 // Update notes (these will be set as task text!)
83                                 setExtensionUpdateNotes("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
84                                 break;
85
86                         case '0.1.2': // SQL queries for v0.1.2
87                                 // Update notes (these will be set as task text!)
88                                 setExtensionUpdateNotes("Problem mit Speicherung der Einstellungen beseitigt.");
89                                 break;
90
91                         case '0.1.3': // SQL queries for v0.1.3
92                                 // Update notes (these will be set as task text!)
93                                 setExtensionUpdateNotes("Anzeigefehler im Gast-/Mitgliedsbereich behoben.");
94                                 break;
95
96                         case '0.1.4': // SQL queries for v0.1.4
97                                 // Update notes (these will be set as task text!)
98                                 setExtensionUpdateNotes("Admin-Mails korregiert.");
99                                 break;
100
101                         case '0.1.5': // SQL queries for v0.1.5
102                                 // Update notes (these will be set as task text!)
103                                 setExtensionUpdateNotes("Men&uuml;punkte im Gast-/Mitgliedsbereich k&ouml;nnen nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist.");
104                                 break;
105
106                         case '0.1.6': // SQL queries for v0.1.6
107                                 // Update notes (these will be set as task text!)
108                                 setExtensionUpdateNotes("Seit <strong>Patch 340</strong> &uuml;berfl&uuml;ssige HTML-Tags entfernt.");
109                                 break;
110
111                         case '0.1.7': // SQL queries for v0.1.7
112                                 // Update notes (these will be set as task text!)
113                                 setExtensionUpdateNotes("Aktivierte bzw. abgelaufene Rallyes werden nur ausserhalb des CSS-Modus geladen (wenn also nicht css.php aufgerufen wurde)");
114                                 break;
115
116                         case '0.1.8': // SQL queries for v0.1.8
117                                 // Update notes (these will be set as task text!)
118                                 setExtensionUpdateNotes("Weitere Templates vom Admin-Bereich ausgelagert und Referral-Anazahl in der Mail zur Rallye-Ank&uuml;ndigung repariert.");
119                                 break;
120
121                         case '0.1.9': // SQL queries for v0.1.9
122                                 // Update notes (these will be set as task text!)
123                                 setExtensionUpdateNotes("Funktion <u>generateUserProfileLink()</u> mit Verlinkung auf Referral-Liste implementiert.");
124                                 break;
125
126                         case '0.2.0': // SQL queries for v0.2.0
127                                 addExtensionAddTableColumnSql('rallye_data', 'min_users', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 0');
128                                 addExtensionAddTableColumnSql('rallye_data', 'min_prices', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 3');
129
130                                 // Update notes (these will be set as task text!)
131                                 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 />
132 <ul>
133   <li>&#36;DATA&#91;min_users&#93;</li>
134   <li>&#36;DATA&#91;min_prices&#93;</li>
135 </ul>
136 Zudem sollten Sie mindestens folgende Templates (in <strong>templates/".getLanguage()."/html/guest/</strong> !) aktualisieren:<br />
137 <ul>
138   <li><strong>guest_rallye_footer.tpl</strong></li>
139   <li><strong>guest_rallye_header.tpl</strong></li>
140 </ul>");
141                                 break;
142
143                         case '0.2.1': // SQL queries for v0.2.1
144                                 // Update notes (these will be set as task text!)
145                                 setExtensionUpdateNotes("W&ouml;rter <strong>{?mt_word?}</strong>, <strong>{?mt_word2?}</strong> und <strong>{?mt_word3?}</strong> sind austauschbar.");
146                                 break;
147
148                         case '0.2.2': // SQL queries for v0.2.2
149                                 // Update notes (these will be set as task text!)
150                                 setExtensionUpdateNotes("Links wegen <strong>what=admins_contct</strong> ge&auml;ndert.");
151                                 break;
152
153                         case '0.2.3': // SQL queries for v0.2.3
154                                 // Update notes (these will be set as task text!)
155                                 setExtensionUpdateNotes("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert.");
156                                 break;
157
158                         case '0.2.4': // SQL queries for v0.2.4
159                                 // Update notes (these will be set as task text!)
160                                 setExtensionUpdateNotes("Abspeichern von Einstellungen repariert.");
161                                 break;
162
163                         case '0.2.5': // SQL queries for v0.2.5
164                                 // Update notes (these will be set as task text!)
165                                 setExtensionUpdateNotes("Men&uuml;punkt &quot;Rallyes verwalten&quot; repariert.");
166                                 break;
167
168                         case '0.2.6': // SQL queries for v0.2.6
169                                 // Update notes (these will be set as task text!)
170                                 setExtensionUpdateNotes("Automatisches Starten von Referral-Rallyes repariert.");
171                                 break;
172
173                         case '0.2.7': // SQL queries for v0.2.7
174                                 // Update notes (these will be set as task text!)
175                                 setExtensionUpdateNotes("Fatalen Fehler beseitigt.");
176                                 break;
177
178                         case '0.2.8': // SQL queries for v0.2.8
179                                 // Update notes (these will be set as task text!)
180
181                                 setExtensionUpdateNotes("Vorbereitung auf die neue Mediendaten v0.0.4.");
182                                 break;
183
184                         case '0.2.9': // SQL queries for v0.2.9
185                                 // Update notes (these will be set as task text!)
186                                 setExtensionUpdateNotes("Sicherheitsupdate f&uuml;r die Include-Befehle.");
187                                 break;
188
189                         case '0.3.0': // SQL queries for v0.3.0
190                                 // Update notes (these will be set as task text!)
191                                 setExtensionUpdateNotes("if-Anweisungen auf Funktion <strong>empty()</strong> umgestellt.");
192                                 break;
193
194                         case '0.3.1': // SQL queries for v0.3.1
195                                 // Update notes (these will be set as task text!)
196                                 setExtensionUpdateNotes("Erweiterung f&uuml;r automatisch generierte Admin-Kontaktlinks ge&auml;ndert.");
197                                 break;
198
199                         case '0.3.2': // SQL queries for v0.3.2
200                                 addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `action`='rals',`title`='Referral-Rallye',`sort`=1 WHERE `what`='rallyes' LIMIT 1");
201
202                                 // Update notes (these will be set as task text!)
203                                 setExtensionUpdateNotes("Mitgliedsmen&uuml; komplett umgebaut.");
204                                 break;
205
206                         case '0.3.3': // SQL queries for v0.3.3
207                                 // Update notes (these will be set as task text!)
208                                 setExtensionUpdateNotes("Rallyes werden nun nur dann automatisch beseitigt, wenn die Erweiterung <strong>autopurge</strong> installiert und aktiviert ist.");
209                                 break;
210
211                         case '0.3.4': // SQL queries for v0.3.4
212                                 // Update notes (these will be set as task text!)
213                                 setExtensionUpdateNotes("Fehlerhinweis bei deaktivierter Erweiterung verbessert.");
214                                 break;
215
216                         case '0.3.5': // SQL queries for 0.3.5
217                                 // Register filter
218                                 registerFilter(__FILE__, __LINE__, 'extra_autopurge', 'RALLYE_EXTRA_AUTOPURGE', FALSE, TRUE, isExtensionDryRun());
219
220                                 // Update notes (these will be set as task text!)
221                                 setExtensionUpdateNotes("Filter hinzugef&uuml;gt und ist von <strong>sql_patches</strong> abh&auml;ngig.");
222                                 break;
223
224                         case '0.3.6': // SQL queries for v0.3.6
225                                 // Register points data
226                                 registerExtensionPointsData('rallye_winner', 'points', 'LOCKED', 'DIRECT');
227
228                                 // Update notes
229                                 setExtensionUpdateNotes("Gewinn aus der Referral-Rallye wird nun &uuml;ber die Tabelle <strong>{OPEN_CONFIG}_MYSQL_PREFIX{CLOSE_CONFIG}_points_data</strong> verwaltet.");
230                                 break;
231
232                         case '0.3.7': // SQL queries for v0.3.7
233                                 // Register filter
234                                 registerFilter(__FILE__, __LINE__, 'init', 'RALLYE_NOTIFY_USERS', FALSE, TRUE, isExtensionDryRun());
235                                 registerFilter(__FILE__, __LINE__, 'add_rallye_notify_sqls', 'ADD_RALLYE_SQL_COLUMNS', FALSE, TRUE, isExtensionDryRun());
236
237                                 // Update notes
238                                 setExtensionUpdateNotes("Weitere Filter hinzugef&uuml;gt.");
239                                 break;
240
241                         case '0.3.8': // SQL queries for v0.3.8
242                                 addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET `what`='list_rallye_prices' WHERE `action`='rallye' AND `what`='config_rallye_prices' LIMIT 1");
243
244                                 // Update notes
245                                 setExtensionUpdateNotes("Men&uuml; umbenannt, da &quot;config&quot; nur f&uuml;r die Konfigurationstabelle <strong>{?_MYSQL_PREFIX?}_config</strong> ist.");
246                                 break;
247                 } // END - switch
248
249 // [EOF]
250 ?>