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