More rewrites to configuration:
[mailer.git] / inc / extensions / register / mode-update.php
1 <?php
2 /************************************************************************
3  * Mailer v0.2.1-FINAL                                Start: 01/23/2013 *
4  * ===================                          Last change: 01/23/2013 *
5  *                                                                      *
6  * -------------------------------------------------------------------- *
7  * File              : mode-update.php                                  *
8  * -------------------------------------------------------------------- *
9  * Short description : Swapped out registration system for new members  *
10  * -------------------------------------------------------------------- *
11  * Kurzbeschreibung  : Ausgelagertes Anmeldesystem fuer Mitglieder      *
12  * -------------------------------------------------------------------- *
13  * $Revision::                                                        $ *
14  * $Date::                                                            $ *
15  * $Tag:: 0.2.1-FINAL                                                 $ *
16  * $Author::                                                          $ *
17  * -------------------------------------------------------------------- *
18  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
19  * Copyright (c) 2009 - 2012 by Mailer Developer Team                   *
20  * For more information visit: http://mxchange.org                      *
21  *                                                                      *
22  * This program is free software; you can redistribute it and/or modify *
23  * it under the terms of the GNU General Public License as published by *
24  * the Free Software Foundation; either version 2 of the License, or    *
25  * (at your option) any later version.                                  *
26  *                                                                      *
27  * This program is distributed in the hope that it will be useful,      *
28  * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
29  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
30  * GNU General Public License for more details.                         *
31  *                                                                      *
32  * You should have received a copy of the GNU General Public License    *
33  * along with this program; if not, write to the Free Software          *
34  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
35  * MA  02110-1301  USA                                                  *
36  ************************************************************************/
37
38 // Some security stuff...
39 if (!defined('__SECURITY')) {
40         die();
41 } // END - if
42
43 // @TODO Remove double tabs from all lines
44                 switch (getCurrentExtensionVersion()) {
45                         case '0.1.0': // SQL queries for v0.1.0
46                                 addDropTableSql('must_register');
47                                 addCreateTableSql('must_register', "
48 `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
49 `field_name` VARCHAR(255) NOT NULL DEFAULT '',
50 `field_required` ENUM('Y','N') NOT NULL DEFAULT 'Y',
51 PRIMARY KEY (`id`)",
52                                         'Data which fields the user must fill out');
53
54                                 // Add all entries as required (DO NOT DELETE THEM FROM DATABASE!)
55                                 addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_must_register` (`field_name`, `field_required`) VALUES ('surname', 'Y')");
56                                 addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_must_register` (`field_name`, `field_required`) VALUES ('family', 'Y')");
57                                 addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_must_register` (`field_name`, `field_required`) VALUES ('street_nr', 'Y')");
58                                 addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_must_register` (`field_name`, `field_required`) VALUES ('cntry', 'Y')");
59                                 addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_must_register` (`field_name`, `field_required`) VALUES ('zip', 'Y')");
60                                 addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_must_register` (`field_name`, `field_required`) VALUES ('city', 'Y')");
61
62                                 // Add admin menu
63                                 addAdminMenuSql('setup','config_register','Pflichtfelder','Stellen Sie hier die Pflichtfelder sowohl im Anmeldeformular, als auch im Mitgliedsbereich unter <strong>Profildaten &auml;ndern</strong> ein.', 12);
64
65                                 // Update notes (these will be set as task text!)
66                                 setExtensionUpdateNotes("Einstellbare Pflichtfelder hinzugef&uuml;gt.");
67                                 break;
68
69                         case '0.1.1': // SQL queries for v0.1.1
70                                 // Update notes (these will be set as task text!)
71                                 setExtensionUpdateNotes("Veraltetes Update entfernt.");
72                                 break;
73
74                         case '0.1.3': // SQL queries for v0.1.3
75                                 // Update notes (these will be set as task text!)
76                                 setExtensionUpdateNotes("Standard Referral-Id kann per Admin-Bereich eingestellt werden (war vorher nur in modules.php und index.php direkt eingebbar.)");
77                                 break;
78
79                         case '0.1.4': // SQL queries for v0.1.4
80                                 // Update notes (these will be set as task text!)
81                                 setExtensionUpdateNotes("Wegen des Theme-Supportes hat sich die URL zur CSS-Datei ge&auml;ndert.");
82                                 break;
83
84                         case '0.1.5': // SQL queries for v0.1.5
85                                 // Update notes (these will be set as task text!)
86                                 setExtensionUpdateNotes("Konfiguration der Pflichtangaben ausgelagert in Template");
87                                 break;
88
89                         case '0.1.6': // SQL queries for v0.1.6
90                                 // Update notes (these will be set as task text!)
91                                 setExtensionUpdateNotes("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
92                                 break;
93
94                         case '0.1.7': // SQL queries for v0.1.7
95                                 // Update notes (these will be set as task text!)
96                                 setExtensionUpdateNotes("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
97                                 break;
98
99                         case '0.1.8': // SQL queries for v0.1.8
100                                 // Update notes (these will be set as task text!)
101                                 setExtensionUpdateNotes("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
102                                 break;
103
104                         case '0.1.9': // SQL queries for v0.1.9
105                                 // Update notes (these will be set as task text!)
106                                 setExtensionUpdateNotes("Pflichtfelder wieder eingebaut (waren irgentwie ausgebaut???)");
107                                 break;
108
109                         case '0.2.0': // SQL queries for v0.2.0
110                                 // Update notes (these will be set as task text!)
111                                 setExtensionUpdateNotes("Problem mit Speicherung der Einstellungen beseitigt.");
112                                 break;
113
114                         case '0.2.1': // SQL queries for v0.2.1
115                                 // Update notes (these will be set as task text!)
116                                 setExtensionUpdateNotes("Men&uuml;punkte im Gast-/Mitgliedsbereich k&ouml;nnen nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist.");
117                                 break;
118
119                         case '0.2.2': // SQL queries for v0.2.2
120                                 // Update notes (these will be set as task text!)
121                                 setExtensionUpdateNotes("S&auml;mtliche Sperren bei eingeloggten Admin deaktiviert.");
122                                 break;
123
124                         case '0.2.3': // SQL queries for v0.2.3
125                                 // Update notes (these will be set as task text!)
126                                 setExtensionUpdateNotes("Cookie <u>refid</u> aus Anmeldeformular entfernt.");
127                                 break;
128
129                         case '0.2.4': // SQL queries for v0.2.4
130                                 // Update notes (these will be set as task text!)
131                                 setExtensionUpdateNotes("Design &quot;Solid-Business&quot; eingebaut.");
132                                 break;
133
134                         case '0.2.5': // SQL queries for v0.2.5
135                                 // Update notes (these will be set as task text!)
136                                 setExtensionUpdateNotes("Seit <strong>Patch 340</strong> &uuml;berfl&uuml;ssige HTML-Tags entfernt.");
137                                 break;
138
139                         case '0.2.6': // SQL queries for v0.2.6
140                                 // Update notes (these will be set as task text!)
141                                 setExtensionUpdateNotes("IP-Nummer und Browserbezeichnung wird in Admin-Mails eingesetzt.");
142                                 break;
143
144                         case '0.2.7': // SQL queries for v0.2.7
145                                 // Update notes (these will be set as task text!)
146                                 setExtensionUpdateNotes("Referral-Id wird endlich korrekt gesetzt.");
147                                 break;
148
149                         case '0.2.8': // SQL queries for v0.2.8
150                                 // Update notes (these will be set as task text!)
151                                 setExtensionUpdateNotes("Parse error in <u>what-register.php</u> beseitigt.");
152                                 break;
153
154                         case '0.2.9': // SQL queries for v0.2.9
155                                 // Update notes (these will be set as task text!)
156                                 setExtensionUpdateNotes("Anrede &quot;Firma&quot; hinzugef&uuml;gt.");
157                                 break;
158
159                         case '0.3.0': // SQL queries for v0.3.0
160                                 // Update notes (these will be set as task text!)
161                                 setExtensionUpdateNotes("W&ouml;rter <strong>{?mt_word?}</strong>, <strong>{?mt_word2?}</strong> und <strong>{?mt_word3?}</strong> sind austauschbar.");
162                                 break;
163
164                         case '0.3.1': // SQL queries for v0.3.1
165                                 // Update notes (these will be set as task text!)
166                                 setExtensionUpdateNotes("Email-Adresse wird vor dem Speichern auf G&uuml;ltigkeit hin getestet.");
167                                 break;
168
169                         case '0.3.2': // SQL queries for v0.3.2
170                                 // Update notes (these will be set as task text!)
171                                 setExtensionUpdateNotes("Einbindung der Erweiterung <strong>country</strong>, die Sie sich noch optional von <strike>meiner Seite herunterladen</strike> m&uuml;ssen.<br />
172 <br />
173 <strong>Wichtig: Laden Sie noch das Template <strong>guest_register.tpl</strong> mit hoch, welches unter templates/".getLanguage()."/html/guest/ zu finden ist!</strong>");
174                                 break;
175
176                         case '0.3.3': // SQL queries for v0.3.3
177                                 // Update notes (these will be set as task text!)
178                                 setExtensionUpdateNotes("Es werden dem Mitglied nur aktivierte L&auml;ndercodes zur Auswahl angeboten.");
179                                 break;
180
181                         case '0.3.4': // SQL queries for v0.3.4
182                                 // Update notes (these will be set as task text!)
183                                 setExtensionUpdateNotes("Auf Grund der Integration der neue Erweiterung <strong>country</strong> in die Anmeldephase klappte die Anmeldung nicht. Die dazu n&uuml;tige Verkn&uuml;pfung ist nun eingebaut und die Anmeldung klappt wieder. Vielen Dank nochmals an den Bug-Reporter (Fehlermelder)!");
184                                 break;
185
186                         case '0.3.5': // SQL queries for v0.3.5
187                                 // Update notes (these will be set as task text!)
188                                 setExtensionUpdateNotes("Design wird nach Anmeldung auch endlich im Mitgliedsmen&uuml; &uuml;bernommen.");
189                                 break;
190
191                         case '0.3.6': // SQL queries for v0.3.6
192                                 // Update notes (these will be set as task text!)
193                                 setExtensionUpdateNotes("Fehlermeldung <strong>Fatal error: Call to undefined function: get_theme() in /../../guest/what-register.php on line 190</strong> beseitigt.");
194                                 break;
195
196                         case '0.3.7': // SQL queries for v0.3.7
197                                 // Update notes (these will be set as task text!)
198                                 setExtensionUpdateNotes("Fehlermeldung <strong>Fatal error: Call to undefined function: get_curr_theme<u>e</u>() in /../../guest/what-register.php on line 190</strong> beseitigt.");
199                                 break;
200
201                         case '0.3.8': // SQL queries for v0.3.8
202                                 // Update notes (these will be set as task text!)
203                                 setExtensionUpdateNotes("Weitere SQL-Befehle abgesichert.");
204                                 break;
205
206                         case '0.3.9': // SQL queries for v0.3.9
207                                 // Update notes (these will be set as task text!)
208                                 setExtensionUpdateNotes("Abspeichern von Einstellungen repariert.");
209                                 break;
210
211                         case '0.4.0': // SQL queries for v0.4.0
212                                 // Update notes (these will be set as task text!)
213                                 setExtensionUpdateNotes("Abspeichern von Einstellungen repariert.");
214                                 break;
215
216                         case '0.4.1': // SQL queries for v0.4.1
217                                 // Update notes (these will be set as task text!)
218                                 setExtensionUpdateNotes("Vorbereitung auf die neue Mediendaten v0.0.4.");
219                                 break;
220
221                         case '0.4.2': // SQL queries for v0.4.2
222                                 addConfigAddSql('register_default', "ENUM('Y','N') NOT NULL DEFAULT 'N'");
223
224                                 // Update notes (these will be set as task text!)
225                                 setExtensionUpdateNotes("Bei der Anmeldung kann die Standard-Auswahl zwischen Ja/Nein umgeschaltet werden. Das &Auml;ndern des Templates <strong>templates/".getLanguage()."/html/guest/guest_register.tpl</strong> ist nicht mehr n&ouml;tig.");
226                                 break;
227
228                         case '0.4.3': // SQL queries for v0.4.3
229                                 // Update notes (these will be set as task text!)
230                                 setExtensionUpdateNotes("Parser-Error in <strong>inc/modules/guest/what-register.php</strong> beseitigt.");
231                                 break;
232
233                         case '0.4.4': // SQL queries for v0.4.4
234                                 // Update notes (these will be set as task text!)
235                                 setExtensionUpdateNotes("Anmeldefehler (EMail-Adresse war immer ein Ausrufezeichen) beseitigt.");
236                                 break;
237
238                         case '0.4.5': // SQL queries for v0.4.5
239                                 // Update notes (these will be set as task text!)
240                                 setExtensionUpdateNotes("if-Anweisungen auf Funktion <strong>empty()</strong> umgestellt.");
241                                 break;
242
243                         case '0.4.6': // SQL queries for v0.4.6
244                                 // Update notes (these will be set as task text!)
245                                 setExtensionUpdateNotes("Einstellung nach {?POINTS?}-Einstellungen verlagert.");
246                                 break;
247
248                         case '0.4.7': // SQL queries for v0.4.7
249                                 // Update notes (these will be set as task text!)
250                                 setExtensionUpdateNotes("<strong>setSession()</strong> mit @-Zeichen gegen ungewollte Ausgaben abgesichert.");
251                                 break;
252
253                         case '0.4.8': // SQL queries for v0.4.8
254                                 // Update notes (these will be set as task text!)
255                                 setExtensionUpdateNotes("Hash-Erstellung von <strong>md5()</strong> auf bessere Funktion <strong>generateHash()</strong> umgestellt.");
256                                 break;
257
258                         case '0.4.9': // SQL queries for v0.4.9
259                                 // Update notes (these will be set as task text!)
260                                 setExtensionUpdateNotes("Problem mit nicht anzeigbaren Kategorien in der Anmeldung beseitigt.");
261                                 break;
262
263                         case '0.5.0': // SQL queries for v0.5.0
264                                 // Update notes (these will be set as task text!)
265                                 setExtensionUpdateNotes("Fehlermeldung <span class=\"bad\"><strong>Fatal error:</strong> Call to undefined function registerGenerateCategoryTable() in <strong>{?PATH?}/inc/modules/guest/what-register.php</strong> on line <strong>434</strong></span> beseitigt.");
266                                 break;
267
268                         case '0.5.1': // SQL queries for v0.5.1
269                                 // Update notes (these will be set as task text!)
270                                 setExtensionUpdateNotes("Mail-Template <strong>register-member.tpl</strong> gefixt. Danke an <a href=\"http://forum.mxchange.org/profile-59.html\" target=\"_blank\" title=\"Mitgliedsprofil aufrufen\">wliepe</a> f&uuml;r die Fehlerfindung!");
271                                 break;
272
273                         case '0.5.2': // SQL queries for v0.5.2
274                                 // Update notes (these will be set as task text!)
275                                 setExtensionUpdateNotes("Fehlerhinweis bei deaktivierter Erweiterung verbessert.");
276                                 break;
277
278                         case '0.5.3': // SQL queries for v0.5.3
279                                 // Register a filter
280                                 registerFilter(__FILE__, __LINE__, 'register_must_fillout', 'REGISTER_MUST_FILLOUT', FALSE, TRUE, isExtensionDryRun());
281
282                                 // Run these SQLs
283                                 addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_must_register` (`field_name`, `field_required`) VALUES ('gender','Y')");
284                                 addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_must_register` (`field_name`, `field_required`) VALUES ('email','Y')");
285                                 addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_must_register` (`field_name`, `field_required`) VALUES ('birthday','Y')");
286                                 addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_must_register` (`field_name`, `field_required`) VALUES ('marker','Y')");
287
288                                 // Update notes (these will be set as task text!)
289                                 setExtensionUpdateNotes("Filter <strong>register_must_fillout</strong> hinzugef&uuml;gt, weitere Felder in <span class=\"bad\">{?_MYSQL_PREFIX?}_must_register</span> eingef&uuml;gt.");
290                                 break;
291
292                         case '0.5.4': // SQL queries for v0.5.4
293                                 addAdminMenuSql('setup', 'config_register2', 'Anmeldeformular', 'Stellen Sie ein, wie viel Kategorien der Gast bei der Anmeldung mindestens einstellen muss. Diese Einstellung gilt nachher auch im Mitgliedsbereich!', 8);
294
295                                 // Update notes (these will be set as task text!)
296                                 setExtensionUpdateNotes("Weiteren Men&uuml;punkt aus <strong>menu-{?DEFAULT_LANG?} heraus geholt.");
297                                 break;
298
299                         case '0.5.5': // SQL queries for v0.5.5
300                                 addConfigAddSql('register_generate_password_empty', "ENUM('Y','N') NOT NULL DEFAULT 'Y'");
301
302                                 // Update notes (these will be set as task text!)
303                                 setExtensionUpdateNotes("Weiteren Men&uuml;punkt aus <strong>menu-{?DEFAULT_LANG?} heraus geholt.");
304                                 break;
305
306                         case '0.5.6': // SQL queries for v0.5.6
307                                 // Register points data
308                                 registerExtensionPointsData('register_welcome', 'points', 'LOCKED', 'DIRECT');
309
310                                 // Update notes
311                                 setExtensionUpdateNotes("Anmeldewillkommensgutschrift wird nun &uuml;ber die Tabelle <strong>{OPEN_CONFIG}_MYSQL_PREFIX{CLOSE_CONFIG}_points_data</strong> verwaltet.");
312                                 break;
313
314                         case '0.5.7': // SQL queries for v0.5.7
315                                 // Register a filter
316                                 registerFilter(__FILE__, __LINE__, 'pre_user_registration', 'PRE_USER_REGISTRATION_GENERIC', FALSE, TRUE, isExtensionDryRun());
317
318                                 // Register points data
319                                 registerExtensionPointsData('referral_bonus', 'points', 'LOCKED', 'DIRECT');
320                                 registerExtensionPointsData('referral_bonus_ref', 'points', 'LOCKED', 'DIRECT');
321
322                                 // Update notes
323                                 setExtensionUpdateNotes("Anmeldeformular komplett auf drei Filter umgestrickt (mehr dazu siehe Wiki) und weitere Verwendungszwecke registriert.");
324                                 break;
325
326                         case '0.5.8': // SQL queries for v0.5.8
327                                 addConfigAddSql('least_cats', 'TINYINT(3) UNSIGNED NOT NULL DEFAULT 5');
328                                 addConfigAddSql('display_refid', "ENUM('Y','N') NOT NULL DEFAULT 'Y'");
329                                 addConfigAddSql('ip_timeout', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 86400');
330
331                                 // Update notes
332                                 setExtensionUpdateNotes("Anmeldewillkommensgutschrift wird nun &uuml;ber die Tabelle <strong>{OPEN_CONFIG}_MYSQL_PREFIX{CLOSE_CONFIG}_points_data</strong> verwaltet.");
333                                 break;
334                 } // END - switch
335
336 // [EOF]
337 ?>