fe3a7b12b378345e96f538263061d25463f1bd62
[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 - 2013 by Mailer Developer Team                   *
20  * For more information visit: http://mxchange.org                      *
21  *                                                                      *
22  * This program is free software; you can redistribute it and/or modify *
23  * it under the terms of the GNU General Public License as published by *
24  * the Free Software Foundation; either version 2 of the License, or    *
25  * (at your option) any later version.                                  *
26  *                                                                      *
27  * This program is distributed in the hope that it will be useful,      *
28  * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
29  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
30  * GNU General Public License for more details.                         *
31  *                                                                      *
32  * You should have received a copy of the GNU General Public License    *
33  * along with this program; if not, write to the Free Software          *
34  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
35  * MA  02110-1301  USA                                                  *
36  ************************************************************************/
37
38 // Some security stuff...
39 if (!defined('__SECURITY')) {
40         die();
41 } // END - if
42
43 // @TODO Remove double tabs from all lines
44                 switch (getCurrentExtensionVersion()) {
45                         case '0.0.1': // SQL queries for v0.0.1
46                                 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_LANGUAGE}DEFAULT_POINTS{CLOSE_LANGUAGE}'");
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                                 // Update notes (these will be set as task text!)
507                                 setExtensionUpdateNotes("Dieses Update wurde nach ext-refback verschoben.");
508                                 break;
509
510                         case '0.5.5': // SQL queries for v0.5.5
511                                 addConfigAddSql('show_points_unconfirmed', "ENUM('Y','N') NOT NULL DEFAULT 'Y'");
512
513                                 // Update notes (these will be set as task text!)
514                                 setExtensionUpdateNotes("Anzeige der {?POINTS?} unter den unbest&auml;tigten Mails kann nun optional abgeschaltet werden.");
515                                 break;
516
517                         case '0.5.6': // SQL queries for v0.5.6
518                                 // Update notes (these will be set as task text!)
519                                 setExtensionUpdateNotes("Nicht mehr g&uuml;ltiges Update.");
520                                 break;
521
522                         case '0.5.7': // SQL queries for v0.5.7
523                                 addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what`='list_norefs' LIMIT 1");
524
525                                 // Update notes (these will be set as task text!)
526                                 setExtensionUpdateNotes("Auflistung der Mitglieder ohne Werber nach what=list_user&amp;mode=norefs verschoben.");
527                                 break;
528
529                         case '0.5.8': // SQL queries for v0.5.8
530                                 addExtensionDropTableColumnSql('extensions', 'ext_lang_file');
531
532                                 // Update notes (these will be set as task text!)
533                                 setExtensionUpdateNotes("Sprachdateinamen werden nicht mehr in der Datenbank behalten.");
534                                 break;
535
536                         case '0.5.9': // SQL queries for v0.5.9
537                                 // Table 'filters' is vital because many functionality depends on it, so don't remove it
538                                 addCreateTableSql('filters', "
539 `filter_id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
540 `filter_name` VARCHAR(50) NOT NULL DEFAULT '',
541 `filter_function` VARCHAR(100) NOT NULL DEFAULT '',
542 `filter_active` ENUM('N','Y') NOT NULL DEFAULT 'Y',
543 `filter_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
544 PRIMARY KEY (`filter_id`),
545 UNIQUE INDEX `name_function` (`filter_name`, `filter_function`)",
546                                         'Filter system');
547
548                                 // Admin menu
549                                 addAdminMenuSql('setup','list_filter','Filter-Management', 'Zeigt alle im System registrierten Filter an und l&auml;sst diese de- bzw. wieder aktivieren.', 17);
550
551                                 // Update notes (these will be set as task text!)
552                                 setExtensionUpdateNotes("Tabellen f&uuml;r Filter-System hinzugef&uuml;gt.");
553                                 break;
554
555                         case '0.6.0': // SQL queries for v0.6.0
556                                 addConfigAddSql('update_filter_usage', "ENUM('N','Y') NOT NULL DEFAULT 'N'");
557
558                                 // Update notes (these will be set as task text!)
559                                 setExtensionUpdateNotes("Benutzungsstatistik eingebaut. Das Z&auml;hlen der Filterverwendungen sollte <strong>ausschliesslich</strong> zu Debugging-Zwecken eingesetzt werden.");
560                                 break;
561
562                         case '0.6.1': // SQL queries for v0.6.1
563                                 // Update notes (these will be set as task text!)
564                                 setExtensionUpdateNotes("Nicht mehr g&uuml;ltiges Update.");
565                                 break;
566
567                         case '0.6.2': // SQL queries for v0.6.2
568                                 // Depends on refback extension
569                                 addExtensionDependency('user');
570
571                                 // Update notes (these will be set as task text!)
572                                 setExtensionUpdateNotes("Abh&auml;ngigkeit von <u>ext-user</u> gesetzt.");
573                                 break;
574
575                         case '0.6.3': // SQL queries for v0.6.3
576                                 // Update notes (these will be set as task text!)
577                                 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.");
578
579                                 // Add special fix include to fix filters
580                                 addIncludeToPool('extension', 'inc/fix_filters.php');
581                                 break;
582
583                         case '0.6.4': // SQL queries for v0.6.4
584                                 // Update admin menu
585                                 addExtensionSql("UPDATE  `{?_MYSQL_PREFIX?}_admin_menu` SET `title` = REPLACE(`title`, '!POINTS!', '?POINTS?') WHERE `title` LIKE '%!POINTS!%'");
586                                 addExtensionSql("UPDATE  `{?_MYSQL_PREFIX?}_admin_menu` SET `descr` = REPLACE(`descr`, '!POINTS!', '?POINTS?') WHERE `descr` LIKE '%!POINTS!%'");
587                                 addExtensionSql("UPDATE  `{?_MYSQL_PREFIX?}_guest_menu` SET `title` = REPLACE(`title`, '!POINTS!', '?POINTS?') WHERE `title` LIKE '%!POINTS!%'");
588                                 addExtensionSql("UPDATE  `{?_MYSQL_PREFIX?}_member_menu` SET `title` = REPLACE(`title`, '!POINTS!', '?POINTS?') WHERE `title` LIKE '%!POINTS!%'");
589
590                                 // Update notes (these will be set as task text!)
591                                 setExtensionUpdateNotes("Datenbank umgestellt auf Konfigurationselemente.");
592                                 break;
593
594                         case '0.6.5': // SQL queries for v0.6.5
595                                 addConfigChangeSql('css_php', 'css_php', "ENUM('DIRECT','FILE','INLINE') NOT NULL DEFAULT 'FILE'");
596
597                                 // Update notes (these will be set as task text!)
598                                 setExtensionUpdateNotes("Ausgabe der CSS-Dateien entweder per css.php oder sie sind direkt eingebunden.");
599                                 break;
600
601                         case '0.6.6': // SQL queries for v0.6.6
602                                 addAdminMenuSql('setup', 'config_secure', 'Sicherheitseinstellungen', 'Stellen Sie ein, wie lange das Passwort eines Mitgliedes mindestens sein muss uvm.', 9);
603                                 addAdminMenuSql('setup', 'config_points', '{OPEN_CONFIG}POINTS{CLOSE_CONFIG}', 'Stellen Sie hier die Willkommensgutschrift, Referral-Gutschrift (einmalige) usw. ein.', 10);
604                                 addAdminMenuSql('email', 'email_archiv', 'E-Mail Archiv', 'Sehen Sie sich hier bereits gesendete Mails an.', 6);
605
606                                 // Update notes (these will be set as task text!)
607                                 setExtensionUpdateNotes("Die Sicherheitseinstellungen, {?POINTS?}-Einstellungen und Email-Archiv funktionieren nur, wenn diese Erweiterung installiert ist.");
608                                 break;
609
610                         case '0.6.7': // SQL queries for v0.6.7
611                                 addConfigChangeSql('index_delay', 'index_delay', 'TINYINT(3) NOT NULL DEFAULT 0');
612
613                                 // Update notes (these will be set as task text!)
614                                 setExtensionUpdateNotes("Die Weiterleitungseinstellung muss auch Werte kleiner Null akzeptieren.");
615                                 break;
616
617                         case '0.6.8': // SQL queries for v0.6.8
618                                 addExtensionChangeTableColumnSql('admin_menu', 'action', 'action', 'VARCHAR(50) NOT NULL');
619                                 addExtensionChangeTableColumnSql('admin_menu', 'what', 'what', 'VARCHAR(50) NULL DEFAULT NULL');
620                                 addExtensionChangeTableColumnSql('guest_menu', 'action', 'action', 'VARCHAR(50) NOT NULL');
621                                 addExtensionChangeTableColumnSql('admin_menu', 'what', 'what', 'VARCHAR(50) NULL DEFAULT NULL');
622                                 addExtensionChangeTableColumnSql('member_menu', 'action', 'action', 'VARCHAR(50) NOT NULL');
623                                 addExtensionChangeTableColumnSql('admin_menu', 'what', 'what', 'VARCHAR(50) NULL DEFAULT NULL');
624
625                                 // Update notes (these will be set as task text!)
626                                 setExtensionUpdateNotes("Spalten verk&uuml;rzt, damit die Schl&uuml;ssel passen.");
627                                 break;
628
629                         case '0.6.9': // SQL queries for 0.6.9
630                                 // Register filter
631                                 registerFilter(__FILE__, __LINE__, 'member_login_check', 'RESET_USER_LOGIN_FAILURE', FALSE, TRUE, isExtensionDryRun());
632
633                                 // Update notes (these will be set as task text!)
634                                 setExtensionUpdateNotes("Filter zum Zur&uuml;cksetzens des fehlgeschlagenen Mitgliederlogins hinzugef&uuml;gt (internes TODO).");
635                                 break;
636
637                         case '0.7.0': // SQL queries for 0.7.0
638                                 // Table definition
639                                 addDropTableSql('dns_cache');
640                                 addCreateTableSql('dns_cache', "
641 `hostname` VARCHAR(255) NOT NULL,
642 `ip` VARCHAR(15) NOT NULL,
643 `added` DATETIME NOT NULL,
644 PRIMARY KEY (`hostname`),
645 INDEX (`ip`)",
646                                         'Cache for DNS requests');
647
648                                 // Configuration
649                                 addConfigAddSql('dns_cache_timeout', 'BIGINT(20) NOT NULL DEFAULT ' . (60*60*24));
650
651                                 // Register filter
652                                 registerFilter(__FILE__, __LINE__, 'reset', 'CLEANUP_DNS_CACHE', FALSE, TRUE, isExtensionDryRun());
653
654                                 // Update notes (these will be set as task text!)
655                                 setExtensionUpdateNotes("IP-Resolver-Klasse hinzugef&uuml;gt, um bei der Erweiterung ext-network DNS-Anfragen einzusparen.");
656                                 break;
657
658                         case '0.7.1': // SQL queries for v0.7.1
659                                 // This update just depends on ext-timezone to make integration of an essential extension much easier
660                                 addExtensionDependency('timezone');
661
662                                 // Update notes (these will be set as task text!)
663                                 setExtensionUpdateNotes("Zeitzone ist nun mit ext-timezone konfigurierbar.");
664                                 break;
665
666                         case '0.7.2': // SQL queries for v0.7.2
667                                 addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_task_system` SET `task_type`='MEMBER_SUPPORT' WHERE `task_type`='SUPPORT_MEMBER'");
668
669                                 // Update notes (these will be set as task text!)
670                                 setExtensionUpdateNotes("Daten an Namenskonvention angepasst.");
671                                 break;
672
673                         case '0.7.3': // SQL queries for v0.7.3
674                                 addExtensionChangeTableColumnSql('filters', 'filter_name', 'filter_name', "VARCHAR(50) NOT NULL DEFAULT ''");
675                                 addExtensionChangeTableColumnSql('filters', 'filter_function', 'filter_function', "VARCHAR(100) NOT NULL DEFAULT ''");
676
677                                 // Update notes (these will be set as task text!)
678                                 setExtensionUpdateNotes("Spalten in Filtertabelle gek&uuml;rzt (SQL-Fehler wegen zu grossem Schl&uuml;ssel).");
679                                 break;
680
681                         case '0.7.4': // SQL queries for v0.7.4
682                                 addExtensionAddTableColumnSql('pool', 'mails_sent', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 0');
683
684                                 // Update notes (these will be set as task text!)
685                                 setExtensionUpdateNotes("Spalten in Filtertabelle gek&uuml;rzt (SQL-Fehler wegen zu grossem Schl&uuml;ssel).");
686                                 break;
687
688                         case '0.7.5': // SQL queries for v0.7.5
689                                 addConfigAddSql('last_hourly', 'TINYINT(2) UNSIGNED ZEROFILL NOT NULL DEFAULT 00');
690
691                                 // Update notes (these will be set as task text!)
692                                 setExtensionUpdateNotes("Aktuelle Stunde hinzugef&uuml;gt (ist nicht konfigurierbar).");
693                                 break;
694
695                         case '0.7.6': // SQL queries for v0.7.6
696                                 addConfigChangeSql('last_month', 'last_monthly', 'TINYINT(2) UNSIGNED ZEROFILL NOT NULL DEFAULT 00');
697                                 addConfigChangeSql('last_week' , 'last_weekly' , 'TINYINT(2) UNSIGNED ZEROFILL NOT NULL DEFAULT 00');
698
699                                 // Update notes (these will be set as task text!)
700                                 setExtensionUpdateNotes("Spaltentyp fuer kleine Zahlen sollten auch z.B. TINYINT sein.");
701                                 break;
702
703                         case '0.7.7': // SQL queries for v0.7.7
704                                 addMemberMenuSql('earn', NULL, 'Verdienen', 2);
705                                 addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `action`='earn',`sort`=1 WHERE `what`='unconfirmed' LIMIT 1");
706
707                                 // Update notes (these will be set as task text!)
708                                 setExtensionUpdateNotes("Men&uuml;punkt <strong>Verdienen</strong> hinzugef&uuml;gt und <strong>Unbest&auml;tigte Mails</strong> als ersten Punkt dort hin verschoben.");
709                                 break;
710
711                         case '0.7.8': // SQL queries for v0.7.8
712                                 // Update notes (these will be set as task text!)
713                                 setExtensionUpdateNotes("Konfigurationseintr&auml;ge mit Spaltentyp <strong>ENUM</strong> werden nun immer komplett gross geschrieben.");
714                                 break;
715
716                         case '0.7.9': // SQL queries for v0.7.9
717                                 addExtensionSQL("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET `what`='list_email_max_rec' WHERE `what`='config_email' LIMIT 1");
718
719                                 // Update notes (these will be set as task text!)
720                                 setExtensionUpdateNotes("Adminscript <strong>what-config_email.php</strong> nach <strong>what-list_email_max_rec.php</strong> umbenannt.");
721                                 break;
722
723                         case '0.8.0': // SQL queries for v0.8.0
724                                 // Points account data (this table should not be dropped or else you may have to re-install a lot extensions)
725                                 addCreateTableSql('points_data', "
726 `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
727 `subject` VARCHAR(255) NOT NULL DEFAULT '',
728 `column_name` VARCHAR(255) NOT NULL DEFAULT 'points',
729 `locked_mode` ENUM('LOCKED','UNLOCKED') NOT NULL DEFAULT 'LOCKED',
730 `payment_method` ENUM('DIRECT','REFERRAL') NOT NULL DEFAULT 'REFERRAL',
731 `notify_recipient` ENUM('Y','N') NOT NULL DEFAULT 'N',
732 PRIMARY KEY (`id`),
733 UNIQUE KEY (`subject`)",
734                                         'Points account data');
735
736                                 // Admin menu
737                                 addAdminMenuSql('setup', 'list_point_accounts', 'Guthabenkonten...', 'Veralten Sie hier bequem Einstellungen zu den Guthabenkonten.', 5);
738
739                                 // Update notes (these will be set as task text!)
740                                 setExtensionUpdateNotes("Tabelle <span class=\"bad\">points_data</span> erzeugt, diese soll das {?POINTS?}-Guthaben komplett lenken.");
741                                 break;
742
743                         case '0.8.1': // SQL queries for v0.8.1
744                                 addExtensionChangeTableColumnSql('refdepths', 'level', 'level', 'TINYINT(3) UNSIGNED NULL DEFAULT NULL');
745                                 addExtensionSql('UPDATE `{?_MYSQL_PREFIX?}_refdepths` SET `level`=NULL WHERE `level`=0 LIMIT 1');
746
747                                 // Update notes (these will be set as task text!)
748                                 setExtensionUpdateNotes("Level 0 ist nun auch NULL.");
749                                 break;
750
751                         case '0.8.2': // SQL queries for v0.8.2
752                                 addExtensionDropTableIndexSql('points_data', 'ext_name');
753                                 addExtensionChangeTableColumnSql('points_data', 'ext_name', 'subject', "VARCHAR(255) NOT NULL DEFAULT ''");
754                                 addExtensionAddTableColumnSql('points_data', 'notify_recipient', "ENUM('Y','N') NOT NULL DEFAULT 'N'");
755
756                                 // Register points data
757                                 registerExtensionPointsData('pool_payback', 'points', 'LOCKED', 'DIRECT');
758                                 registerExtensionPointsData('mail_deleted', 'points', 'LOCKED', 'DIRECT');
759
760                                 // Remove deprecated configuration entry
761                                 addConfigDropSql('reg_points_mode');
762
763                                 // Update notes (these will be set as task text!)
764                                 setExtensionUpdateNotes("Es sollte der Gutschriftenbetreff und nicht der Erweiterungsname gepeichert werden, zudem brauchen wir einen Konfigurationseintrag nicht mehr.");
765                                 break;
766
767                         case '0.8.3': // SQL queries for v0.8.3
768                                 addConfigAddSql('display_home_in_index', "ENUM('Y','N') NOT NULL DEFAULT 'Y'");
769
770                                 // Update notes (these will be set as task text!)
771                                 setExtensionUpdateNotes("Es kann nun die &quot;Home&quot;-Seite in <strong>index.php</strong> angezeigt werden, anstelle der Weiterleitung.");
772                                 break;
773
774                         case '0.8.4': // SQL queries for v0.8.4
775                                 addCreateTableSql('history', "
776 `history_id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
777 `history_subject` VARCHAR(255) NOT NULL DEFAULT 'GENERIC',
778 `history_userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
779 `history_value` VARCHAR(255) NOT NULL DEFAULT '',
780 `history_added` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
781 `history_last_used` TIMESTAMP NULL DEFAULT NULL,
782 PRIMARY KEY (`history_id`),
783 INDEX `userid` (`history_userid`),
784 INDEX (`history_last_used` DESC)",
785                                         'History of used data');
786
787                                 // Register filter
788                                 registerFilter(__FILE__, __LINE__, 'add_history_entry', 'ADD_HISTORY_ENTRY', FALSE, TRUE, isExtensionDryRun());
789
790                                 // Update notes (these will be set as task text!)
791                                 setExtensionUpdateNotes("Allgemeine Historie-Tabelle hinzugef&uuml;gt.");
792                                 break;
793
794                         case '0.8.5': // SQL queries for v0.8.5
795                                 // Old-lost configuration entry
796                                 addConfigDropSql('ext_autopurge');
797
798                                 // Update notes (these will be set as task text!)
799                                 setExtensionUpdateNotes("Uralten Konfigurationseintrag entfernt.");
800                                 break;
801
802                         case '0.8.6': // SQL queries for v0.8.6
803                                 addExtensionChangeTableColumnSql('points_data', 'payment_method', 'payment_method', "ENUM('DIRECT','REFERRAL') NOT NULL DEFAULT 'REFERRAL'");
804                                 addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_points_data` SET `payment_method`='REFERRAL' WHERE `payment_method` != 'DIRECT'");
805
806                                 // Update notes (these will be set as task text!)
807                                 setExtensionUpdateNotes("Referral/REFERRAL soll es &uuml;berall heissen (ist ein Typo nur mit einem R zu schreiben).");
808                                 break;
809
810                         case '0.8.7': // SQL queries for v0.8.7
811                                 addConfigAddSql('admin_menu_javascript', "ENUM('Y','N') NOT NULL DEFAULT 'N'");
812
813                                 // Update notes (these will be set as task text!)
814                                 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.");
815                                 break;
816
817                         case '0.8.8': // SQL queries for v0.8.8
818                                 addExtensionDropTableIndexSql('points_data', 'subject');
819                                 addExtensionAddTableUniqueSql('points_data', 'subject', '(`subject`)');
820
821                                 // Update notes (these will be set as task text!)
822                                 setExtensionUpdateNotes("Der Wert in der Spalte <strong>subject</strong> sollte nur einmal vorkommen, damit eventuell nichts mehrfach durchfl&auuml;ft.");
823                                 break;
824
825                         case '0.8.9': // SQL queries for v0.8.9
826                                 addExtensionAddTableColumnSql('points_data', 'account_provider', "ENUM('EXTENSION', 'CUSTOM') NOT NULL DEFAULT 'EXTENSION'");
827                                 addConfigAddSql('points_remove_account', "VARCHAR(255) NOT NULL DEFAULT 'points'");
828
829                                 // Update notes (these will be set as task text!)
830                                 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.");
831                                 break;
832
833                         case '0.9.0': // SQL queries for v0.9.0
834                                 // Register filter
835                                 registerFilter(__FILE__, __LINE__, 'init', 'GENERATE_FILE_SECRET_HASH', FALSE, TRUE, isExtensionDryRun());
836
837                                 // Register points data
838                                 registerExtensionPointsData('admin_add_single', 'points', 'LOCKED', 'DIRECT');
839                                 registerExtensionPointsData('admin_add_all', 'points', 'LOCKED', 'DIRECT');
840
841                                 // Update notes (these will be set as task text!)
842                                 setExtensionUpdateNotes("Filter zum Initialisieren von ext-sql_patches registriert und Eintr&auml;ge in <strong>{?_MYSQL_PREFIX?}_points_data</strong> hinzugef&uuml;gt.");
843                                 break;
844
845                         case '0.9.1': // SQL queries for v0.9.1
846                                 // Add admin menu
847                                 addAdminMenuSql('misc', 'list_server_name', 'Verkehrte Domains auflisten', 'Listet alle als verkehrt erkannten Domains auf.', 4);
848
849                                 // Create table
850                                 addCreateTableSql('server_name_log', "
851 `server_name_id` BIGINT (20) NOT NULL AUTO_INCREMENT,
852 `server_name` VARCHAR (255) NOT NULL DEFAULT 'invalid',
853 `server_name_remote_addr` VARCHAR (15) NOT NULL DEFAULT '0.0.0.0',
854 `server_name_ua` TINYTEXT NULL DEFAULT NULL,
855 `server_name_referrer` TINYTEXT NULL DEFAULT NULL,
856 `server_name_added` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
857 `server_name_counter` BIGINT (20) NOT NULL DEFAULT 1,
858 PRIMARY KEY (`server_name_id`)
859 ", 'Logging of wrong SERVER_NAME');
860
861                                 // Update notes (these will be set as task text!)
862                                 setExtensionUpdateNotes("Loggen von falschen <strong>SERVER_NAME</strong> Eintr&auml;gen hinzugef&uuml;gt.");
863                                 break;
864
865                         case '0.9.2': // SQL queries for v0.9.2
866                                 addExtensionAddTableColumnSql('server_name_log', 'server_name_remote_addr', "VARCHAR (15) NOT NULL DEFAULT '0.0.0.0'");
867                                 addExtensionAddTableColumnSql('server_name_log', 'server_name_counter', 'BIGINT (20) NOT NULL DEFAULT 0');
868                                 addExtensionAddTableColumnSql('server_name_log', 'server_name_ua', 'TINYTEXT NULL DEFAULT NULL');
869                                 addExtensionAddTableColumnSql('server_name_log', 'server_name_referrer', 'TINYTEXT NULL DEFAULT NULL');
870
871                                 // Update notes (these will be set as task text!)
872                                 setExtensionUpdateNotes("Sorry, hatte noch IP-Nummer, User-Agent, aufrufende Seite und Z&auml;hler vergessen.");
873                                 break;
874
875                         case '0.9.3': // SQL queries for v0.9.3
876                                 addConfigAddSql('ap_server_name', "ENUM('Y','N') NOT NULL DEFAULT 'Y'");
877                                 addConfigAddSql('ap_server_name_since', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT ' . (getOneDay() * 7));
878
879                                 // Register filter
880                                 registerFilter(__FILE__, __LINE__, 'extra_autopurge', 'SERVER_NAME_EXTRA_AUTOPURGE', FALSE, TRUE, isExtensionDryRun());
881
882                                 // Update notes (these will be set as task text!)
883                                 setExtensionUpdateNotes("Bereinigung von verkehrten <strong>SERVER_NAME</strong> Eintr&auml;gen hinzugef&uuml;gt.");
884                                 break;
885
886                         case '0.9.4': // SQL queries for v0.9.4
887                                 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);
888                                 addExtensionChangeTableColumnSql('refdepths', 'percents', 'percents', 'FLOAT(8,5) UNSIGNED NOT NULL DEFAULT 0.00000');
889
890                                 // Update notes (these will be set as task text!)
891                                 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.");
892                                 break;
893
894                         case '0.9.5': // SQL queries for v0.9.5
895                                 addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET `what`='list_cats' WHERE `action`='setup' AND `what`='config_cats' LIMIT 1");
896
897                                 // Update notes (these will be set as task text!)
898                                 setExtensionUpdateNotes("Men&uuml;punkt umbenannt, da &quot;config&quot; nur f&uuml;r die Konfigurationstabelle <strong>{?_MYSQL_PREFIX?}_config</strong> ist.");
899                                 break;
900
901                         case '0.9.6': // SQL queries for v0.9.6
902                                 // Register filter
903                                 registerFilter(__FILE__, __LINE__, 'determine_menu_mode', 'DETERMINE_MENU_MODE_GENERIC', FALSE, TRUE, isExtensionDryRun());
904
905                                 // Update notes (these will be set as task text!)
906                                 setExtensionUpdateNotes("Filter hinzugef&uuml;gt, der den Men&uuml;modus f&uuml;r weitere von dieser Erweiterung benutzten Module erkennen soll.");
907                                 break;
908
909                         case '0.9.7': // SQL queries for v0.9.7
910                                 // Register filter
911                                 registerFilter(__FILE__, __LINE__, 'config_userid_exclusion_sql', 'EXCLUDE_DEFAULT_REFID', FALSE, TRUE, isExtensionDryRun());
912
913                                 // Update notes (these will be set as task text!)
914                                 setExtensionUpdateNotes("Filter hinzugef&uuml;gt, der die Standard-Referral-Id f&uuml;r SQL-Befehle ausschliesst.");
915                                 break;
916
917                         case '0.9.8': // SQL queries for v0.9.8
918                                 addConfigChangeSql('last_hour'  , 'last_hourly' , 'TINYINT(2) UNSIGNED ZEROFILL NOT NULL DEFAULT 00');
919                                 addConfigChangeSql('last_update', 'last_daily'  , 'TINYINT(2) UNSIGNED ZEROFILL NOT NULL DEFAULT 00');
920                                 addConfigChangeSql('last_week'  , 'last_weekly' , 'TINYINT(2) UNSIGNED ZEROFILL NOT NULL DEFAULT 00');
921                                 addConfigChangeSql('last_month' , 'last_monthly', 'TINYINT(2) UNSIGNED ZEROFILL NOT NULL DEFAULT 00');
922
923                                 // Update notes (these will be set as task text!)
924                                 setExtensionUpdateNotes("Spalten umbenannt, damit die Namen (Verwendung) nun eindeutiger sind.");
925                                 break;
926
927                         case '0.9.9': // SQL queries for v0.9.9
928                                 addConfigAddSql('last_yearly', 'SMALLINT(4) UNSIGNED ZEROFILL NOT NULL DEFAULT ' . getYear());
929                                 addConfigChangeSql('pass_len', 'min_password_length', 'TINYINT(2) UNSIGNED NOT NULL DEFAULT 5');
930                                 addConfigAddSql('min_password_score', 'TINYINT(2) UNSIGNED NOT NULL DEFAULT 3');
931                                 addModuleSql('api', '{OPEN_LANGUAGE}MODULE_GENERIC_API_TITLE{CLOSE_LANGUAGE}', 'Y', 'Y', 'N', 'N');
932
933                                 // Make this depending on ext-mods
934                                 addExtensionDependency('mods');
935
936                                 // Update notes (these will be set as task text!)
937                                 setExtensionUpdateNotes("Jahres-Reset + generelles API-Modul hinzugef&uuml;gt.");
938                                 break;
939
940                         case '1.0.0': // SQL queries for v1.0.0
941                                 addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `action`='account' WHERE `what`='categories'");
942
943                                 // Update notes (these will be set as task text!)
944                                 setExtensionUpdateNotes("Auswahl im Mitgliedsbereich verschoben nach &quot;Ihr Account&quot;.");
945                                 break;
946
947                         case '1.0.1': // SQL queries for v1.0.1
948                                 addModuleSql('ajax', 'AJAX', 'N', 'Y', 'N', 'N');;
949
950                                 // Update notes (these will be set as task text!)
951                                 setExtensionUpdateNotes("AJAX-Modul hinzugef&uuml;gt.");
952                                 break;
953                 } // END - switch
954
955 // [EOF]
956 ?>