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 * -------------------------------------------------------------------- *
13 * Copyright (c) 2003 - 2009 by Roland Haeder *
14 * Copyright (c) 2009 - 2015 by Mailer Developer Team *
15 * For more information visit: http://mxchange.org *
17 * This program is free software; you can redistribute it and/or modify *
18 * it under the terms of the GNU General Public License as published by *
19 * the Free Software Foundation; either version 2 of the License, or *
20 * (at your option) any later version. *
22 * This program is distributed in the hope that it will be useful, *
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
25 * GNU General Public License for more details. *
27 * You should have received a copy of the GNU General Public License *
28 * along with this program; if not, write to the Free Software *
29 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, *
31 ************************************************************************/
33 // Some security stuff...
34 if (!defined('__SECURITY')) {
38 // @TODO Remove double tabs from all lines
39 switch (getCurrentExtensionVersion()) {
40 case '0.1.0': // SQL queries for v0.1.0
41 // Add dependency to 'user'
42 addExtensionDependency('user');
45 addConfigAddSql('autopurge_inactive', "ENUM('Y','N') NOT NULL DEFAULT 'Y'");
46 addConfigAddSql('autopurge_unconfirmed', "ENUM('Y','N') NOT NULL DEFAULT 'Y'");
47 addConfigAddSql('ap_inactive_since', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 2592000');
48 addConfigAddSql('ap_inactive_time', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 25200');
49 addConfigAddSql('ap_unconfirmed_time', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 432000');
50 addAdminMenuSql('setup', 'config_autopurge', 'Auto-Löschung', 'Automatisch inaktive oder nicht bestätigte Accounts löschen.', 12);
51 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);
52 addExtensionAddTableColumnSql('user_data', 'ap_notified', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 0');
54 // Update notes (these will be set as task text!)
55 setExtensionUpdateNotes("Automatisches Löschen von inaktiven bzw. nicht bestätigten Accounts hinzugefügt.");
58 case '0.1.2': // SQL queries for v0.1.2
59 // Update notes (these will be set as task text!)
60 setExtensionUpdateNotes("Automatisches Löschen von als zu löschen markierte Tasks hinzugefügt.");
63 case '0.1.3': // SQL queries for v0.1.3
64 // Update notes (these will be set as task text!)
65 setExtensionUpdateNotes("Nicht mehr verwendetes Update.");
68 case '0.1.4': // SQL queries for v0.1.4
69 // Update notes (these will be set as task text!)
70 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.");
73 case '0.1.5': // SQL queries for v0.1.5
74 // Update notes (these will be set as task text!)
75 setExtensionUpdateNotes("Anstelle von <strong>ref_depth</strong> wurde <strong>level</strong> programmiert.");
78 case '0.1.6': // SQL queries for v0.1.6
79 // Update notes (these will be set as task text!)
80 setExtensionUpdateNotes("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
83 case '0.1.7': // SQL queries for v0.1.7
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.8': // SQL queries for v0.1.8
89 // Update notes (these will be set as task text!)
90 setExtensionUpdateNotes("Problem mit Speicherung der Einstellungen beseitigt.");
93 case '0.1.9': // SQL queries for v0.1.9
94 addConfigAddSql('autopurge_tasks', "ENUM('Y','N') NOT NULL DEFAULT 'Y'");
95 addConfigAddSql('ap_tasks_time', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT ' . (getOneDay() * 7));
97 // Update notes (these will be set as task text!)
98 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>");
101 case '0.2.0': // SQL queries for v0.2.0
102 addConfigAddSql('ap_in_notify', "ENUM('Y','N') NOT NULL DEFAULT 'Y'");
103 addConfigAddSql('ap_un_notify', "ENUM('Y','N') NOT NULL DEFAULT 'Y'");
104 addConfigAddSql('ap_tasks_notify', "ENUM('Y','N') NOT NULL DEFAULT 'Y'");
106 // Update notes (these will be set as task text!)
107 setExtensionUpdateNotes("Mail wird bei Löschung von Aufgaben ausgesendet.<br /><br /><u>Bitte aktualisieren Sie auch die Admin-Templates!</u>");
110 case '0.2.1': // SQL queries for v0.2.1
111 // Update notes (these will be set as task text!)
112 setExtensionUpdateNotes("Diverse angebundene Erweiterungen gefixt.");
115 case '0.2.2': // SQL queries for v0.2.2
116 // Update notes (these will be set as task text!)
117 setExtensionUpdateNotes("Betreffzeile für gelöschte Aufgaben korregiert.");
120 case '0.2.3': // SQL queries for v0.2.3
121 // Update notes (these will be set as task text!)
122 setExtensionUpdateNotes("Erweiterung bleibt wegen integrierten Schalters immer aktiv.");
125 case '0.2.4': // SQL queries for v0.2.4
126 // Update notes (these will be set as task text!)
127 setExtensionUpdateNotes("Auto-Löschung von Bestätigungslinks kann unter "Sonstige Einstellungen" abgeschaltet werden (0 setzen!)");
130 case '0.2.5': // SQL queries for v0.2.5
131 // Update notes (these will be set as task text!)
132 setExtensionUpdateNotes("Seit <strong>Patch 340</strong> überflüssige HTML-Tags entfernt.");
135 case '0.2.6': // SQL queries for v0.2.6
136 // Update notes (these will be set as task text!)
137 setExtensionUpdateNotes("Problem mit Jackpot beseitigt ({?POINTS?} wurden nicht gutgeschrieben.)");
140 case '0.2.7': // SQL queries for v0.2.7
141 // Update notes (these will be set as task text!)
142 setExtensionUpdateNotes("Link zum Mitgliedsprofil in Funktion <u>generateUserProfileLink()</u> ausgelagert.");
145 case '0.2.8': // SQL queries for v0.2.8
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.9': // SQL queries for v0.2.9
151 // Update notes (these will be set as task text!)
152 setExtensionUpdateNotes("Mailbetreffs korregiert.");
155 case '0.3.0': // SQL queries for v0.3.0
156 // Update notes (these will be set as task text!)
157 setExtensionUpdateNotes("Template <u>admin_config_autopurge.tpl</u> ist überflüssig geworden. Bitte löschen Sie dies!");
160 case '0.3.1': // SQL queries for v0.3.1
161 // Update notes (these will be set as task text!)
162 setExtensionUpdateNotes("Datumsformat festgelegt auf ausführlich.");
165 case '0.3.2': // SQL queries for v0.3.2
166 // Update notes (these will be set as task text!)
167 setExtensionUpdateNotes("Wörter <strong>{?mt_word?}</strong>, <strong>{?mt_word2?}</strong> und <strong>{?mt_word3?}</strong> sind austauschbar.");
170 case '0.3.3': // SQL queries for v0.3.3
171 addConfigAddSql('ap_del_mails', "ENUM('Y','N') NOT NULL DEFAULT 'Y'");
172 addConfigAddSql('ap_dm_notify', "ENUM('Y','N') NOT NULL DEFAULT 'Y'");
173 addConfigAddSql('ap_dm_timeout', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT {?ONE_DAY?}');
175 // Update notes (these will be set as task text!)
176 setExtensionUpdateNotes("Von bereits gelöschten Mitgliedern die Mails löschen integriert.");
179 case '0.3.4': // SQL queries for v0.3.4
180 // Update notes (these will be set as task text!)
181 setExtensionUpdateNotes("Fehler mit <strong>timestamp_send</strong> (Zeile 308) beseitigt.");
184 case '0.3.5': // SQL queries for v0.3.5
185 // Update notes (these will be set as task text!)
186 setExtensionUpdateNotes("Fehler mit <strong>ap_del_emails</strong> (Einstellungen im Admin-Bereich) beseitigt.");
189 case '0.3.6': // SQL queries for v0.3.6
190 // Update notes (these will be set as task text!)
191 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.");
194 case '0.3.7': // SQL queries for v0.3.7
195 // Update notes (these will be set as task text!)
196 setExtensionUpdateNotes("Abspeichern von Einstellungen repariert.");
199 case '0.3.8': // SQL queries for v0.3.8
200 // Update notes (these will be set as task text!)
201 setExtensionUpdateNotes("Vorbereitung auf die neue Mediendaten v0.0.4.");
204 case '0.3.9': // SQL queries for v0.3.9
205 // Update notes (these will be set as task text!)
206 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.");
209 case '0.4.0': // SQL queries for v0.4.0
210 // Update notes (these will be set as task text!)
211 setExtensionUpdateNotes("Template-Problem beseitigt. Dies verhinderte das Abspeichern der Einstellungen.");
214 case '0.4.1': // SQL queries for v0.4.1
215 // Register with points data system
216 registerExtensionPointsData('autopurge_add', 'points', 'LOCKED', 'DIRECT');
219 setExtensionUpdateNotes("Rückschriften bei Auto-Löschungen werden nun über die Tabelle <strong>{OPEN_CONFIG}_MYSQL_PREFIX{CLOSE_CONFIG}_points_data</strong> verwaltet.");
222 case '0.4.2': // SQL queries for v0.4.2
223 addConfigAddSql('auto_purge', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT ' . (getOneDay()*14));
224 addConfigAddSql('auto_purge_active', "ENUM('Y','N') NOT NULL DEFAULT 'Y'");
227 setExtensionUpdateNotes("Konfiguration in diese Erweiterung verschoben.");