Complete refacture for previously discovered inconsistency
[mailer.git] / inc / extensions / ext-other.php
1 <?php
2 /************************************************************************
3  * Mailer v0.2.1-FINAL                                Start: 09/19/2004 *
4  * ===================                          Last change: 10/29/2004 *
5  *                                                                      *
6  * -------------------------------------------------------------------- *
7  * File              : ext-other.php                                    *
8  * -------------------------------------------------------------------- *
9  * Short description : Other administrative settings                    *
10  * -------------------------------------------------------------------- *
11  * Kurzbeschreibung  : Weitere administrative Einstellungen             *
12  * -------------------------------------------------------------------- *
13  * $Revision::                                                        $ *
14  * $Date::                                                            $ *
15  * $Tag:: 0.2.1-FINAL                                                 $ *
16  * $Author::                                                          $ *
17  * Needs to be in all Files and every File needs "svn propset           *
18  * svn:keywords Date Revision" (autoprobset!) at least!!!!!!            *
19  * -------------------------------------------------------------------- *
20  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
21  * Copyright (c) 2009, 2010 by Mailer Developer Team                    *
22  * For more information visit: http://www.mxchange.org                  *
23  *                                                                      *
24  * This program is free software; you can redistribute it and/or modify *
25  * it under the terms of the GNU General Public License as published by *
26  * the Free Software Foundation; either version 2 of the License, or    *
27  * (at your option) any later version.                                  *
28  *                                                                      *
29  * This program is distributed in the hope that it will be useful,      *
30  * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
31  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
32  * GNU General Public License for more details.                         *
33  *                                                                      *
34  * You should have received a copy of the GNU General Public License    *
35  * along with this program; if not, write to the Free Software          *
36  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
37  * MA  02110-1301  USA                                                  *
38  ************************************************************************/
39
40 // Some security stuff...
41 if (!defined('__SECURITY')) {
42         die();
43 } // END - if
44
45 // Version number
46 setThisExtensionVersion('0.2.5');
47
48 // Version history array (add more with , '0.1.0' and so on)
49 setExtensionVersionHistory(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5'));
50
51 // Keep this extension always active!
52 setExtensionAlwaysActive('Y');
53
54 switch (getExtensionMode()) {
55         case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
56                 // SQL commands to run
57                 addAdminMenuSql('setup','config_other','Sonstige Einstellungen','Sonstige Einstellungen an Ihrem {?mt_word?}.',13);
58                 break;
59
60         case 'remove': // Do stuff when removing extension
61                 // SQL commands to run
62                 addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what`='config_other'");
63
64                 // Unregister filter
65                 unregisterFilter('page_footer', 'DISPLAY_DEBUG_SQL', true, getExtensionDryRun());
66                 break;
67
68         case 'activate': // Do stuff when admin activates this extension
69                 // SQL commands to run
70                 addExtensionSql('');
71                 break;
72
73         case 'deactivate': // Do stuff when admin deactivates this extension
74                 // SQL commands to run
75                 addExtensionSql('');
76                 break;
77
78         case 'update': // Update an extension
79                 switch (getCurrentExtensionVersion()) {
80                         case '0.0.1': // SQL queries for v0.0.1
81                                 // Update notes (these will be set as task text!)
82                                 setExtensionUpdateNotes("Fehler <div class=\"admin_failed\">Warning: Missing argument 2 for create_timestamp_from_selections() in {?PATH?}inc/libs/pro_functions.php on line 227</div> behoben.");
83                                 break;
84
85                         case '0.0.2': // SQL queries for v0.0.2
86                                 // Update notes (these will be set as task text!)
87                                 setExtensionUpdateNotes("Speichern der Einstellungen vereinfacht. Es wird dazu die Funktion adminSaveSettings() verwendet.");
88                                 break;
89
90                         case '0.0.3': // SQL queries for v0.0.3
91                                 // Update notes (these will be set as task text!)
92                                 setExtensionUpdateNotes("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
93                                 break;
94
95                         case '0.0.4': // SQL queries for v0.0.4
96                                 addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD max_comma TINYINT(3) UNSIGNED NOT NULL DEFAULT 3");
97
98                                 // Update notes (these will be set as task text!)
99                                 setExtensionUpdateNotes("Angezeigte Kommastellen k&ouml;nnen zwischen 0 und 5 eingestellt werden.");
100                                 break;
101
102                         case '0.0.5': // SQL queries for v0.0.5
103                                 // Update notes (these will be set as task text!)
104                                 setExtensionUpdateNotes("Problem mit Speicherung der Einstellungen beseitigt.");
105                                 break;
106
107                         case '0.0.6': // SQL queries for v0.0.6
108                                 // Update notes (these will be set as task text!)
109                                 setExtensionUpdateNotes("Problem mit Speicherung der Einstellungen endlich beseitigt.");
110                                 break;
111
112                         case '0.0.7': // SQL queries for v0.0.7
113                                 // Update notes (these will be set as task text!)
114                                 setExtensionUpdateNotes("Ausgabemodus der CSS-Dateien hinzugef&uuml;gt. Bitte auch das Admin-Template aktualisieren!");
115                                 break;
116
117                         case '0.0.8': // SQL queries for v0.0.8
118                                 // Update notes (these will be set as task text!)
119                                 setExtensionUpdateNotes("Erweiterung bleibt wegen integrierten Schalters immer aktiv.");
120                                 break;
121
122                         case '0.0.9': // SQL queries for v0.0.9
123                                 // Update notes (these will be set as task text!)
124                                 setExtensionUpdateNotes("Abspeichern der Einstellungen repariert.");
125                                 break;
126
127                         case '0.1.0': // SQL queries for v0.2.1
128                                 // Update notes (these will be set as task text!)
129                                 setExtensionUpdateNotes("Folgende Einstellungen k&ouml;nnen auf 0 gesetzt werden:
130 <ol>
131 <li>Selbe beworbene URL nicht mehr bewerbar (0 = URL kann sofort wieder gebucht werden)</li>
132 <li>G&uuml;tigkeitsdauer der Best&auml;tigungslinks (0 = Best&auml;tigungslinks laufen nie ab)</li>
133 <li>Sperrzeit des Mitgliedprofiles nach &Auml;nderung (0 = Mitglied kann sein Account immer und sofort &auml;ndern)</li>
134 <li>Profilaktualisierungsinterval (0 = Es wird keine Mail zum Profilaktualisierunng durch das Mitglied ausgesendet(</li>
135 <li>Erneute Aussendung der Mail (0 = Siehe oben)</li>
136 </ol>");
137                                 break;
138
139                         case '0.1.1': // SQL queries for v0.1.1
140                                 // Update notes (these will be set as task text!)
141                                 setExtensionUpdateNotes("Gast- und Mitgliedsmen&uuml;s lassen sich voneinander getrentt ein- und auschalten.");
142                                 break;
143
144                         case '0.1.2': // SQL queries for v0.1.2
145                                 // Update notes (these will be set as task text!)
146                                 setExtensionUpdateNotes("W&ouml;rter <strong>{?mt_word?}</strong>, <strong>{?mt_word2?}</strong> und <strong>{?mt_word3?}</strong> sind austauschbar.");
147                                 break;
148
149                         case '0.1.3': // SQL queries for v0.1.3
150                                 // Update notes (these will be set as task text!)
151                                 setExtensionUpdateNotes("Wort &quot;Baustelle&quot; vom Auto-Versand entfernt, da dieser nun klappt.");
152                                 break;
153
154                         case '0.1.4': // SQL queries for v0.1.4
155                                 // Update notes (these will be set as task text!)
156                                 setExtensionUpdateNotes("Abspeichern von Einstellungen repariert.");
157                                 break;
158
159                         case '0.1.5': // SQL queries for v0.1.5
160                                 // Update notes (these will be set as task text!)
161                                 setExtensionUpdateNotes("Abspeichern von Einstellungen repariert.");
162                                 break;
163
164                         case '0.1.6': // SQL queries for v0.1.6
165                                 addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD reject_url VARCHAR(255) NOT NULL DEFAULT '{?URL?}'");
166
167                                 // Update notes (these will be set as task text!)
168                                 setExtensionUpdateNotes("Bei Ablehnung der URL wird jetzt endlich eine Standart-URL eingesetzt, die konfigurierbar ist. Fehler beim Laden der Konfiguration gefunden.");
169                                 break;
170
171                         case '0.1.7': // SQL queries for v0.1.7
172                                 addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD currency VARCHAR(255) NOT NULL DEFAULT '&euro;'");
173
174                                 // Update notes (these will be set as task text!)
175                                 setExtensionUpdateNotes("Standart-W&auml;hrung der Geb&uuml;hren f&uuml;r alle Erweiterungen geltend hinzugef&uuml;gt.");
176                                 break;
177
178                         case '0.1.8': // SQL queries for v0.1.8
179                                 // Update notes (these will be set as task text!)
180                                 setExtensionUpdateNotes("Die sonstigen Einstellungen lassen sich nun nur noch &auml;ndern, wenn die Erweiterung <strong>other</strong> auch installiert ist. Anderfalls gibt es einen SQL-Fehler beim Speichern und GROSS_GESCHRIEBENE Worte im Formular.");
181                                 break;
182
183                         case '0.1.9': // SQL queries for v0.1.9
184                                 addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD mailid_error_redirect ENUM('index','reject') NOT NULL DEFAULT 'index'");
185
186                                 // Update notes (these will be set as task text!)
187                                 setExtensionUpdateNotes("Bei fehlerhafter Mail w&auml;hrend der Best&auml;tigung kann wahlweise zur Hauptseite weitergeleitet oder auf die eingestellte Ablehnungsseite umgeleitet werden.");
188                                 break;
189
190                         case '0.2.0': // SQL queries for v0.2.0
191                                 addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` CHANGE `mailid_error_redirect` `mailid_error_redirect` ENUM('INDEX','REJECT') NOT NULL DEFAULT 'INDEX'");
192
193                                 // Update notes (these will be set as task text!)
194                                 setExtensionUpdateNotes("Bei fehlerhafter Mail w&auml;hrend der Best&auml;tigung kann wahlweise zur Hauptseite weitergeleitet oder auf die eingestellte Ablehnungsseite umgeleitet werden.");
195                                 break;
196
197                         case '0.2.1': // SQL queries for v0.2.1
198                                 addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `min_age` TINYINT(3) UNSIGNED NOT NULL DEFAULT 16");
199
200                                 // Update notes (these will be set as task text!)
201                                 setExtensionUpdateNotes("Minimumalter ist nun konfigurierbar.");
202                                 break;
203
204                         case '0.2.2': // SQL queries for v0.2.2
205                                 addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `display_debug_sqls` ENUM('N','Y') NOT NULL DEFAULT 'N'");
206
207                                 // Update notes (these will be set as task text!)
208                                 setExtensionUpdateNotes("(Fast) alle SQL-Abfragen lassen sich nun zu Debugging-Zwecken (!) einschalten. Nur der Administrator sieht diese unten am Ende der Seite.");
209                                 break;
210
211                         case '0.2.3': // SQL queries for v0.2.3
212                                 addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `max_send` BIGINT(20) UNSIGNED NOT NULL DEFAULT 10");
213
214                                 // Update notes (these will be set as task text!)
215                                 setExtensionUpdateNotes("Fehlende Konfiguration hinzugef&uuml;gt.");
216                                 break;
217
218                         case '0.2.4': // SQL queries for v0.2.4
219                                 // Register filter
220                                 registerFilter('page_footer', 'DISPLAY_DEBUG_SQL', false, true, getExtensionDryRun());
221
222                                 // Update notes (these will be set as task text!)
223                                 setExtensionUpdateNotes("Filter zum Anzeigen (Debug) von ausgef&uuml;hrten SQL-Anweisungen hinzugef&uuml;gt.");
224                                 break;
225
226                         case '0.2.5': // SQL queries for v0.2.5
227                                 addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `code_length` TINYINT(3) UNSIGNED NOT NULL DEFAULT 5");
228
229                                 // Update notes (these will be set as task text!)
230                                 setExtensionUpdateNotes("Codel&auml;nge aus tables.sql rausgeholt.");
231                                 break;
232                 }
233                 break;
234
235         case 'modify': // When the extension got modified
236                 break;
237
238         case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
239                 break;
240
241         case 'init': // Do stuff when extension is initialized
242                 break;
243
244         default: // Unknown extension mode
245                 logDebugMessage(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName()));
246                 break;
247 }
248
249 // [EOF]
250 ?>