2 /************************************************************************
3 * Mailer v0.2.1-FINAL Start: 06/25/2013 *
4 * =================== Last change: 06/25/2013 *
6 * -------------------------------------------------------------------- *
7 * File : mode-setup.php *
8 * -------------------------------------------------------------------- *
9 * Short description : Automatical purging of outdated mail links *
10 * -------------------------------------------------------------------- *
11 * Kurzbeschreibung : Auto-Loeschung von veralteten Mail-Links *
12 * -------------------------------------------------------------------- *
15 * $Tag:: 0.2.1-FINAL $ *
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 *
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. *
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. *
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, *
36 ************************************************************************/
38 // Some security stuff...
39 if (!defined('__SECURITY')) {
43 // @TODO Remove double tabs from all lines
44 switch (getCurrentExtensionVersion()) {
45 case '0.1.0': // SQL queries for v0.1.0
46 // Add dependency to 'user'
47 addExtensionDependency('user');
50 addConfigAddSql('autopurge_inactive', "ENUM('Y','N') NOT NULL DEFAULT 'Y'");
51 addConfigAddSql('autopurge_unconfirmed', "ENUM('Y','N') NOT NULL DEFAULT 'Y'");
52 addConfigAddSql('ap_inactive_since', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 2592000');
53 addConfigAddSql('ap_inactive_time', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 25200');
54 addConfigAddSql('ap_unconfirmed_time', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 432000');
55 addAdminMenuSql('setup', 'config_autopurge', 'Auto-Löschung', 'Automatisch inaktive oder nicht bestätigte Accounts löschen.', 12);
56 addAdminMenuSql('user', 'list_autopurge', 'Inaktive finden', 'Lassen Sie sich vor dem täglichen Reset anzeigen, welche Mitglieder als inaktiv erkannt werden und welche gelöscht werden.', 10);
57 addExtensionAddTableColumnSql('user_data', 'ap_notified', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 0');
59 // Update notes (these will be set as task text!)
60 setExtensionUpdateNotes("Automatisches Löschen von inaktiven bzw. nicht bestätigten Accounts hinzugefügt.");
63 case '0.1.2': // SQL queries for v0.1.2
64 // Update notes (these will be set as task text!)
65 setExtensionUpdateNotes("Automatisches Löschen von als zu löschen markierte Tasks hinzugefügt.");
68 case '0.1.3': // SQL queries for v0.1.3
69 // Update notes (these will be set as task text!)
70 setExtensionUpdateNotes("Nicht mehr verwendetes Update.");
73 case '0.1.4': // SQL queries for v0.1.4
74 // Update notes (these will be set as task text!)
75 setExtensionUpdateNotes("Fehler <div class=\"notice\">Warning: Missing argument 2 for create_timestamp_from_selections() in {?PATH?}inc/libs/pro_functions.php on line 227</div> behoben.");
78 case '0.1.5': // SQL queries for v0.1.5
79 // Update notes (these will be set as task text!)
80 setExtensionUpdateNotes("Anstelle von <strong>ref_depth</strong> wurde <strong>level</strong> programmiert.");
83 case '0.1.6': // SQL queries for v0.1.6
84 // Update notes (these will be set as task text!)
85 setExtensionUpdateNotes("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
88 case '0.1.7': // SQL queries for v0.1.7
89 // Update notes (these will be set as task text!)
90 setExtensionUpdateNotes("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
93 case '0.1.8': // SQL queries for v0.1.8
94 // Update notes (these will be set as task text!)
95 setExtensionUpdateNotes("Problem mit Speicherung der Einstellungen beseitigt.");
98 case '0.1.9': // SQL queries for v0.1.9
99 addConfigAddSql('autopurge_tasks', "ENUM('Y','N') NOT NULL DEFAULT 'Y'");
100 addConfigAddSql('ap_tasks_time', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT ' . (getOneDay() * 7));
102 // Update notes (these will be set as task text!)
103 setExtensionUpdateNotes("Bereinigung von zu löschenden Aufgaben klappt wieder. Zeitlimit für genanntes kann eingestellt werden (Default = 7 Tage).<br /><br /><u>Bitte aktualisieren Sie auch die Admin-Templates!</u>");
106 case '0.2.0': // SQL queries for v0.2.0
107 addConfigAddSql('ap_in_notify', "ENUM('Y','N') NOT NULL DEFAULT 'Y'");
108 addConfigAddSql('ap_un_notify', "ENUM('Y','N') NOT NULL DEFAULT 'Y'");
109 addConfigAddSql('ap_tasks_notify', "ENUM('Y','N') NOT NULL DEFAULT 'Y'");
111 // Update notes (these will be set as task text!)
112 setExtensionUpdateNotes("Mail wird bei Löschung von Aufgaben ausgesendet.<br /><br /><u>Bitte aktualisieren Sie auch die Admin-Templates!</u>");
115 case '0.2.1': // SQL queries for v0.2.1
116 // Update notes (these will be set as task text!)
117 setExtensionUpdateNotes("Diverse angebundene Erweiterungen gefixt.");
120 case '0.2.2': // SQL queries for v0.2.2
121 // Update notes (these will be set as task text!)
122 setExtensionUpdateNotes("Betreffzeile für gelöschte Aufgaben korregiert.");
125 case '0.2.3': // SQL queries for v0.2.3
126 // Update notes (these will be set as task text!)
127 setExtensionUpdateNotes("Erweiterung bleibt wegen integrierten Schalters immer aktiv.");
130 case '0.2.4': // SQL queries for v0.2.4
131 // Update notes (these will be set as task text!)
132 setExtensionUpdateNotes("Auto-Löschung von Bestätigungslinks kann unter "Sonstige Einstellungen" abgeschaltet werden (0 setzen!)");
135 case '0.2.5': // SQL queries for v0.2.5
136 // Update notes (these will be set as task text!)
137 setExtensionUpdateNotes("Seit <strong>Patch 340</strong> überflüssige HTML-Tags entfernt.");
140 case '0.2.6': // SQL queries for v0.2.6
141 // Update notes (these will be set as task text!)
142 setExtensionUpdateNotes("Problem mit Jackpot beseitigt ({?POINTS?} wurden nicht gutgeschrieben.)");
145 case '0.2.7': // SQL queries for v0.2.7
146 // Update notes (these will be set as task text!)
147 setExtensionUpdateNotes("Link zum Mitgliedsprofil in Funktion <u>generateUserProfileLink()</u> ausgelagert.");
150 case '0.2.8': // SQL queries for v0.2.8
151 // Update notes (these will be set as task text!)
152 setExtensionUpdateNotes("Link zum Mitgliedsprofil in Funktion <u>generateUserProfileLink()</u> ausgelagert.");
155 case '0.2.9': // SQL queries for v0.2.9
156 // Update notes (these will be set as task text!)
157 setExtensionUpdateNotes("Mailbetreffs korregiert.");
160 case '0.3.0': // SQL queries for v0.3.0
161 // Update notes (these will be set as task text!)
162 setExtensionUpdateNotes("Template <u>admin_config_autopurge.tpl</u> ist überflüssig geworden. Bitte löschen Sie dies!");
165 case '0.3.1': // SQL queries for v0.3.1
166 // Update notes (these will be set as task text!)
167 setExtensionUpdateNotes("Datumsformat festgelegt auf ausführlich.");
170 case '0.3.2': // SQL queries for v0.3.2
171 // Update notes (these will be set as task text!)
172 setExtensionUpdateNotes("Wörter <strong>{?mt_word?}</strong>, <strong>{?mt_word2?}</strong> und <strong>{?mt_word3?}</strong> sind austauschbar.");
175 case '0.3.3': // SQL queries for v0.3.3
176 addConfigAddSql('ap_del_mails', "ENUM('Y','N') NOT NULL DEFAULT 'Y'");
177 addConfigAddSql('ap_dm_notify', "ENUM('Y','N') NOT NULL DEFAULT 'Y'");
178 addConfigAddSql('ap_dm_timeout', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT {?ONE_DAY?}');
180 // Update notes (these will be set as task text!)
181 setExtensionUpdateNotes("Von bereits gelöschten Mitgliedern die Mails löschen integriert.");
184 case '0.3.4': // SQL queries for v0.3.4
185 // Update notes (these will be set as task text!)
186 setExtensionUpdateNotes("Fehler mit <strong>timestamp_send</strong> (Zeile 308) beseitigt.");
189 case '0.3.5': // SQL queries for v0.3.5
190 // Update notes (these will be set as task text!)
191 setExtensionUpdateNotes("Fehler mit <strong>ap_del_emails</strong> (Einstellungen im Admin-Bereich) beseitigt.");
194 case '0.3.6': // SQL queries for v0.3.6
195 // Update notes (these will be set as task text!)
196 setExtensionUpdateNotes("Die Accounts der Standard-Referral-Id, der Bonus-Id, Bettellink-Id und der Verdoppler-Id werden nun nicht mehr gelöscht und tauchen auch unterhalb der Inaktiven-Liste nicht mehr auf.");
199 case '0.3.7': // SQL queries for v0.3.7
200 // Update notes (these will be set as task text!)
201 setExtensionUpdateNotes("Abspeichern von Einstellungen repariert.");
204 case '0.3.8': // SQL queries for v0.3.8
205 // Update notes (these will be set as task text!)
206 setExtensionUpdateNotes("Vorbereitung auf die neue Mediendaten v0.0.4.");
209 case '0.3.9': // SQL queries for v0.3.9
210 // Update notes (these will be set as task text!)
211 setExtensionUpdateNotes("if-Anweisungen auf Funktion <strong>empty()</strong> umgestellt. Unter <strong>Auto-Löschung</strong> finden Sie nun auch die Einstellungen zu Mailbestätigungs wieder. Zudem werden keine Urlauber (neue Urlaubsschaltung beachtet) mehr als inaktiv erkannt.");
214 case '0.4.0': // SQL queries for v0.4.0
215 // Update notes (these will be set as task text!)
216 setExtensionUpdateNotes("Template-Problem beseitigt. Dies verhinderte das Abspeichern der Einstellungen.");
219 case '0.4.1': // SQL queries for v0.4.1
220 // Register with points data system
221 registerExtensionPointsData('autopurge_add', 'points', 'LOCKED', 'DIRECT');
224 setExtensionUpdateNotes("Rückschriften bei Auto-Löschungen werden nun über die Tabelle <strong>{OPEN_CONFIG}_MYSQL_PREFIX{CLOSE_CONFIG}_points_data</strong> verwaltet.");
227 case '0.4.2': // SQL queries for v0.4.2
228 addConfigAddSql('auto_purge', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT ' . (getOneDay()*14));
229 addConfigAddSql('auto_purge_active', "ENUM('Y','N') NOT NULL DEFAULT 'Y'");
232 setExtensionUpdateNotes("Konfiguration in diese Erweiterung verschoben.");