More rewrites to configuration:
[mailer.git] / inc / extensions / sql_patches / mode-update.php
1 <?php
2 /************************************************************************
3  * Mailer v0.2.1-FINAL                                Start: 01/14/2013 *
4  * ===================                          Last change: 01/14/2013 *
5  *                                                                      *
6  * -------------------------------------------------------------------- *
7  * File              : mode-update.php                                  *
8  * -------------------------------------------------------------------- *
9  * Short description : Steps for updates of ext-sql_patches             *
10  * -------------------------------------------------------------------- *
11  * Kurzbeschreibung  : Schritte fuer Updates von ext-sql_patches        *
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 - 2012 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                                 addAdminMenuSql('setup', 'config_extensions', 'Erweitungsmanagement', 'Alle Einstellungen am Erweiterungsmanagement.', 10);
47
48                                 // Update notes (these will be set as task text!)
49                                 setExtensionUpdateNotes("Es kann nun bestimmt werden, ob vom Server gel&ouml;schte ext-xxx.php erkannt werden sollen und die verkn&uuml;pften Daten auch aus der Datenbank entfernt werden sollen.");
50                                 break;
51
52                         case '0.0.2': // SQL queries for v0.0.2
53                                 // Update notes (these will be set as task text!)
54                                 setExtensionUpdateNotes("Nicht mehr verwendetes Update, da nach <strong>ext-autopurge</strong> verschoben.");
55                                 break;
56
57                         case '0.0.3': // SQL queries for v0.0.3
58                                 addConfigAddSql('points_word', "VARCHAR(255) NOT NULL DEFAULT '{OPEN_TEMPLATE}DEFAULT_POINTS{CLOSE_TEMPLATE}'");
59
60                                 // Update notes (these will be set as task text!)
61                                 setExtensionUpdateNotes("Das Wort &quot;Punkte&quot; kann nun per Datenbank ge&auml;ndert werden. Damit k&ouml;nnen anstelle des Wortes Punkte auch Klammlose, Wernis, Primera und auch &euro; geschrieben werden.");
62                                 break;
63
64                         case '0.0.4': // SQL queries for v0.0.4
65                                 addConfigAddSql('mails_page', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 10');
66
67                                 // Update notes (these will be set as task text!)
68                                 setExtensionUpdateNotes("Anzahl Mails pro Seite in <strong>EMail-Details ansehen</strong> und <strong>EMail-Archiv</strong> hinzugef&uuml;gt.");
69                                 break;
70
71                         case '0.0.5': // SQL queries for v0.0.5
72                                 addConfigAddSql('index_home', "VARCHAR(255) NOT NULL DEFAULT 'welcome'");
73                                 addAdminMenuSql('setup','config_home','Home-Seite festlegen','Stellen Sie hier ein, welcher Men&uuml;punkt (what-welcome ist Standard) als Einstiegspunkt in das Men&uuml;system genutzt werden soll.', 5);
74
75                                 // Update notes (these will be set as task text!)
76                                 setExtensionUpdateNotes("Die what-welcome.php ist derzeit die &quot;Home&quot;-Seite (Eingangsseite). Dies kann nun per Datenbank ge&auml;ndert werden.");
77                                 break;
78
79                         case '0.0.6': // SQL queries for v0.0.6
80                                 addExtensionAddTableColumnSql('extensions', 'ext_has_css', "ENUM('Y','N') NOT NULL DEFAULT 'Y'");
81
82                                 // Update notes (these will be set as task text!)
83                                 setExtensionUpdateNotes("Es k&ouml;nnen nun SQL-Updates von einander abh&auml;ngig gemacht werden und die CSS-Datei kann per Admin-Bereich (wegen Debuggings) ein- bzw. ausgeschaltet werden.");
84                                 break;
85
86                         case '0.0.7': // SQL queries for v0.0.7
87                                 addConfigAddSql('verbose_sql', "ENUM('Y','N') NOT NULL DEFAULT 'N'");
88
89                                 // Update notes (these will be set as task text!)
90                                 setExtensionUpdateNotes("Die SQL-Anweisungen werden bei eingeschalteter Verbose-Funktion detailiert angezeigt.");
91                                 break;
92
93                         case '0.0.8': // SQL queries for v0.0.8
94                                 addConfigAddSql('menu_blur_spacer', "VARCHAR(255) NOT NULL DEFAULT '&nbsp;<strong><big>&middot;</big></strong>&nbsp;'");
95
96                                 // Update notes (these will be set as task text!)
97                                 setExtensionUpdateNotes("Nette Mouse-Hover-Effekte eingebaut (Anleitung <strong>MENUE_HOVER.txt</strong> zum Patchen der general.css bitte lesen!)");
98                                 break;
99
100                         case '0.0.9': // SQL queries for v0.0.9
101                                 addAdminMenuSql('email','list_unconfirmed','Unbest. Mails auflisten','Schauen Sie sich hier unbest&auml;tigte Maillinks an. Bitte diesen Link nur &uuml;ber dem EMail-Archiv oder EMail-Details aufrufen, direkt aufgerufen bekommen Sie eine Fehlermeldung.', 8);
102
103                                 // Update notes (these will be set as task text!)
104                                 setExtensionUpdateNotes("Unbest&auml;tigte Maillinks k&ouml;nnen unter Email-Management -&gt; Unbest. Mails auflisten aufgelistet werden.");
105                                 break;
106
107                         case '0.1.0': // SQL queries for v0.1.0
108                                 // Update notes (these will be set as task text!)
109                                 setExtensionUpdateNotes("Soll der einmalige Ref-Bonus &uuml;ber das Referral-System (also alle oberen Refs bekommen auch etwas davon ab) oder direkt dem Werber aufgebucht werden?");
110                                 break;
111
112                         case '0.1.1': // SQL queries for v0.1.1
113                                 addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET `title`='Home-/Eingangsseite', descr='Stellen Sie hier ein, welcher Men&uuml;punkt (what-welcome ist Standard) als Einstiegspunkt in das Men&uuml;system genutzt werden soll und wie die automatische Weiterleitung in der Eingangsseite funktionieren soll.' WHERE `what`='config_home' LIMIT 1");
114                                 addConfigAddSql('index_delay', 'TINYINT(3) NOT NULL DEFAULT 0');
115                                 addConfigAddSql('index_cookie', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT ' . (getOneDay() * 365));
116
117                                 // Update notes (these will be set as task text!)
118                                 setExtensionUpdateNotes("Sie k&ouml;nnen nun <a href=\"{%url=modules.php?module=admin&amp;what=config_home%}\">hier</a> die Verz&ouml;gerungszeit in der <a href=\"{%url=index.php%}\">Eingangsseite</a> einstellen.");
119                                 break;
120
121                         case '0.1.2': // SQL queries for v0.1.2
122                                 addAdminMenuSql('setup','config_refid','Standard-Ref-Id','Stellen Sie hier die Mitglieds-Id ein, die genommen werden soll, wenn der Gast n icht per Referral-Link Ihren {?mt_word?} aufgerufen hat.', 7);
123                                 addConfigAddSql('def_refid', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 0');
124
125                                 // Update notes (these will be set as task text!)
126                                 setExtensionUpdateNotes("Standard Referral-Id kann per Admin-Bereich eingestellt werden (war vorher nur in modules.php und index.php direkt eingebbar.)");
127                                 break;
128
129                         case '0.1.3': // SQL queries for v0.1.3
130                                 addConfigAddSql('refid_target', "ENUM('register','index') NOT NULL DEFAULT 'register'");
131
132                                 // Update notes (these will be set as task text!)
133                                 setExtensionUpdateNotes("Auf welche Seite soll der Ref-Link zeigen? Eingangsseite oder Anmeldeformular?");
134                                 break;
135
136                         case '0.1.4': // SQL queries for v0.1.4
137                                 // Update notes (these will be set as task text!)
138                                 setExtensionUpdateNotes("Ung&uuml;ltiges Update (nach ext-theme.php verschoben!).");
139                                 break;
140
141                         case '0.1.5': // SQL queries for v0.1.5
142                                 addExtensionDropTableColumnSql('extensions', 'ext_has_admin');
143
144                                 // Update notes (these will be set as task text!)
145                                 setExtensionUpdateNotes("Spalte <u>ext_has_admin</u> aus der Tabelle <u>{?_MYSQL_PREFIX?}_extensions</u> entfernt, da sie keinen Sinn mehr macht.");
146                                 break;
147
148                         case '0.1.6': // SQL queries for v0.1.6
149                                 addConfigAddSql('enable_title_deco', "ENUM('Y','N') NOT NULL DEFAULT 'Y'");
150                                 addConfigAddSql('title_left', "VARCHAR(10) NOT NULL DEFAULT '[--'");
151                                 addConfigAddSql('title_middle', "VARCHAR(10) NOT NULL DEFAULT '-'");
152                                 addConfigAddSql('title_right', "VARCHAR(10) NOT NULL DEFAULT '--]'");
153                                 addConfigAddSql('enable_mod_title', "ENUM('Y','N') NOT NULL DEFAULT 'Y'");
154                                 addConfigAddSql('enable_what_title', "ENUM('Y','N') NOT NULL DEFAULT 'Y'");
155                                 addAdminMenuSql('setup','config_title','Seitentitel &auml;ndern','De-/aktivieren Sie hier die Dekorationen, sowie Modul-Titel und what-Titel im Seitentitel.', 8);
156
157                                 // Update notes (these will be set as task text!)
158                                 setExtensionUpdateNotes("Dekorationen des Seitentiteles lassen sich ein- und ausschalten und selber definieren; Modul-Titel und Titel der <strong>what</strong>-Dateien kann hinzugef&uuml;gt werden.");
159                                 break;
160
161                         case '0.1.7': // SQL queries for v0.1.7
162                                 // Update notes (these will be set as task text!)
163                                 setExtensionUpdateNotes("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
164                                 break;
165
166                         case '0.1.8': // SQL queries for v0.1.8
167                                 // Update notes (these will be set as task text!)
168                                 setExtensionUpdateNotes("mad_count und last_mad werden nun aus der Datenbank geladen");
169                                 break;
170
171                         case '0.1.9': // SQL queries for v0.1.9
172                                 // Update notes (these will be set as task text!)
173                                 setExtensionUpdateNotes("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
174                                 break;
175
176                         case '0.2.0': // SQL queries for v0.2.0
177                                 addExtensionChangeTableColumnSql('jackpot', 'points', 'points', 'FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000');
178
179                                 addExtensionChangeTableColumnSql('payments', 'payment', 'payment', 'FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000');
180                                 addExtensionChangeTableColumnSql('payments', 'price', 'price', 'FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000');
181
182                                 // Update notes (these will be set as task text!)
183                                 setExtensionUpdateNotes("5 Nachkommastellen implementiert");
184                                 break;
185
186                         case '0.2.1': // SQL queries for v0.2.1
187                                 addConfigAddSql('css_php', "ENUM('DIRECT','FILE','INLINE') NOT NULL DEFAULT 'FILE'");
188
189                                 // Update notes (these will be set as task text!)
190                                 setExtensionUpdateNotes("Ausgabe der CSS-Dateien entweder per css.php oder sie sind direkt eingebunden.");
191                                 break;
192
193                         case '0.2.2': // SQL queries for v0.2.2
194                                 // Update notes (these will be set as task text!)
195                                 setExtensionUpdateNotes("Erweiterung bleibt wegen integrierten Schalters immer aktiv.");
196                                 break;
197
198                         case '0.2.3': // SQL queries for v0.2.3
199                                 addConfigAddSql('guest_menu', "ENUM('Y','N') NOT NULL DEFAULT 'Y'");
200                                 addConfigAddSql('member_menu', "ENUM('Y','N') NOT NULL DEFAULT 'Y'");
201                                 addConfigAddSql('youre_here', "ENUM('Y','N') NOT NULL DEFAULT 'Y'");
202
203                                 // Update notes (these will be set as task text!)
204                                 setExtensionUpdateNotes("Gast- und Mitgliedsmen&uuml;s lassen sich getrennt voneinander abschalten.");
205                                 break;
206
207                         case '0.2.4': // SQL queries for v0.2.4
208                                 // PNG image is the default
209                                 $auto_type = 'png';
210
211                                 // Is the JPEG file found and required PHP function there?
212                                 if ((!isFileReadable(getPath() . 'theme/' . getCurrentTheme() . '/images/code_bg.png')) || (!function_exists('imagecreatefrompng'))) {
213                                         // Switch to JPEG format because PNG is not available
214                                         $auto_type = 'jpg';
215                                 } // END - if
216                                 addConfigAddSql('img_type', "ENUM('jpg','png') NOT NULL DEFAULT '" . $auto_type . "'");
217
218                                 // Update notes (these will be set as task text!)
219                                 setExtensionUpdateNotes("Generierung des Mailbest&auml;tigungscodes h&auml;ngt davon ab, ob die PHP-Funktion <u>imagecreatefromjpeg()</u> und das JPEG-Bild vorhanden sind oder nicht.");
220                                 break;
221
222                         case '0.2.5': // SQL queries for v0.2.5
223                                 // Update notes (these will be set as task text!)
224                                 setExtensionUpdateNotes("Spalten <u>max_mails</u> und <u>receive_mails</u> auf BIGINT(20) gesetzt.");
225                                 break;
226
227                         case '0.2.6': // SQL queries for v0.2.6
228                                 // Update notes (these will be set as task text!)
229                                 setExtensionUpdateNotes("Verschoben nach <strong>ext-user</strong>.");
230                                 break;
231
232                         case '0.2.7': // SQL queries for v0.2.7
233                                 addConfigAddSql('stats_limit', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 10');
234                                 addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET `what`='config_stats' WHERE `what`='stats' LIMIT 1");
235
236                                 // Update notes (these will be set as task text!)
237                                 setExtensionUpdateNotes("<ol>
238 <li>Das Mitglied kann das derzeitige Design in sein Profil abspeichern.</li>
239 <li>Mitgliederstatistik mit Seitennavigation.</li>
240 </ol>");
241                                 break;
242
243                         case '0.2.8': // SQL queries for v0.2.8
244                                 // Update notes (these will be set as task text!)
245                                 setExtensionUpdateNotes("Nicht mehr g&uuml;ltiges Update.");
246                                 break;
247
248                         case '0.2.9': // SQL queries for v0.2.9
249                                 addConfigAddSql('mt_word', "VARCHAR(255) NOT NULL DEFAULT 'Mailtausch'");
250                                 addConfigAddSql('mt_word2', "VARCHAR(255) NOT NULL DEFAULT 'Mailtausches'");
251                                 addConfigAddSql('mt_word3', "VARCHAR(255) NOT NULL DEFAULT 'Mailtauscher'");
252
253                                 // Update notes (these will be set as task text!)
254                                 setExtensionUpdateNotes("W&ouml;rter <strong>{?mt_word?}</strong>, <strong>{?mt_word2?}</strong> und <strong>{?mt_word3?}</strong> sind austauschbar.");
255                                 break;
256
257                         case '0.3.0': // SQL queries for v0.3.0
258                                 addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET `title`='{OPEN_CONFIG}POINTS{CLOSE_CONFIG}/Referral-Ebenen' WHERE `what`='config_points' LIMIT 1");
259                                 addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET `title`='Mailverg&uuml;tungen...' WHERE `what`='payments' LIMIT 1");
260
261                                 // Update notes (these will be set as task text!)
262                                 setExtensionUpdateNotes("Zwei Men&uuml;punkte umbenannt.");
263                                 break;
264
265                         case '0.3.1': // SQL queries for v0.3.1
266                                 addExtensionAddTableUniqueSql('extensions', 'ext_name', '(`ext_name`)');
267                                 addExtensionAddTableUniqueSql('admins', 'login', '(`login`)');
268                                 addExtensionAddTableIndexSql('refbanner', 'visible', '(`visible`)');
269                                 addExtensionAddTableUniqueSql('refdepths', 'level', '(`level`)');
270                                 addExtensionAddTableIndexSql('refsystem', 'level', '(`level`)');
271                                 addExtensionAddTableIndexSql('pool', 'data_type', '(`data_type`)');
272                                 addExtensionAddTableUniqueSql('mod_reg', 'module', '(`module`)');
273                                 addExtensionAddTableIndexSql('admin_menu', 'action', '(`action`)');
274                                 addExtensionAddTableIndexSql('admin_menu', 'what', '(`what`)');
275                                 addExtensionAddTableIndexSql('extensions', 'ext_active', '(`ext_active`)');
276                                 addExtensionAddTableIndexSql('guest_menu', 'action', '(`action`)');
277                                 addExtensionAddTableIndexSql('guest_menu', 'what', '(`what`)');
278                                 addExtensionAddTableIndexSql('guest_menu', 'sort', '(`sort`)');
279                                 addExtensionAddTableIndexSql('guest_menu', 'visible', '(`visible`)');
280                                 addExtensionAddTableIndexSql('guest_menu', 'locked', '(`locked`)');
281                                 addExtensionAddTableIndexSql('member_menu', 'what', '(`what`)');
282                                 addExtensionAddTableIndexSql('member_menu', 'sort', '(`sort`)');
283                                 addExtensionAddTableIndexSql('member_menu', 'visible', '(`visible`)');
284                                 addExtensionAddTableIndexSql('member_menu', 'locked', '(`locked`)');
285                                 addExtensionAddTableIndexSql('cats', 'visible', '(`visible`)');
286                                 addExtensionAddTableIndexSql('cats', 'sort', '(`sort`)');
287
288                                 // Update notes (these will be set as task text!)
289                                 setExtensionUpdateNotes("Eindeutige Schl&uuml;ssel (UNIQUE) und normale Schl&uuml;ssel (INDEX) gesetzt.");
290                                 break;
291
292                         case '0.3.2': // SQL queries for v0.3.2
293                                 // Connection table between the menu system and the "logical area system"
294                                 addDropTableSql('admin_menu_las');
295                                 addCreateTableSql('admin_menu_las', "
296 `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
297 `la_id` VARCHAR(255) NOT NULL DEFAULT '',
298 `la_action` VARCHAR(255) NOT NULL DEFAULT '',
299 `la_what` VARCHAR(255) NOT NULL DEFAULT '',
300 PRIMARY KEY (`id`),
301 INDEX (`la_id`),
302 INDEX (`la_action`),
303 INDEX (`la_what`)",
304                                         'Menu system -> LAS');
305
306                                 // All "logical areas" together
307                                 addDropTableSql('admin_menu_las_data');
308                                 addCreateTableSql('admin_menu_las_data', "
309 `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
310 `la_id` VARCHAR(255) NOT NULL DEFAULT '',
311 `la_title` VARCHAR(255) NOT NULL DEFAULT '',
312 `la_posx` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
313 `la_posy` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
314 PRIMARY KEY (`id`),
315 UNIQUE INDEX (`la_id`),
316 INDEX (`la_posx`),
317 INDEX (`la_posy`)",
318                                         'LAS position and title data');
319
320                                 // Which menu do you like?
321                                 addConfigAddSql('admin_menu', "ENUM('NEW','OLD') NOT NULL DEFAULT 'OLD'");
322
323                                 // Insert menus
324                                 addAdminMenuSql('setup', 'config_admin', 'Adminmen&uuml;', 'Diverse Einstellungen am Adminmen&uuml; vornehmen.', 9);
325
326                                 // Update notes (these will be set as task text!)
327                                 setExtensionUpdateNotes("Logische Bereiche (Logical Areas = LAs) eingef&uuml;hrt. Dadurch wird das immer st&auml;rker anwachsende Admin-Men&uuml; in grosse Hauptgruppen unterteilt, wodurch ein Auffinden von Men&uuml;punkten verbessert wird.");
328                                 break;
329
330                         case '0.3.3': // SQL queries for v0.3.3
331                                 // Switch of the "intelligent menu sorter" when you want to have a fixed menu structure...
332                                 addConfigAddSql('admin_menu_sorter', "ENUM('Y','N') NOT NULL DEFAULT 'Y'");
333
334                                 // The statistics table
335                                 addDropTableSql('admin_las_stats');
336                                 addCreateTableSql('admin_las_stats', "
337 `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
338 `admin_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
339 `type` ENUM('la','action','what') NOT NULL DEFAULT 'what',
340 `clicks` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
341 PRIMARY KEY (`id`),
342 INDEX (`admin_id`)",
343                                         'LAS click data');
344
345                                 // Update notes (these will be set as task text!)
346                                 setExtensionUpdateNotes("Admin-abh&auml;ngig werden nun Klicks im Admin-Men&uuml; gez&auml;hlt, die zur automatischen Anpassung des Men&uuml;s in den logischen Bereichen diennen. Dieses &quot;intelligente Unbauen&quot; k&ouml;nnen Sie auch ganz abschalten.");
347                                 break;
348
349                         case '0.3.4': // SQL queries for v0.3.4
350                                 // Update notes (these will be set as task text!)
351                                 setExtensionUpdateNotes("Veraltetes Update (what=list_user&amp;mode=noref)");
352                                 break;
353
354                         case '0.3.5': // SQL queries for v0.3.5
355                                 // List accounts with no referral
356                                 addMemberMenuSql('stats', NULL, 'Statistiken', 4);
357                                 addMemberMenuSql('stats', 'stats2', 'Framekiller-Mails', 2);
358                                 addMemberMenuSql('extras', NULL, 'Extras', 5);
359                                 addMemberMenuSql('rals', NULL, 'Rallyes', 6);
360                                 addMemberMenuSql('account', NULL, 'Ihr Account', 7);
361                                 addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `action`='stats',`sort`=1,`title`='Klick-Mails' WHERE `what`='stats' LIMIT 1");
362                                 addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `action`='extras',`sort`=3 WHERE `what`='reflinks' LIMIT 1");
363
364                                 // Update notes (these will be set as task text!)
365                                 setExtensionUpdateNotes("Mitgliedsmen&uuml; komplett umgebaut.");
366                                 break;
367
368                         case '0.3.6': // SQL queries for v0.3.6
369                                 addConfigAddSql('salt_length', 'TINYINT(3) UNSIGNED NOT NULL DEFAULT 10');
370                                 addConfigAddSql('pass_scramble', "VARCHAR(255) NOT NULL DEFAULT ''");
371                                 addExtensionChangeTableColumnSql('admins', 'password', 'password', "VARCHAR(255) NOT NULL DEFAULT ''");
372                                 addConfigAddSql('rand_no', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 0');
373                                 addConfigAddSql('file_hash', "VARCHAR(255) NOT NULL DEFAULT ''");
374                                 addConfigAddSql('master_salt', "VARCHAR(255) NOT NULL DEFAULT ''");
375                                 addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_config` SET `rand_no`=(ROUND(RAND() * 99999) + 100000) WHERE `config`=0 LIMIT 1");
376                                 addExtensionAddTableColumnSql('mod_reg', 'has_menu', "ENUM('Y','N') NOT NULL DEFAULT 'N'");
377                                 addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `has_menu`='Y' WHERE `module`='admin' OR `module`='index' OR `module`='login' LIMIT 3");
378
379                                 // Update notes (these will be set as task text!)
380                                 setExtensionUpdateNotes("Passwort-System mit Zufallshash erweitert (Schutzt gegen Dictionary-Attacks!)");
381                                 break;
382
383                         case '0.3.7': // SQL queries for v0.3.7
384                                 setExtensionUpdateNotes("Problem w&auml;hrend des Installationsvorganges behoben.");
385                                 break;
386
387                         case '0.3.8': // SQL queries for v0.3.8
388                                 addExtensionChangeTableColumnSql('admin_menu', 'descr', 'descr', 'MEDIUMTEXT NULL');
389                                 addExtensionChangeTableColumnSql('pool', 'text', 'text', 'LONGTEXT NOT NULL');
390
391                                 // Update notes (these will be set as task text!)
392                                 setExtensionUpdateNotes("Beschreibungstexte f&uuml;r Admin-Men&uuml;s k&ouml;nnen l&auml;nger sein. Diverse Fixes.");
393                                 break;
394
395                         case '0.3.9': // SQL queries for v0.3.9
396                                 // Update notes (these will be set as task text!)
397                                 setExtensionUpdateNotes("Beschreibungstexte f&uuml;r Admin-Men&uuml;s k&ouml;nnen l&auml;nger sein. Diverse Fixes.");
398                                 break;
399
400                         case '0.4.0': // SQL queries for v0.4.0
401                                 addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET `title` = 'Email-Management' WHERE `action` = 'email' AND (`what`='' OR `what` IS NULL) LIMIT 1");
402
403                                 // Update notes (these will be set as task text!)
404                                 setExtensionUpdateNotes("Email-Verwaltung nach Email-Management umbenannt.");
405                                 break;
406
407                         case '0.4.1': // SQL queries for v0.4.1
408                                 addConfigAddSql('show_timings', "ENUM ('Y','N') NOT NULL DEFAULT 'Y'");
409
410                                 // Update notes (these will be set as task text!)
411                                 setExtensionUpdateNotes("Tabellen-Schl&uuml;ssel neu gesetzt und Parsing-Zeit im Footer eingeblendet.");
412                                 break;
413
414                         case '0.4.2': // SQL queries for v0.4.2
415                                 // Update notes (these will be set as task text!)
416                                 setExtensionUpdateNotes("Nicht mehr g&uuml;ltiges Update.");
417                                 break;
418
419                         case '0.4.3': // SQL queries for v0.4.3
420                                 addConfigAddSql('proxy_host', "VARCHAR(255) NOT NULL DEFAULT ''");
421                                 addConfigAddSql('proxy_port', 'INT(5) UNSIGNED NOT NULL DEFAULT 0');
422                                 addConfigAddSql('proxy_username', "VARCHAR(255) NOT NULL DEFAULT ''");
423                                 addConfigAddSql('proxy_password', "VARCHAR(255) NOT NULL DEFAULT ''");
424                                 addAdminMenuSql('setup','config_proxy','Proxy-Einstellungen','Sollte Ihr Webserver sich hinter einem Proxy befinden, so k&ouml;nnen Sie Ihren {?mt_word?} so konfigurieren, dass es z.B. Updates, Abfragen von Netzwerkupdates &uuml;ber diesen t&auml;tigt.', 15);
425
426                                 // Update notes (these will be set as task text!)
427                                 setExtensionUpdateNotes("Proxy-Einstellungen hinzugef&uuml;gt.");
428                                 break;
429
430                         case '0.4.4': // SQL queries for v0.4.4
431                                 addExtensionChangeTableColumnSql('admin_menu', 'what', 'what', 'VARCHAR(255) NULL DEFAULT NULL');
432                                 addExtensionChangeTableColumnSql('guest_menu', 'what', 'what', 'VARCHAR(255) NULL DEFAULT NULL');
433                                 addExtensionChangeTableColumnSql('member_menu', 'what', 'what', 'VARCHAR(255) NULL DEFAULT NULL');
434                                 addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET `what`=NULL WHERE `what`=''");
435                                 addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_guest_menu` SET `what`=NULL WHERE `what`=''");
436                                 addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `what`=NULL WHERE `what`=''");
437
438                                 // Make this depending on ext-menu
439                                 addExtensionDependency('menu');
440
441                                 // Update notes (these will be set as task text!)
442                                 setExtensionUpdateNotes("Schl&uuml;ssel in Admin-, Gast- und Mitgliedsmen&uuml; verbessert.");
443                                 break;
444
445                         case '0.4.5': // SQL queries for v0.4.5
446                                 addConfigAddSql('last_daily'  , 'TINYINT(2) UNSIGNED ZEROFILL NOT NULL DEFAULT 00');
447                                 addConfigAddSql('last_weekly' , 'TINYINT(2) UNSIGNED ZEROFILL NOT NULL DEFAULT 00');
448                                 addConfigAddSql('last_monthly', 'TINYINT(2) UNSIGNED ZEROFILL NOT NULL DEFAULT 00');
449
450                                 // Update notes (these will be set as task text!)
451                                 setExtensionUpdateNotes("T&auml;glichen/w&ouml;chentlichen/monatlichen Reset verbessert.");
452                                 break;
453
454                         case '0.4.6': // SQL queries for v0.4.6
455                                 // Update notes (these will be set as task text!)
456                                 setExtensionUpdateNotes("Nicht mehr g&uuml;ltiges Update.");
457                                 break;
458
459                         case '0.4.7': // SQL queries for v0.4.7
460                                 // Update notes (these will be set as task text!)
461                                 setExtensionUpdateNotes("Veraltetes Update.");
462                                 break;
463
464                         case '0.4.8': // SQL queries for v0.4.8
465                                 // Update notes (these will be set as task text!)
466                                 setExtensionUpdateNotes("Update nach <strong>ext-task</strong> verschoben.");
467                                 break;
468
469                         case '0.4.9': // SQL queries for v0.4.9
470                                 // Update notes (these will be set as task text!)
471                                 setExtensionUpdateNotes("Nicht mehr g&uuml;ltiges Update.");
472                                 break;
473
474                         case '0.5.0': // SQL queries for v0.5.0
475                                 addExtensionDropTableIndexSql('refsystem', 'level');
476                                 addExtensionDropTableIndexSql('refsystem', 'userid');
477                                 addExtensionAddTableIndexSql('refsystem', 'userid_level', '(`userid`, `level`)');
478
479                                 // Update notes (these will be set as task text!)
480                                 setExtensionUpdateNotes("Referral-System unterst&uuml;tzt nun detailierte Referral-&Uuml;bersicht und vieles mehr.");
481                                 break;
482
483                         case '0.5.1': // SQL queries for v0.5.1
484                                 addExtensionDropTableColumnSql('member_menu', 'descr');
485
486                                 // Update notes (these will be set as task text!)
487                                 setExtensionUpdateNotes("Beschreibungsspalte von Mitgliedsmen&uuml; entfernt, welche ohnehin nicht genutzt wird.");
488                                 break;
489
490                         case '0.5.2': // SQL queries for v0.5.2
491                                 addExtensionChangeTableColumnSql('refdepths', 'percents', 'percents', 'FLOAT(8,5) UNSIGNED NOT NULL DEFAULT 0.00000');
492
493                                 // Update notes (these will be set as task text!)
494                                 setExtensionUpdateNotes("Prozents&auml;tze k&ouml;nnen nun f&uuml;nf Stellen hinter dem Komma sein.");
495                                 break;
496
497                         case '0.5.3': // SQL queries for v0.5.3
498                                 addConfigAddSql('session_save_path', "VARCHAR(255) NOT NULL DEFAULT ''");
499                                 addAdminMenuSql('setup','config_session','Session-Einstellungen','&Auml;ndern Sie hier den Speicherpfad f&uuml;r Sessiondateien (Sitzungsdateien) ab, falls die Standard-Einstellung bei Ihrem Hoster zu Problem f&uuml;hren sollte.', 16);
500
501                                 // Update notes (these will be set as task text!)
502                                 setExtensionUpdateNotes("Session-Speicherpfad konfigurierbar. Beispielsweise ist dies bei all-inkl.com n&ouml;tig.");
503                                 break;
504
505                         case '0.5.4': // SQL queries for v0.5.4
506                                 addMemberMenuSql('main', 'reflist', 'Ref-&Uuml;bersicht', 5);
507
508                                 // Update notes (these will be set as task text!)
509                                 setExtensionUpdateNotes("Ref-&Uuml;bersicht eingebaut. Diese h&auml;ngt von der Erweiterung <strong>refback</strong> ab.");
510                                 break;
511
512                         case '0.5.5': // SQL queries for v0.5.5
513                                 addConfigAddSql('show_points_unconfirmed', "ENUM('Y','N') NOT NULL DEFAULT 'Y'");
514
515                                 // Update notes (these will be set as task text!)
516                                 setExtensionUpdateNotes("Anzeige der {?POINTS?} unter den unbest&auml;tigten Mails kann nun optional abgeschaltet werden.");
517                                 break;
518
519                         case '0.5.6': // SQL queries for v0.5.6
520                                 // Update notes (these will be set as task text!)
521                                 setExtensionUpdateNotes("Nicht mehr g&uuml;ltiges Update.");
522                                 break;
523
524                         case '0.5.7': // SQL queries for v0.5.7
525                                 addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what`='list_norefs' LIMIT 1");
526
527                                 // Update notes (these will be set as task text!)
528                                 setExtensionUpdateNotes("Auflistung der Mitglieder ohne Werber nach what=list_user&amp;mode=norefs verschoben.");
529                                 break;
530
531                         case '0.5.8': // SQL queries for v0.5.8
532                                 addExtensionDropTableColumnSql('extensions', 'ext_lang_file');
533
534                                 // Update notes (these will be set as task text!)
535                                 setExtensionUpdateNotes("Sprachdateinamen werden nicht mehr in der Datenbank behalten.");
536                                 break;
537
538                         case '0.5.9': // SQL queries for v0.5.9
539                                 // Table 'filters' is vital because many functionality depends on it, so don't remove it
540                                 addCreateTableSql('filters', "
541 `filter_id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
542 `filter_name` VARCHAR(50) NOT NULL DEFAULT '',
543 `filter_function` VARCHAR(100) NOT NULL DEFAULT '',
544 `filter_active` ENUM('N','Y') NOT NULL DEFAULT 'Y',
545 `filter_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
546 PRIMARY KEY (`filter_id`),
547 UNIQUE INDEX `name_function` (`filter_name`, `filter_function`)",
548                                         'Filter system');
549
550                                 // Admin menu
551                                 addAdminMenuSql('setup','list_filter','Filter-Management', 'Zeigt alle im System registrierten Filter an und l&auml;sst diese de- bzw. wieder aktivieren.', 17);
552
553                                 // Update notes (these will be set as task text!)
554                                 setExtensionUpdateNotes("Tabellen f&uuml;r Filter-System hinzugef&uuml;gt.");
555                                 break;
556
557                         case '0.6.0': // SQL queries for v0.6.0
558                                 addConfigAddSql('update_filter_usage', "ENUM('N','Y') NOT NULL DEFAULT 'N'");
559
560                                 // Update notes (these will be set as task text!)
561                                 setExtensionUpdateNotes("Benutzungsstatistik eingebaut. Das Z&auml;hlen der Filterverwendungen sollte <strong>ausschliesslich</strong> zu Debugging-Zwecken eingesetzt werden.");
562                                 break;
563
564                         case '0.6.1': // SQL queries for v0.6.1
565                                 // Update notes (these will be set as task text!)
566                                 setExtensionUpdateNotes("Nicht mehr g&uuml;ltiges Update.");
567                                 break;
568
569                         case '0.6.2': // SQL queries for v0.6.2
570                                 // Depends on refback extension
571                                 addExtensionDependency('user');
572
573                                 // Update notes (these will be set as task text!)
574                                 setExtensionUpdateNotes("Abh&auml;ngigkeit von <u>ext-user</u> gesetzt.");
575                                 break;
576
577                         case '0.6.3': // SQL queries for v0.6.3
578                                 // Update notes (these will be set as task text!)
579                                 setExtensionUpdateNotes("Filter-Tabelle bereinigt um doppelte Eintr&auml;ge und Unique-Key auf <span class=\"bad\">filter_name</span> und <span class=\"bad\">filter_function</span> zusammen gesetzt.");
580
581                                 // Add special fix include to fix filters
582                                 addIncludeToPool('extension', 'inc/fix_filters.php');
583                                 break;
584
585                         case '0.6.4': // SQL queries for v0.6.4
586                                 // Update admin menu
587                                 addExtensionSql("UPDATE  `{?_MYSQL_PREFIX?}_admin_menu` SET `title` = REPLACE(`title`, '!POINTS!', '?POINTS?') WHERE `title` LIKE '%!POINTS!%'");
588                                 addExtensionSql("UPDATE  `{?_MYSQL_PREFIX?}_admin_menu` SET `descr` = REPLACE(`descr`, '!POINTS!', '?POINTS?') WHERE `descr` LIKE '%!POINTS!%'");
589                                 addExtensionSql("UPDATE  `{?_MYSQL_PREFIX?}_guest_menu` SET `title` = REPLACE(`title`, '!POINTS!', '?POINTS?') WHERE `title` LIKE '%!POINTS!%'");
590                                 addExtensionSql("UPDATE  `{?_MYSQL_PREFIX?}_member_menu` SET `title` = REPLACE(`title`, '!POINTS!', '?POINTS?') WHERE `title` LIKE '%!POINTS!%'");
591
592                                 // Update notes (these will be set as task text!)
593                                 setExtensionUpdateNotes("Datenbank umgestellt auf Konfigurationselemente.");
594                                 break;
595
596                         case '0.6.5': // SQL queries for v0.6.5
597                                 addConfigChangeSql('css_php', 'css_php', "ENUM('DIRECT','FILE','INLINE') NOT NULL DEFAULT 'FILE'");
598
599                                 // Update notes (these will be set as task text!)
600                                 setExtensionUpdateNotes("Ausgabe der CSS-Dateien entweder per css.php oder sie sind direkt eingebunden.");
601                                 break;
602
603                         case '0.6.6': // SQL queries for v0.6.6
604                                 addAdminMenuSql('setup', 'config_secure', 'Sicherheitseinstellungen', 'Stellen Sie ein, wie lange das Passwort eines Mitgliedes mindestens sein muss uvm.', 9);
605                                 addAdminMenuSql('setup', 'config_points', '{OPEN_CONFIG}POINTS{CLOSE_CONFIG}', 'Stellen Sie hier die Willkommensgutschrift, Referral-Gutschrift (einmalige) usw. ein.', 10);
606                                 addAdminMenuSql('email', 'email_archiv', 'E-Mail Archiv', 'Sehen Sie sich hier bereits gesendete Mails an.', 6);
607
608                                 // Update notes (these will be set as task text!)
609                                 setExtensionUpdateNotes("Die Sicherheitseinstellungen, {?POINTS?}-Einstellungen und Email-Archiv funktionieren nur, wenn diese Erweiterung installiert ist.");
610                                 break;
611
612                         case '0.6.7': // SQL queries for v0.6.7
613                                 addConfigChangeSql('index_delay', 'index_delay', 'TINYINT(3) NOT NULL DEFAULT 0');
614
615                                 // Update notes (these will be set as task text!)
616                                 setExtensionUpdateNotes("Die Weiterleitungseinstellung muss auch Werte kleiner Null akzeptieren.");
617                                 break;
618
619                         case '0.6.8': // SQL queries for v0.6.8
620                                 addExtensionChangeTableColumnSql('admin_menu', 'action', 'action', 'VARCHAR(50) NOT NULL');
621                                 addExtensionChangeTableColumnSql('admin_menu', 'what', 'what', 'VARCHAR(50) NULL DEFAULT NULL');
622                                 addExtensionChangeTableColumnSql('guest_menu', 'action', 'action', 'VARCHAR(50) NOT NULL');
623                                 addExtensionChangeTableColumnSql('admin_menu', 'what', 'what', 'VARCHAR(50) NULL DEFAULT NULL');
624                                 addExtensionChangeTableColumnSql('member_menu', 'action', 'action', 'VARCHAR(50) NOT NULL');
625                                 addExtensionChangeTableColumnSql('admin_menu', 'what', 'what', 'VARCHAR(50) NULL DEFAULT NULL');
626
627                                 // Update notes (these will be set as task text!)
628                                 setExtensionUpdateNotes("Spalten verk&uuml;rzt, damit die Schl&uuml;ssel passen.");
629                                 break;
630
631                         case '0.6.9': // SQL queries for 0.6.9
632                                 // Register filter
633                                 registerFilter(__FILE__, __LINE__, 'member_login_check', 'RESET_USER_LOGIN_FAILURE', FALSE, TRUE, isExtensionDryRun());
634
635                                 // Update notes (these will be set as task text!)
636                                 setExtensionUpdateNotes("Filter zum Zur&uuml;cksetzens des fehlgeschlagenen Mitgliederlogins hinzugef&uuml;gt (internes TODO).");
637                                 break;
638
639                         case '0.7.0': // SQL queries for 0.7.0
640                                 // Table definition
641                                 addDropTableSql('dns_cache');
642                                 addCreateTableSql('dns_cache', "
643 `hostname` VARCHAR(255) NOT NULL,
644 `ip` VARCHAR(15) NOT NULL,
645 `added` DATETIME NOT NULL,
646 PRIMARY KEY (`hostname`),
647 INDEX (`ip`)",
648                                         'Cache for DNS requests');
649
650                                 // Configuration
651                                 addConfigAddSql('dns_cache_timeout', 'BIGINT(20) NOT NULL DEFAULT ' . (60*60*24));
652
653                                 // Register filter
654                                 registerFilter(__FILE__, __LINE__, 'reset', 'CLEANUP_DNS_CACHE', FALSE, TRUE, isExtensionDryRun());
655
656                                 // Update notes (these will be set as task text!)
657                                 setExtensionUpdateNotes("IP-Resolver-Klasse hinzugef&uuml;gt, um bei der Erweiterung ext-network DNS-Anfragen einzusparen.");
658                                 break;
659
660                         case '0.7.1': // SQL queries for v0.7.1
661                                 // This update just depends on ext-timezone to make integration of an essential extension much easier
662                                 addExtensionDependency('timezone');
663
664                                 // Update notes (these will be set as task text!)
665                                 setExtensionUpdateNotes("Zeitzone ist nun mit ext-timezone konfigurierbar.");
666                                 break;
667
668                         case '0.7.2': // SQL queries for v0.7.2
669                                 addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_task_system` SET `task_type`='MEMBER_SUPPORT' WHERE `task_type`='SUPPORT_MEMBER'");
670
671                                 // Update notes (these will be set as task text!)
672                                 setExtensionUpdateNotes("Daten an Namenskonvention angepasst.");
673                                 break;
674
675                         case '0.7.3': // SQL queries for v0.7.3
676                                 addExtensionChangeTableColumnSql('filters', 'filter_name', 'filter_name', "VARCHAR(50) NOT NULL DEFAULT ''");
677                                 addExtensionChangeTableColumnSql('filters', 'filter_function', 'filter_function', "VARCHAR(100) NOT NULL DEFAULT ''");
678
679                                 // Update notes (these will be set as task text!)
680                                 setExtensionUpdateNotes("Spalten in Filtertabelle gek&uuml;rzt (SQL-Fehler wegen zu grossem Schl&uuml;ssel).");
681                                 break;
682
683                         case '0.7.4': // SQL queries for v0.7.4
684                                 addExtensionAddTableColumnSql('pool', 'mails_sent', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 0');
685
686                                 // Update notes (these will be set as task text!)
687                                 setExtensionUpdateNotes("Spalten in Filtertabelle gek&uuml;rzt (SQL-Fehler wegen zu grossem Schl&uuml;ssel).");
688                                 break;
689
690                         case '0.7.5': // SQL queries for v0.7.5
691                                 addConfigAddSql('last_hourly', 'TINYINT(2) UNSIGNED ZEROFILL NOT NULL DEFAULT 00');
692
693                                 // Update notes (these will be set as task text!)
694                                 setExtensionUpdateNotes("Aktuelle Stunde hinzugef&uuml;gt (ist nicht konfigurierbar).");
695                                 break;
696
697                         case '0.7.6': // SQL queries for v0.7.6
698                                 addConfigChangeSql('last_month', 'last_monthly', 'TINYINT(2) UNSIGNED ZEROFILL NOT NULL DEFAULT 00');
699                                 addConfigChangeSql('last_week' , 'last_weekly' , 'TINYINT(2) UNSIGNED ZEROFILL NOT NULL DEFAULT 00');
700
701                                 // Update notes (these will be set as task text!)
702                                 setExtensionUpdateNotes("Spaltentyp fuer kleine Zahlen sollten auch z.B. TINYINT sein.");
703                                 break;
704
705                         case '0.7.7': // SQL queries for v0.7.7
706                                 addMemberMenuSql('earn', NULL, 'Verdienen', 2);
707                                 addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `action`='earn',`sort`=1 WHERE `what`='unconfirmed' LIMIT 1");
708
709                                 // Update notes (these will be set as task text!)
710                                 setExtensionUpdateNotes("Men&uuml;punkt <strong>Verdienen</strong> hinzugef&uuml;gt und <strong>Unbest&auml;tigte Mails</strong> als ersten Punkt dort hin verschoben.");
711                                 break;
712
713                         case '0.7.8': // SQL queries for v0.7.8
714                                 // Update notes (these will be set as task text!)
715                                 setExtensionUpdateNotes("Konfigurationseintr&auml;ge mit Spaltentyp <strong>ENUM</strong> werden nun immer komplett gross geschrieben.");
716                                 break;
717
718                         case '0.7.9': // SQL queries for v0.7.9
719                                 addExtensionSQL("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET `what`='list_email_max_rec' WHERE `what`='config_email' LIMIT 1");
720
721                                 // Update notes (these will be set as task text!)
722                                 setExtensionUpdateNotes("Adminscript <strong>what-config_email.php</strong> nach <strong>what-list_email_max_rec.php</strong> umbenannt.");
723                                 break;
724
725                         case '0.8.0': // SQL queries for v0.8.0
726                                 // Points account data (this table should not be dropped or else you may have to re-install a lot extensions)
727                                 addCreateTableSql('points_data', "
728 `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
729 `subject` VARCHAR(255) NOT NULL DEFAULT '',
730 `column_name` VARCHAR(255) NOT NULL DEFAULT 'points',
731 `locked_mode` ENUM('LOCKED','UNLOCKED') NOT NULL DEFAULT 'LOCKED',
732 `payment_method` ENUM('DIRECT','REFERRAL') NOT NULL DEFAULT 'REFERRAL',
733 `notify_recipient` ENUM('Y','N') NOT NULL DEFAULT 'N',
734 PRIMARY KEY (`id`),
735 UNIQUE KEY (`subject`)",
736                                         'Points account data');
737
738                                 // Admin menu
739                                 addAdminMenuSql('setup', 'list_point_accounts', 'Guthabenkonten...', 'Veralten Sie hier bequem Einstellungen zu den Guthabenkonten.', 5);
740
741                                 // Update notes (these will be set as task text!)
742                                 setExtensionUpdateNotes("Tabelle <span class=\"bad\">points_data</span> erzeugt, diese soll das {?POINTS?}-Guthaben komplett lenken.");
743                                 break;
744
745                         case '0.8.1': // SQL queries for v0.8.1
746                                 addExtensionChangeTableColumnSql('refdepths', 'level', 'level', 'TINYINT(3) UNSIGNED NULL DEFAULT NULL');
747                                 addExtensionSql('UPDATE `{?_MYSQL_PREFIX?}_refdepths` SET `level`=NULL WHERE `level`=0 LIMIT 1');
748
749                                 // Update notes (these will be set as task text!)
750                                 setExtensionUpdateNotes("Level 0 ist nun auch NULL.");
751                                 break;
752
753                         case '0.8.2': // SQL queries for v0.8.2
754                                 addExtensionDropTableIndexSql('points_data', 'ext_name');
755                                 addExtensionChangeTableColumnSql('points_data', 'ext_name', 'subject', "VARCHAR(255) NOT NULL DEFAULT ''");
756                                 addExtensionAddTableColumnSql('points_data', 'notify_recipient', "ENUM('Y','N') NOT NULL DEFAULT 'N'");
757
758                                 // Register points data
759                                 registerExtensionPointsData('pool_payback', 'points', 'LOCKED', 'DIRECT');
760                                 registerExtensionPointsData('mail_deleted', 'points', 'LOCKED', 'DIRECT');
761
762                                 // Remove deprecated configuration entry
763                                 addConfigDropSql('reg_points_mode');
764
765                                 // Update notes (these will be set as task text!)
766                                 setExtensionUpdateNotes("Es sollte der Gutschriftenbetreff und nicht der Erweiterungsname gepeichert werden, zudem brauchen wir einen Konfigurationseintrag nicht mehr.");
767                                 break;
768
769                         case '0.8.3': // SQL queries for v0.8.3
770                                 addConfigAddSql('display_home_in_index', "ENUM('Y','N') NOT NULL DEFAULT 'Y'");
771
772                                 // Update notes (these will be set as task text!)
773                                 setExtensionUpdateNotes("Es kann nun die &quot;Home&quot;-Seite in <strong>index.php</strong> angezeigt werden, anstelle der Weiterleitung.");
774                                 break;
775
776                         case '0.8.4': // SQL queries for v0.8.4
777                                 addCreateTableSql('history', "
778 `history_id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
779 `history_subject` VARCHAR(255) NOT NULL DEFAULT 'GENERIC',
780 `history_userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
781 `history_value` VARCHAR(255) NOT NULL DEFAULT '',
782 `history_added` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
783 `history_last_used` TIMESTAMP NULL DEFAULT NULL,
784 PRIMARY KEY (`history_id`),
785 INDEX `userid` (`history_userid`),
786 INDEX (`history_last_used` DESC)",
787                                         'History of used data');
788
789                                 // Register filter
790                                 registerFilter(__FILE__, __LINE__, 'add_history_entry', 'ADD_HISTORY_ENTRY', FALSE, TRUE, isExtensionDryRun());
791
792                                 // Update notes (these will be set as task text!)
793                                 setExtensionUpdateNotes("Allgemeine Historie-Tabelle hinzugef&uuml;gt.");
794                                 break;
795
796                         case '0.8.5': // SQL queries for v0.8.5
797                                 // Old-lost configuration entry
798                                 addConfigDropSql('ext_autopurge');
799
800                                 // Update notes (these will be set as task text!)
801                                 setExtensionUpdateNotes("Uralten Konfigurationseintrag entfernt.");
802                                 break;
803
804                         case '0.8.6': // SQL queries for v0.8.6
805                                 addExtensionChangeTableColumnSql('points_data', 'payment_method', 'payment_method', "ENUM('DIRECT','REFERRAL') NOT NULL DEFAULT 'REFERRAL'");
806                                 addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_points_data` SET `payment_method`='REFERRAL' WHERE `payment_method` != 'DIRECT'");
807
808                                 // Update notes (these will be set as task text!)
809                                 setExtensionUpdateNotes("Referral/REFERRAL soll es &uuml;berall heissen (ist ein Typo nur mit einem R zu schreiben).");
810                                 break;
811
812                         case '0.8.7': // SQL queries for v0.8.7
813                                 addConfigAddSql('admin_menu_javascript', "ENUM('Y','N') NOT NULL DEFAULT 'N'");
814
815                                 // Update notes (these will be set as task text!)
816                                 setExtensionUpdateNotes("Es kann ausgew&auml;hlt werden, ob das herk&ouml;mliche JavaScrit-lose Men&uuml; oder mit JavaScript aktiv sein soll. Das herk&ouml;mliche ist erstmal Standardeinstellung, bis das JavaScript-Men&uuml; funktioniert.");
817                                 break;
818
819                         case '0.8.8': // SQL queries for v0.8.8
820                                 addExtensionDropTableIndexSql('points_data', 'subject');
821                                 addExtensionAddTableUniqueSql('points_data', 'subject', '(`subject`)');
822
823                                 // Update notes (these will be set as task text!)
824                                 setExtensionUpdateNotes("Der Wert in der Spalte <strong>subject</strong> sollte nur einmal vorkommen, damit eventuell nichts mehrfach durchfl&auuml;ft.");
825                                 break;
826
827                         case '0.8.9': // SQL queries for v0.8.9
828                                 addExtensionAddTableColumnSql('points_data', 'account_provider', "ENUM('EXTENSION', 'CUSTOM') NOT NULL DEFAULT 'EXTENSION'");
829                                 addConfigAddSql('points_remove_account', "VARCHAR(255) NOT NULL DEFAULT 'points'");
830
831                                 // Update notes (these will be set as task text!)
832                                 setExtensionUpdateNotes("&quot;Provider&quot; hinzugef&uuml;gt, welcher nur <strong>Erweiterung</strong> oder <strong>Selbstdefiniert sein kann. Es k&ouml;nnen dann auch nur selbstdefinierte gel&ouml;scht oder editiert werden, Erweiterungen k&ouml;nnen auch nur &quot;einige&quot; Eintr&auml;ge l&ouml;schen.");
833                                 break;
834
835                         case '0.9.0': // SQL queries for v0.9.0
836                                 // Register filter
837                                 registerFilter(__FILE__, __LINE__, 'init', 'GENERATE_FILE_SECRET_HASH', FALSE, TRUE, isExtensionDryRun());
838
839                                 // Register points data
840                                 registerExtensionPointsData('admin_add_single', 'points', 'LOCKED', 'DIRECT');
841                                 registerExtensionPointsData('admin_add_single_ref', 'points', 'LOCKED', 'DIRECT');
842                                 registerExtensionPointsData('admin_add_all', 'points', 'LOCKED', 'DIRECT');
843                                 registerExtensionPointsData('admin_add_all_ref', 'points', 'LOCKED', 'DIRECT');
844
845                                 // Update notes (these will be set as task text!)
846                                 setExtensionUpdateNotes("Filter zum Initialisieren von ext-sql_patches registriert und Eintr&auml;ge in <strong>{?_MYSQL_PREFIX?}_points_data</strong> hinzugef&uuml;gt.");
847                                 break;
848
849                         case '0.9.1': // SQL queries for v0.9.1
850                                 // Add admin menu
851                                 addAdminMenuSql('misc', 'list_server_name', 'Verkehrte Domains auflisten', 'Listet alle als verkehrt erkannten Domains auf.', 4);
852
853                                 // Create table
854                                 addCreateTableSql('server_name_log', "
855 `server_name_id` BIGINT (20) NOT NULL AUTO_INCREMENT,
856 `server_name` VARCHAR (255) NOT NULL DEFAULT 'invalid',
857 `server_name_remote_addr` VARCHAR (15) NOT NULL DEFAULT '0.0.0.0',
858 `server_name_ua` TINYTEXT NULL DEFAULT NULL,
859 `server_name_referrer` TINYTEXT NULL DEFAULT NULL,
860 `server_name_added` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
861 `server_name_counter` BIGINT (20) NOT NULL DEFAULT 1,
862 PRIMARY KEY (`server_name_id`)
863 ", 'Logging of wrong SERVER_NAME');
864
865                                 // Update notes (these will be set as task text!)
866                                 setExtensionUpdateNotes("Loggen von falschen <strong>SERVER_NAME</strong> Eintr&auml;gen hinzugef&uuml;gt.");
867                                 break;
868
869                         case '0.9.2': // SQL queries for v0.9.2
870                                 addExtensionAddTableColumnSql('server_name_log', 'server_name_remote_addr', "VARCHAR (15) NOT NULL DEFAULT '0.0.0.0'");
871                                 addExtensionAddTableColumnSql('server_name_log', 'server_name_counter', 'BIGINT (20) NOT NULL DEFAULT 0');
872                                 addExtensionAddTableColumnSql('server_name_log', 'server_name_ua', 'TINYTEXT NULL DEFAULT NULL');
873                                 addExtensionAddTableColumnSql('server_name_log', 'server_name_referrer', 'TINYTEXT NULL DEFAULT NULL');
874
875                                 // Update notes (these will be set as task text!)
876                                 setExtensionUpdateNotes("Sorry, hatte noch IP-Nummer, User-Agent, aufrufende Seite und Z&auml;hler vergessen.");
877                                 break;
878
879                         case '0.9.3': // SQL queries for v0.9.3
880                                 addConfigAddSql('ap_server_name', "ENUM('Y','N') NOT NULL DEFAULT 'Y'");
881                                 addConfigAddSql('ap_server_name_since', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT ' . (getOneDay() * 7));
882
883                                 // Register filter
884                                 registerFilter(__FILE__, __LINE__, 'extra_autopurge', 'SERVER_NAME_EXTRA_AUTOPURGE', FALSE, TRUE, isExtensionDryRun());
885
886                                 // Update notes (these will be set as task text!)
887                                 setExtensionUpdateNotes("Bereinigung von verkehrten <strong>SERVER_NAME</strong> Eintr&auml;gen hinzugef&uuml;gt.");
888                                 break;
889
890                         case '0.9.4': // SQL queries for v0.9.4
891                                 addAdminMenuSql('setup', 'list_referral_levels', 'Referral-Ebenen', 'Erlaubt das Auflisten, hinzuf&uuml;gen, &auml;ndern und l&ouml;schen von Referral-Ebenen. Seien Sie beim L&ouml;schen vorsichtig, da deren Id-Nummern zum Verkn&uuml;pfen verwendet werden. Sollten Sie also eine Ebene l&ouml;schen, in der Mitglieder {OPEN_CONFIG}POINTS{CLOSE_CONFIG} haben sollten, sind diese verloren.', 15);
892                                 addExtensionChangeTableColumnSql('refdepths', 'percents', 'percents', 'FLOAT(8,5) UNSIGNED NOT NULL DEFAULT 0.00000');
893
894                                 // Update notes (these will be set as task text!)
895                                 setExtensionUpdateNotes("Auflisten (usw.) von Referral-Ebenen ausgelagert in eigenen Men&uuml;punkt. Referral-Prozente d&uuml;rfen nun auch 5 Stellen hinter dem Komma haben.");
896                                 break;
897
898                         case '0.9.5': // SQL queries for v0.9.5
899                                 addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET `what`='list_cats' WHERE `action`='setup' AND `what`='config_cats' LIMIT 1");
900
901                                 // Update notes (these will be set as task text!)
902                                 setExtensionUpdateNotes("Men&uuml;punkt umbenannt, da &quot;config&quot; nur f&uuml;r die Konfigurationstabelle <strong>{?_MYSQL_PREFIX?}_config</strong> ist.");
903                                 break;
904
905                         case '0.9.6': // SQL queries for v0.9.6
906                                 // Register filter
907                                 registerFilter(__FILE__, __LINE__, 'determine_menu_mode', 'DETERMINE_MENU_MODE_GENERIC', FALSE, TRUE, isExtensionDryRun());
908
909                                 // Update notes (these will be set as task text!)
910                                 setExtensionUpdateNotes("Filter hinzugef&uuml;gt, der den Men&uuml;modus f&uuml;r weitere von dieser Erweiterung benutzten Module erkennen soll.");
911                                 break;
912
913                         case '0.9.7': // SQL queries for v0.9.7
914                                 // Register filter
915                                 registerFilter(__FILE__, __LINE__, 'config_userid_exclusion_sql', 'EXCLUDE_DEFAULT_REFID', FALSE, TRUE, isExtensionDryRun());
916
917                                 // Update notes (these will be set as task text!)
918                                 setExtensionUpdateNotes("Filter hinzugef&uuml;gt, der die Standard-Referral-Id f&uuml;r SQL-Befehle ausschliesst.");
919                                 break;
920
921                         case '0.9.8': // SQL queries for v0.9.8
922                                 addConfigChangeSql('last_hour'  , 'last_hourly' , 'TINYINT(2) UNSIGNED ZEROFILL NOT NULL DEFAULT 00');
923                                 addConfigChangeSql('last_update', 'last_daily'  , 'TINYINT(2) UNSIGNED ZEROFILL NOT NULL DEFAULT 00');
924                                 addConfigChangeSql('last_week'  , 'last_weekly' , 'TINYINT(2) UNSIGNED ZEROFILL NOT NULL DEFAULT 00');
925                                 addConfigChangeSql('last_month' , 'last_monthly', 'TINYINT(2) UNSIGNED ZEROFILL NOT NULL DEFAULT 00');
926
927                                 // Update notes (these will be set as task text!)
928                                 setExtensionUpdateNotes("Spalten umbenannt, damit die Namen (Verwendung) nun eindeutiger sind.");
929                                 break;
930                 } // END - switch
931
932 // [EOF]
933 ?>