9fe66b1a8f84b1c43c1f37c32a376cdc460364a0
[mailer.git] / inc / extensions / order / mode-update.php
1 <?php
2 /************************************************************************
3  * Mailer v0.2.1-FINAL                                Start: 01/22/2013 *
4  * ===================                          Last change: 01/22/2013 *
5  *                                                                      *
6  * -------------------------------------------------------------------- *
7  * File              : mode-update.php                                  *
8  * -------------------------------------------------------------------- *
9  * Short description : Swapped out order system for PRO version         *
10  * -------------------------------------------------------------------- *
11  * Kurzbeschreibung  : Ausgelagertes Buchungssytem fuer PRO-Version     *
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-tab from all lines
44                 switch (getCurrentExtensionVersion()) {
45                         case '0.1.0': // SQL queries for v0.1
46                                 addConfigAddSql('order_max_full', "ENUM('ORDER','MAX') NOT NULL DEFAULT 'MAX'");
47                                 addAdminMenuSql('setup','config_order','Mailbuchungsseite','Einstellungen am Mailbuchungsformular.',7);
48
49                                 // Update notes (these will be set as task text!)
50                                 setExtensionUpdateNotes("Maximale Mailbuchungen sind nun vom maximalen Empfang abh&auml;gig.");
51                                 break;
52
53                         case '0.1.1': // SQL queries for v0.1.1
54                                 addExtensionAddTableColumnSql('user_data', 'mail_orders', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 0');
55
56                                 // Update notes (these will be set as task text!)
57                                 setExtensionUpdateNotes("Maximale Mailbuchung vervollst&auml;ndigt (Admin-Bereich und im Buchungsformular selber).");
58                                 break;
59
60                         case '0.1.3': // SQL queries for v0.1.3
61                                 // Update notes (these will be set as task text!)
62                                 setExtensionUpdateNotes("Maximale Mailbuchungen repariert (werden nun hochgez&auml;hlt und bei t&auml;glichem Reset auf 0 gesetzt).");
63                                 break;
64
65                         case '0.1.4': // SQL queries for v0.1.4
66                                 // Update notes (these will be set as task text!)
67                                 setExtensionUpdateNotes("Dummy-Datenfeld wird wieder gel&ouml;scht, um Probleme zu vermeiden. Fehlende Spalte <span class=\"bad\">mail_order</span> korregiert auf <span class=\"bad\">mail_orders</span>.");
68                                 break;
69
70                         case '0.1.5': // SQL queries for v0.1.5
71                                 // Update notes (these will be set as task text!)
72                                 setExtensionUpdateNotes("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
73                                 break;
74
75                         case '0.1.6': // SQL queries for v0.1.6
76                                 // Update notes (these will be set as task text!)
77                                 setExtensionUpdateNotes("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
78                                 break;
79
80                         case '0.1.7': // SQL queries for v0.1.7
81                                 // Update notes (these will be set as task text!)
82                                 setExtensionUpdateNotes("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
83                                 break;
84
85                         case '0.1.8': // SQL queries for v0.1.8
86                                 // Update notes (these will be set as task text!)
87                                 setExtensionUpdateNotes("Problem mit Speicherung der Einstellungen beseitigt.");
88                                 break;
89
90                         case '0.1.9': // SQL queries for v0.1.9
91                                 // Update notes (these will be set as task text!)
92                                 setExtensionUpdateNotes("Men&uuml;punkte im Gast-/Mitgliedsbereich k&ouml;nnen nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist.");
93                                 break;
94
95                         case '0.2.0': // SQL queries for v0.2.0
96                                 // Update notes (these will be set as task text!)
97                                 setExtensionUpdateNotes("Seit <strong>Patch 340</strong> &uuml;berfl&uuml;ssige HTML-Tags entfernt.");
98                                 break;
99
100                         case '0.2.1': // SQL queries for v0.2.1
101                                 // Update notes (these will be set as task text!)
102                                 setExtensionUpdateNotes("Templates <u>member_frameset-back.tpl</u> und <u>member_frameset-send.tpl</u> nach <u>member_order_back.tpl</u> und <u>member_order_send.tpl</u> umbenannt.");
103                                 break;
104
105                         case '0.2.2': // SQL queries for v0.2.2
106                                 // Update notes (these will be set as task text!)
107                                 setExtensionUpdateNotes("Es wird nun &uuml;berpr&uuml;ft ob auch gen&uuml;gend Empf&auml;nger eingegeben worden sind und ob auch gen&uuml;gend empfangsbereit sind.");
108                                 break;
109
110                         case '0.2.3': // SQL queries for v0.2.3
111                                 addConfigAddSql('order_min', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 10');
112
113                                 // Update notes (these will be set as task text!)
114                                 setExtensionUpdateNotes("Minimum an Empf&auml;nger pro Mailbuchung einstellbar. Standard: 10 Empf&auml;nger");
115                                 break;
116
117                         case '0.2.4': // SQL queries for v0.2.4
118                                 // Update notes (these will be set as task text!)
119                                 setExtensionUpdateNotes("Anzahl mindestens einszustellende Empf&auml;nger wird nun auch angezeigt.");
120                                 break;
121
122                         case '0.2.5': // SQL queries for v0.2.5
123                                 // Update notes (these will be set as task text!)
124                                 setExtensionUpdateNotes("Speicherung der Einstellungen klappt.");
125                                 break;
126
127                         case '0.2.6': // SQL queries for v0.2.6
128                                 // Update notes (these will be set as task text!)
129                                 setExtensionUpdateNotes("Fehler in Mailbuchung behoben: Es wurde beim Ermitteln der n&ouml;tigen {?POINTS?} die maximale Anzahl von Usern in der Kategorie gew&auml;hlt und
130 nicht die vom Mitglied eingegebene. Resultat: Das Script beschwerte sich, der User h&auml;tte nicht gen&uuml;gend {?POINTS?} auf dem Konto. Ein Rechenbeispiel:
131 <ol>
132   <li>Das Mitglied w&auml;hlt eine Kategorie XYZ mit maximal 15 Empf&auml;ngern aus.</li>
133   <li>Es stellt die Mailart <u>&quot;3 {?POINTS?} Kosten / Mail&quot;</u> ein.</li>
134   <li>Es hat aber nur {?POINTS?} f&uuml;r 10 Empf&auml;nger und gibt 10 ein.</li>
135   <li>Das Script hatte bis zu dieser Version 3 {?POINTS?} * <u>15</u> = 45 {?POINTS?} gerechnet, hat das Mitglied mehr oder gleich 45 {?POINTS?}, fiehl dieser Fehler nicht
136   auf.</li>
137   <li>Hatte es aber, wie hier im Beispiel 31 {?POINTS?}, konnte es nicht mehr buchen.</li>
138   <li>Jetzt ist der Fehler endlich weg! Machen Sie dies bitte Ihren Mitgliedern bekannt.</li>
139 </ol>");
140                                 break;
141
142                         case '0.2.7': // SQL queries for v0.2.7
143                                 // Update notes (these will be set as task text!)
144                                 setExtensionUpdateNotes("Fehler mit <u>__MIN_VALUE</u> behoben.");
145                                 break;
146
147                         case '0.2.8': // SQL queries for v0.2.8
148                                 // Update notes (these will be set as task text!)
149                                 setExtensionUpdateNotes("Konstantenproblem beseitigt.");
150                                 break;
151
152                         case '0.2.9': // SQL queries for v0.2.9
153                                 // Update notes (these will be set as task text!)
154                                 setExtensionUpdateNotes("Problem mit nicht funktionierenden Mailbuchungen beseitigt.");
155                                 break;
156
157                         case '0.3.0': // SQL queries for v0.3.0
158                                 // Update notes (these will be set as task text!)
159                                 setExtensionUpdateNotes("Basis-Modul <strong>order.php</strong> abgesichert, wenn Erweiterung nicht aktiviert ist.");
160                                 break;
161
162                         case '0.3.1': // SQL queries for v0.3.1
163                                 addConfigAddSql('order_select', "VARCHAR(255) NOT NULL DEFAULT 'userid'");
164                                 addConfigAddSql('order_mode', "ENUM('ASC','DESC') NOT NULL DEFAULT 'DESC'");
165
166                                 // Update notes (these will be set as task text!)
167                                 setExtensionUpdateNotes("Beworbene URL wird nun getestet.");
168                                 break;
169
170                         case '0.3.2': // SQL queries for v0.3.2
171                                 // Update notes (these will be set as task text!)
172                                 setExtensionUpdateNotes("Datumsformat festgelegt auf ausf&uuml;hrlich.");
173                                 break;
174
175                         case '0.3.3': // SQL queries for v0.3.3
176                                 // Update notes (these will be set as task text!)
177                                 setExtensionUpdateNotes("Unter <strong>Einstellungen - Mailbuchungsseite</strong> war immer die Tabellenspalte <strong>Mitgliedsnummer</strong> ausgew&auml;hlt.");
178                                 break;
179
180                         case '0.3.4': // SQL queries for v0.3.4
181                                 // Update notes (these will be set as task text!)
182                                 setExtensionUpdateNotes("Dateiamenskonflikt zwischen den Erweiterungen <strong>support</strong> und <strong>order</strong> behoben.");
183                                 break;
184
185                         case '0.3.5': // SQL queries for v0.3.5
186                                 // Update notes (these will be set as task text!)
187                                 setExtensionUpdateNotes("Das Mitglied konnte geziehlt die Anzahl Mailbuchungen durch Abspeichern seines Profiles beeinflussen. Der Fehler war eine falsche Tabellenspalte. Dies war <strong>max_mails</strong>, die durch das Mitglieder ver&auml;nderbar ist und zur Festellung der Maximalen Mailbuchungen herangezogen wurde.");
188                                 break;
189
190                         case '0.3.6': // SQL queries for v0.3.6
191                                 // Update notes (these will be set as task text!)
192                                 setExtensionUpdateNotes("Im Modul order (<strong>inc/modules/order.php</strong>) wurde fehlerhafterweise die Erweiterung <strong>beg</strong> getestet.");
193                                 break;
194
195                         case '0.3.7': // SQL queries for v0.3.7
196                                 // Update notes (these will be set as task text!)
197                                 setExtensionUpdateNotes("SQL-Anweisungen mit SQL_QUERY_ESC() abgesichert.");
198                                 break;
199
200                         case '0.3.8': // SQL queries for v0.3.8
201                                 // Update notes (these will be set as task text!)
202                                 setExtensionUpdateNotes("Mailbuchungsseite korregiert.");
203                                 break;
204
205                         case '0.3.9': // SQL queries for v0.3.9
206                                 // Update notes (these will be set as task text!)
207                                 setExtensionUpdateNotes("Erneuten Fehler in Mailbuchungsseite behoben.");
208                                 break;
209
210                         case '0.4.0': // SQL queries for v0.4.0
211                                 // Update notes (these will be set as task text!)
212                                 setExtensionUpdateNotes("{?POINTS?}-Abzug klappt wieder. Danke an Andreman!");
213                                 break;
214
215                         case '0.4.1': // SQL queries for v0.4.1
216                                 // Update notes (these will be set as task text!)
217                                 setExtensionUpdateNotes("Abspeichern von Einstellungen repariert.");
218                                 break;
219
220                         case '0.4.2': // SQL queries for v0.4.2
221                                 // Update notes (these will be set as task text!)
222                                 setExtensionUpdateNotes("Vorbereitung auf die neue Mediendaten v0.0.4.");
223                                 break;
224
225                         case '0.4.3': // SQL queries for v0.4.3
226                                 // Update notes (these will be set as task text!)
227                                 setExtensionUpdateNotes("Neue Urlaubsschaltung mit integriert.");
228                                 break;
229
230                         case '0.4.4': // SQL queries for v0.4.4
231                                 // Update notes (these will be set as task text!)
232                                 setExtensionUpdateNotes("Ein <strong>WHERE &#96;ext_active&#96;='Y'</strong> tauchte bei einigen Betreibern auf und ist mit dieser Version beseitigt.");
233                                 break;
234
235                         case '0.4.5': // SQL queries for v0.4.5
236                                 // Update notes (these will be set as task text!)
237                                 setExtensionUpdateNotes("De-/Aktivieren des mit dieser Erweiterung verkn&uuml;pften Modules eingebunden.");
238                                 break;
239
240                         case '0.4.6': // SQL queries for v0.4.6
241                                 addMemberMenuSql('order', NULL, 'Mailbuchungen', 3);
242                                 addMemberMenuSql('order', 'order2', 'Framekiller-Mails', 2);
243                                 addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `action`='order',`title`='Klick-Mails',`sort`=1 WHERE `what`='order' LIMIT 1");
244
245                                 // Update notes (these will be set as task text!)
246                                 setExtensionUpdateNotes("Mitgliedsmen&uuml; komplett umgebaut.");
247                                 break;
248
249                         case '0.4.7': // SQL queries for v0.4.7
250                                 // Update notes (these will be set as task text!)
251                                 setExtensionUpdateNotes("Fehlerhinweis bei deaktivierter Erweiterung verbessert.");
252                                 break;
253
254                         case '0.4.8': // SQL queries for v0.4.8
255                                 addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET `title`='Mailbuchung' WHERE `what`='config_order' LIMIT 1");
256
257                                 // Update notes (these will be set as task text!)
258                                 setExtensionUpdateNotes("Men&uuml;punkt &quot;Mailbuchungsseite&quot; nach &quot;Mailbuchung&quot; umbenannt und weitere Einstellungen aus Sonstige Einstellungen verschoben.");
259                                 break;
260
261                         case '0.4.9': // SQL queries for v0.4.9
262                                 addConfigAddSql('repay_deleted_mails', "ENUM('REPAY','JACKPOT','SHRED') NOT NULL DEFAULT 'REPAY'");
263
264                                 // Update notes (these will be set as task text!)
265                                 setExtensionUpdateNotes("Bei L&ouml;schung von Mailbuchungen kann nun scripteweit entschieden werden (Einstellungen also), ob die verbliebenen {?POINTS?} wieder gutgeschrieben werden sollen oder in den Jackpot landen.");
266                                 break;
267
268                         case '0.5.0': // SQL queries for v0.5.0
269                                 // Update notes (these will be set as task text!)
270                                 setExtensionUpdateNotes("Nicht mehr g&uuml;ltiges Update.");
271                                 break;
272
273                         case '0.5.1': // SQL queries for v0.5.1
274                                 // Update notes (these will be set as task text!)
275                                 setExtensionUpdateNotes("Nicht mehr g&uuml;ltiges Update.");
276                                 break;
277
278                         case '0.5.2': // SQL queries for v0.5.2
279                                 addConfigDropSql('test_text');
280                                 addConfigDropSql('test_subj');
281                                 addConfigAddSql('allow_url_in_text', "ENUM('Y','N') NOT NULL DEFAULT 'N'");
282                                 addConfigAddSql('allow_url_in_subject', "ENUM('Y','N') NOT NULL DEFAULT 'N'");
283
284                                 // Update notes (these will be set as task text!)
285                                 setExtensionUpdateNotes("Inkonsistenz in Konfigurationsnamen korregiert.");
286                                 break;
287
288                         case '0.5.3': // SQL queries for v0.5.3
289                                 addExtensionAddTableColumnSql('user_points', 'order_points', 'FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000');
290                                 addExtensionAddTableColumnSql('user_points', 'locked_order_points', 'FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000');
291
292                                 // This update depends on ext-user
293                                 addExtensionDependency('user');
294
295                                 // Register filters for gathering points
296                                 registerFilter(__FILE__, __LINE__, 'get_total_points', 'ORDER_POINTS', FALSE, TRUE, isExtensionDryRun());
297                                 registerFilter(__FILE__, __LINE__, 'get_own_points', 'ORDER_POINTS', FALSE, TRUE, isExtensionDryRun());
298
299                                 // Update notes (these will be set as task text!)
300                                 setExtensionUpdateNotes("Weiteres Verwendungszwecke &quot;Werbeguthaben&quot; hinzugef&uuml;gt (verschoben von ext-user) und neue Filter zum Zur&uuml;ckliefern des Werbeguthabens hinzugef&uuml;gt.");
301                                 break;
302
303                         case '0.5.4': // SQL queries for v0.5.4
304                                 // Register filter for handling locked points
305                                 registerFilter(__FILE__, __LINE__, 'get_locked_points', 'LOCKED_ORDER_POINTS', FALSE, TRUE, isExtensionDryRun());
306
307                                 // Register filter for all column names
308                                 registerFilter(__FILE__, __LINE__, 'get_all_point_columns', 'GET_ALL_ORDER_POINTS_COLUMN_NAMES', FALSE, TRUE, isExtensionDryRun());
309
310                                 // Update notes (these will be set as task text!)
311                                 setExtensionUpdateNotes("Filter f&uuml;r gesperrtes Werbeguthaben hinzugef&uuml;gt.");
312                                 break;
313
314                         case '0.5.5': // SQL queries for v0.5.5
315                                 // Register filter
316                                 registerFilter(__FILE__, __LINE__, 'user_exclusion_sql', 'ORDER_ZIP_CODE_SQL', FALSE, TRUE, isExtensionDryRun());
317
318                                 // Update notes (these will be set as task text!)
319                                 setExtensionUpdateNotes("Filter f&uuml;r gesperrtes Werbeguthaben hinzugef&uuml;gt.");
320                                 break;
321
322                         case '0.5.6': // SQL queries for v0.5.6
323                                 // Register filter
324                                 registerFilter(__FILE__, __LINE__, 'locked_points_columns_array', 'ORDER_POINTS_COLUMNS', FALSE, TRUE, isExtensionDryRun());
325
326                                 // Update notes (these will be set as task text!)
327                                 setExtensionUpdateNotes("Filter f&uuml;r Spaltenname des gesperrten Werbeguthabens hinzugef&uuml;gt.");
328                                 break;
329
330                         case '0.5.7': // SQL queries for v0.5.7
331                                 addDropTableSql('url_blacklist');
332
333                                 // Update notes (these will be set as task text!)
334                                 setExtensionUpdateNotes("Tabelle f&uuml;r URL-Sperrliste gel&ouml;scht (nach <strong>ext-blacklist</strong> verschoben).");
335                                 break;
336
337                         case '0.5.8': // SQL queries for v0.5.8
338                                 addConfigAddSql('order_multi_page', "ENUM('Y','N') NOT NULL DEFAULT 'Y'");
339
340                                 // Update notes (these will be set as task text!)
341                                 setExtensionUpdateNotes("Konfiguration wird nun in dieser Erweiterung hinzugef&uuml;gt (vorher: allgemeine <strong>tables.sql</strong>).");
342                                 break;
343
344                         case '0.5.9': // SQL queries for v0.5.9
345                                 addConfigAddSql('max_unconfirmed', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 100');
346                                 addConfigChangeSql('unconfirmed', 'max_unconfirmed', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 100');
347                                 addConfigAddSql('autosend_member_mails', "ENUM('Y','N') NOT NULL DEFAULT 'N'");
348                                 addConfigChangeSql('autosend_active', 'autosend_member_mails', "ENUM('Y','N') NOT NULL DEFAULT 'N'");
349                                 addConfigAddSql('max_text_length', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 1000');
350                                 addConfigChangeSql('max_tlength', 'max_text_length', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 1000');
351
352                                 // Update notes (these will be set as task text!)
353                                 setExtensionUpdateNotes("Konfiguration wird nun in dieser Erweiterung hinzugef&uuml;gt (vorher: allgemeine <strong>tables.sql</strong>).");
354                                 break;
355                 } // END - switch
356
357 // [EOF]
358 ?>