Some fixes:
[mailer.git] / inc / extensions / autopurge / mode-update.php
1 <?php
2 /************************************************************************
3  * Mailer v0.2.1-FINAL                                Start: 06/25/2013 *
4  * ===================                          Last change: 06/25/2013 *
5  *                                                                      *
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  * $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 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');
48
49                                 // SQL queries
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&ouml;schung', 'Automatisch inaktive oder nicht best&auml;tigte Accounts l&ouml;schen.', 12);
56                                 addAdminMenuSql('user', 'list_autopurge', 'Inaktive finden', 'Lassen Sie sich vor dem t&auml;glichen Reset anzeigen, welche Mitglieder als inaktiv erkannt werden und welche gel&ouml;scht werden.', 10);
57                                 addExtensionAddTableColumnSql('user_data', 'ap_notified', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 0');
58
59                                 // Update notes (these will be set as task text!)
60                                 setExtensionUpdateNotes("Automatisches L&ouml;schen von inaktiven bzw. nicht best&auml;tigten Accounts hinzugef&uuml;gt.");
61                                 break;
62
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&ouml;schen von als zu l&ouml;schen markierte Tasks hinzugef&uuml;gt.");
66                                 break;
67
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.");
71                                 break;
72
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.");
76                                 break;
77
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.");
81                                 break;
82
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.");
86                                 break;
87
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.");
91                                 break;
92
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.");
96                                 break;
97
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));
101
102                                 // Update notes (these will be set as task text!)
103                                 setExtensionUpdateNotes("Bereinigung von zu l&ouml;schenden Aufgaben klappt wieder. Zeitlimit f&uuml;r genanntes kann eingestellt werden (Default = 7 Tage).<br /><br /><u>Bitte aktualisieren Sie auch die Admin-Templates!</u>");
104                                 break;
105
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'");
110
111                                 // Update notes (these will be set as task text!)
112                                 setExtensionUpdateNotes("Mail wird bei L&ouml;schung von Aufgaben ausgesendet.<br /><br /><u>Bitte aktualisieren Sie auch die Admin-Templates!</u>");
113                                 break;
114
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.");
118                                 break;
119
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&uuml;r gel&ouml;schte Aufgaben korregiert.");
123                                 break;
124
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.");
128                                 break;
129
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&ouml;schung von Best&auml;tigungslinks kann unter &quot;Sonstige Einstellungen&quot; abgeschaltet werden (0 setzen!)");
133                                 break;
134
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> &uuml;berfl&uuml;ssige HTML-Tags entfernt.");
138                                 break;
139
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.)");
143                                 break;
144
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.");
148                                 break;
149
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.");
153                                 break;
154
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.");
158                                 break;
159
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 &uuml;berfl&uuml;ssig geworden. Bitte l&ouml;schen Sie dies!");
163                                 break;
164
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&uuml;hrlich.");
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("W&ouml;rter <strong>{?mt_word?}</strong>, <strong>{?mt_word2?}</strong> und <strong>{?mt_word3?}</strong> sind austauschbar.");
173                                 break;
174
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?}');
179
180                                 // Update notes (these will be set as task text!)
181                                 setExtensionUpdateNotes("Von bereits gel&ouml;schten Mitgliedern die Mails l&ouml;schen integriert.");
182                                 break;
183
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.");
187                                 break;
188
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.");
192                                 break;
193
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&ouml;scht und tauchen auch unterhalb der Inaktiven-Liste nicht mehr auf.");
197                                 break;
198
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.");
202                                 break;
203
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.");
207                                 break;
208
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&ouml;schung</strong> finden Sie nun auch die Einstellungen zu Mailbest&auml;tigungs wieder. Zudem werden keine Urlauber (neue Urlaubsschaltung beachtet) mehr als inaktiv erkannt.");
212                                 break;
213
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.");
217                                 break;
218
219                         case '0.4.1': // SQL queries for v0.4.1
220                                 // Register with points data system
221                                 registerExtensionPointsData('autopurge_add', 'points', 'LOCKED', 'DIRECT');
222
223                                 // Update notes
224                                 setExtensionUpdateNotes("R&uuml;ckschriften bei Auto-L&ouml;schungen werden nun &uuml;ber die Tabelle <strong>{OPEN_CONFIG}_MYSQL_PREFIX{CLOSE_CONFIG}_points_data</strong> verwaltet.");
225                                 break;
226
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'");
230
231                                 // Update notes
232                                 setExtensionUpdateNotes("Konfiguration in diese Erweiterung verschoben.");
233                                 break;
234                 } // END - switch
235
236 // [EOF]
237 ?>