Renamed templates + added some filters for mail order
[mailer.git] / inc / extensions / holiday / mode-update.php
1 <?php
2 /************************************************************************
3  * Mailer v0.2.1-FINAL                                Start: 06/17/2004 *
4  * ===================                          Last change: 01/13/2006 *
5  *                                                                      *
6  * -------------------------------------------------------------------- *
7  * File              : mode-update.php                                  *
8  * -------------------------------------------------------------------- *
9  * Short description : Holiday requests from members                    *
10  * -------------------------------------------------------------------- *
11  * Kurzbeschreibung  : Ferienantraege von Mitgliedern                   *
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                 switch (getCurrentExtensionVersion()) {
44                         case '0.0.2': // SQL queries for v0.0.2
45                                 // Update notes (these will be set as task text!)
46                                 setExtensionUpdateNotes("Fehlende Abfrage im Mitlieder-Modul, on Erweiterung auch aktiviert ist.");
47                                 break;
48
49                         case '0.0.3': // SQL queries for v0.0.3
50                                 // Update notes (these will be set as task text!)
51                                 setExtensionUpdateNotes("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
52                                 break;
53
54                         case '0.0.4': // SQL queries for v0.0.4
55                                 // Update notes (these will be set as task text!)
56                                 setExtensionUpdateNotes("Problem mit Speicherung der Einstellungen beseitigt.");
57                                 break;
58
59                         case '0.0.5': // SQL queries for v0.0.5
60                                 // Update notes (these will be set as task text!)
61                                 setExtensionUpdateNotes("Men&uuml;punkte im Gast-/Mitgliedsbereich k&ouml;nnen nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist.");
62                                 break;
63
64                         case '0.0.6': // SQL queries for v0.0.6
65                                 // Update notes (these will be set as task text!)
66                                 setExtensionUpdateNotes("Seit <strong>Patch 340</strong> &uuml;berfl&uuml;ssige HTML-Tags entfernt.");
67                                 break;
68
69                         case '0.0.7': // SQL queries for v0.0.7
70                                 // Update notes (these will be set as task text!)
71                                 setExtensionUpdateNotes("IP-Nummer und Browserbezeichnung wird in Admin-Mails eingesetzt.");
72                                 break;
73
74                         case '0.0.8': // SQL queries for v0.0.8
75                                 // Update notes (these will be set as task text!)
76                                 setExtensionUpdateNotes("Link zum Mitgliedsprofil in Funktion <u>generateUserProfileLink()</u> ausgelagert.");
77                                 break;
78
79                         case '0.0.9': // SQL queries for v0.0.9
80                                 // Update notes (these will be set as task text!)
81                                 setExtensionUpdateNotes("W&ouml;rter <strong>{?mt_word?}</strong>, <strong>{?mt_word2?}</strong> und <strong>{?mt_word3?}</strong> sind austauschbar.");
82                                 break;
83
84                         case '0.1.0': // SQL queries for v0.1.0
85                                 // Update notes (these will be set as task text!)
86                                 setExtensionUpdateNotes("Sicherheitsupdate: SQL-Anweisungen gesch&uuml;tzt.");
87                                 break;
88
89                         case '0.1.1': // SQL queries for v0.1.1
90                                 // Update notes (these will be set as task text!)
91                                 setExtensionUpdateNotes("Abspeichern von Einstellungen repariert.");
92                                 break;
93
94                         case '0.1.2': // SQL queries for v0.1.2
95                                 // Update notes (these will be set as task text!)
96                                 setExtensionUpdateNotes("Abspeichern der Urlaubsanfrage korregiert.");
97                                 break;
98
99                         case '0.1.3': // SQL queries for v0.1.3
100                                 addExtensionAddTableColumnSql('user_data', 'holiday_active', "ENUM('Y','N') NOT NULL DEFAULT 'N'");
101                                 addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_max_receive` WHERE `value`=0 LIMIT 1");
102                                 addConfigAddSql('holiday_lock', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT ' . (getOneDay() * 2));
103
104                                 // Update notes (these will be set as task text!)
105                                 setExtensionUpdateNotes("Die Mitgliedaccounts werden nicht mehr gesperrt, sondern nur auf <strong>Urlaub</strong> geschaltet. Lassen Sie sich nicht davon verwirren, dass sie &quot;freigegeben&quot; sind!");
106                                 break;
107
108                         case '0.1.4': // SQL queries for v0.1.4
109                                 addConfigAddSql('holiday_mode', "ENUM('DIRECT','RESET') NOT NULL DEFAULT 'RESET'");
110
111                                 // Update notes (these will be set as task text!)
112                                 setExtensionUpdateNotes("Urlaubsschaltung wird erst Abends um 00:00 Uhr aktiv und nicht durch die Beantragung. Dies kann nun auch auf direkte Umstellung eingestellt werden.");
113                                 break;
114
115                         case '0.1.5': // SQL queries for v0.1.5
116                                 // Update notes (these will be set as task text!)
117                                 setExtensionUpdateNotes("Sicherheitsupdate f&uuml;r die Include-Befehle.");
118                                 break;
119
120                         case '0.1.6': // SQL queries for v0.1.6
121                                 addExtensionAddTableColumnSql('user_data', 'holiday_activated', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 0');
122
123                                 // Update notes (these will be set as task text!)
124                                 setExtensionUpdateNotes("Fehlende Tabellenspalte hinzugef&uuml;gt.");
125                                 break;
126
127                         case '0.1.7': // SQL queries for v0.1.7
128                                 // Update notes (these will be set as task text!)
129                                 setExtensionUpdateNotes("if-Anweisungen auf Funktion <strong>empty()</strong> umgestellt.");
130                                 break;
131
132                         case '0.1.8': // SQL queries for v0.1.8
133                                 addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu_las` (`la_id`, `la_action`, `la_what`) VALUES ('member', '', 'list_holiday')");
134                                 addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu_las` (`la_id`, `la_action`, `la_what`) VALUES ('member', '', 'del_holiday')");
135                                 addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu_las` (`la_id`, `la_action`, `la_what`) VALUES ('config', '', 'config_holiday')");
136
137                                 // Update notes (these will be set as task text!)
138                                 setExtensionUpdateNotes("Erweiterung in's neue Men&uuml;system integriert.");
139                                 break;
140
141                         case '0.1.9': // SQL queries for v0.1.9
142                                 addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `action`='account',`title`='In Urlaub',`sort`=2 WHERE `what`='holiday' LIMIT 1");
143
144                                 // Update notes (these will be set as task text!)
145                                 setExtensionUpdateNotes("Mitgliedsmen&uuml; komplett umgebaut.");
146                                 break;
147
148                         case '0.2.0': // SQL queries for v0.2.0
149                                 addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET `title`='Urlaubsmanagement' WHERE `action`='holiday' AND (`what`='' OR `what` IS NULL) LIMIT 1");
150
151                                 // Update notes (these will be set as task text!)
152                                 setExtensionUpdateNotes("Mitgliedsmen&uuml; komplett umgebaut.");
153                                 break;
154
155                         case '0.2.1': // SQL queries for v0.2.1
156                                 // Update notes (these will be set as task text!)
157                                 setExtensionUpdateNotes("Fehlerhinweis bei deaktivierter Erweiterung verbessert.");
158                                 break;
159
160                         case '0.2.2': // SQL queries for v0.2.2
161                                 // Register filter
162                                 registerFilter(__FILE__, __LINE__, 'user_exclusion_sql', 'HOLIDAY_USER_EXCLUSION_SQL', FALSE, TRUE, isExtensionDryRun());
163
164                                 // Update notes (these will be set as task text!)
165                                 setExtensionUpdateNotes("Filter registriert f&uuml;r Mitglied-Ausschluss, die in Urlaub sind.");
166                                 break;
167
168                         case '0.2.3': // SQL queries for v0.2.3
169                                 // Register filter
170                                 registerFilter(__FILE__, __LINE__, 'pre_mail_recipient_check', 'CHECK_USER_HOLIDAY', FALSE, TRUE, isExtensionDryRun());
171                                 registerFilter(__FILE__, __LINE__, 'pre_category_mail_order_check', 'PRE_USERID_HOLIDAY_CHECK', FALSE, TRUE, isExtensionDryRun());
172                                 break;
173                 } // END - switch
174
175 // [EOF]
176 ?>