rewritten to new functions, some parts rewritten to filters
[mailer.git] / inc / extensions / ext-task.php
1 <?php
2 /************************************************************************
3  * MXChange v0.2.1                                    Start: 07/10/2004 *
4  * ================                             Last change: 09/29/2004 *
5  *                                                                      *
6  * -------------------------------------------------------------------- *
7  * File              : ext-task.php                                     *
8  * -------------------------------------------------------------------- *
9  * Short description : Task management                                  *
10  * -------------------------------------------------------------------- *
11  * Kurzbeschreibung  : Aufgabenverwaltung                               *
12  * -------------------------------------------------------------------- *
13  *                                                                      *
14  * -------------------------------------------------------------------- *
15  * Copyright (c) 2003 - 2008 by Roland Haeder                           *
16  * For more information visit: http://www.mxchange.org                  *
17  *                                                                      *
18  * This program is free software; you can redistribute it and/or modify *
19  * it under the terms of the GNU General Public License as published by *
20  * the Free Software Foundation; either version 2 of the License, or    *
21  * (at your option) any later version.                                  *
22  *                                                                      *
23  * This program is distributed in the hope that it will be useful,      *
24  * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
25  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
26  * GNU General Public License for more details.                         *
27  *                                                                      *
28  * You should have received a copy of the GNU General Public License    *
29  * along with this program; if not, write to the Free Software          *
30  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
31  * MA  02110-1301  USA                                                  *
32  ************************************************************************/
33
34 // Some security stuff...
35 if (!defined('__SECURITY')) {
36         $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
37         require($INC);
38 }
39
40 // Version number
41 EXT_SET_VERSION("0.3.1");
42
43 // Version history array (add more with , "0.1" and so on)
44 EXT_SET_VER_HISTORY(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", "0.2.6", "0.2.7", "0.2.8", "0.2.9", "0.3.0", "0.3.1"));
45
46 switch ($EXT_LOAD_MODE)
47 {
48 case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
49         // SQL commands to run
50         ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`, `what`, `title`, `sort`, `descr`) VALUES ('task', NULL, 'Aufgaben-Management','1','Erweitertes Aufgaben-Management zur leichten verwaltung der vom System erzeugten Aufgaben.')");
51         ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`, `what`, `title`, `sort`, `descr`) VALUES ('task','list_task','Aufgaben auflisten','1','Alle Ihnen zugewiesenen Aufgaben auflisten (keine Updates).')");
52         ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_task_system` SET `status`='SOLVED' WHERE `status`='CLOSED'");
53         break;
54
55 case "remove": // Do stuff when removing extension
56         // SQL commands to run
57         ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='task' LIMIT 2");
58         break;
59
60 case "activate": // Do stuff when admin activates this extension
61         // SQL commands to run
62         ADD_SQL("");
63         break;
64
65 case "deactivate": // Do stuff when admin deactivates this extension
66         // SQL commands to run
67         ADD_SQL("");
68         break;
69
70 case "update": // Update an extension
71         switch ($EXT_VER)
72         {
73         case "0.0.1": // SQL queries for v0.0.1
74                 ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_extensions` SET ext_has_css='Y' WHERE ext_name='task' AND ext_has_css='N' LIMIT 1");
75
76                 // This update depends on sql_patches update!
77                 EXT_SET_UPDATE_DEPENDS("sql_patches");
78
79                 // Update notes (these will be set as task text!)
80                 EXT_SET_UPDATE_NOTES("CSS-Datei kann per Admin-Bereich ein- und ausgeschaltet werden.");
81                 break;
82
83         case "0.0.1": // SQL queries for v0.0.1
84                 // Update notes (these will be set as task text!)
85                 EXT_SET_UPDATE_NOTES("Unn&ouml;tige Script-Teile aus what-list_tasks.php herausgel&ouml;scht; beim Anzeigen einer Extension-Update, oder -Register Aufgabe werden bei eingeschaltetem Verbose-Modus alle SQL-Anweisungen aufgelistet.");
86                 break;
87
88         case "0.0.4": // SQL queries for v0.0.4
89                 // Update notes (these will be set as task text!)
90                 EXT_SET_UPDATE_NOTES("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.");
91                 break;
92
93         case "0.0.5": // SQL queries for v0.0.5
94                 // Update notes (these will be set as task text!)
95                 EXT_SET_UPDATE_NOTES("&amp;admin= in &amp;amp;admin= umgewandelt.");
96                 break;
97
98         case "0.0.6": // SQL queries for v0.0.6
99                 // Update notes (these will be set as task text!)
100                 EXT_SET_UPDATE_NOTES("Wegen des Theme-Supportes hat sich die URL zur CSS-Datei ge&auml;ndert.");
101                 break;
102
103         case "0.0.7": // SQL queries for v0.0.7
104                 // Update notes (these will be set as task text!)
105                 EXT_SET_UPDATE_NOTES("Erstellung der Extra-&Uuml;bersichten verbessert.");
106                 break;
107
108         case "0.0.8": // SQL queries for v0.0.8
109                 // Update notes (these will be set as task text!)
110                 EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
111                 break;
112
113         case "0.0.9": // SQL queries for v0.0.9
114                 // Update notes (these will be set as task text!)
115                 EXT_SET_UPDATE_NOTES("Fehler bei Abfrage der payout-Erweiterung beseitigt.");
116                 break;
117
118         case "0.1.0": // SQL queries for v0.2.1
119                 // Update notes (these will be set as task text!)
120                 EXT_SET_UPDATE_NOTES("Task-Liste ausgelagert als Template");
121                 break;
122
123         case "0.1.1": // SQL queries for v0.1.1
124                 // Update notes (these will be set as task text!)
125                 EXT_SET_UPDATE_NOTES("Design &quot;Solid-Business&quot; eingebaut.");
126                 break;
127
128         case "0.1.2": // SQL queries for v0.1.2
129                 // Update notes (these will be set as task text!)
130                 EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> &uuml;berfl&uuml;ssige HTML-Tags entfernt.");
131                 break;
132
133         case "0.1.3": // SQL queries for v0.1.3
134                 // Update notes (these will be set as task text!)
135                 EXT_SET_UPDATE_NOTES("Link zum Mitgliedsprofil in Funktion <u>ADMIN_USER_PROFILE_LINK()</u> ausgelagert.");
136                 break;
137
138         case "0.1.4": // SQL queries for v0.1.4
139                 // Update notes (these will be set as task text!)
140                 EXT_SET_UPDATE_NOTES("W&ouml;rter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar.");
141                 break;
142
143         case "0.1.5": // SQL queries for v0.1.5
144                 // Update notes (these will be set as task text!)
145                 EXT_SET_UPDATE_NOTES("Links wegen <strong>what=admins_contct</strong> ge&auml;ndert.");
146                 break;
147
148         case "0.1.6": // SQL queries for v0.1.6
149                 // Update notes (these will be set as task text!)
150                 EXT_SET_UPDATE_NOTES("Weitere Direkt-Links eingebaut:<br />
151 <ul>
152   <li>L&auml;ndercodes</li>
153   <li>Wartende Verdopplungen</li>
154   <li><strong>Ge&auml;ndert:</strong> Wartende Auszahlungen</li>
155   <li>Teilnehmer an der Aktiv-Rallye</li>
156   <li>Nett hinweisende Linktitel hinzugef&uuml;gt. :-)</li>
157 </ul>");
158                 break;
159
160         case "0.1.7": // SQL queries for v0.1.7
161                 // Update notes (these will be set as task text!)
162                 EXT_SET_UPDATE_NOTES("Direkt Links zum Sponsorenbereich vorbereitend eingebaut.");
163                 break;
164
165         case "0.1.8": // SQL queries for v0.1.8
166                 // Update notes (these will be set as task text!)
167                 EXT_SET_UPDATE_NOTES("Es werden alle installierten und aktivierten Themes angezeigt und verlinkt.");
168                 break;
169
170         case "0.1.9": // SQL queries for v0.1.9
171                 // Update notes (these will be set as task text!)
172                 EXT_SET_UPDATE_NOTES("CSS-Datei in general.css verschmolzen (Patch 435!)");
173                 break;
174
175         case "0.2.0": // SQL queries for v0.2.0
176                 // Update notes (these will be set as task text!)
177                 EXT_SET_UPDATE_NOTES("Alle Administratoren, Referal-Banner und aktivierte Referal-Banner werden nun eingeblendet.");
178                 break;
179
180         case "0.2.1": // SQL queries for v0.2.1
181                 // Update notes (these will be set as task text!)
182                 EXT_SET_UPDATE_NOTES("Problem mit &uuml;berlanger Textbreite beseitigt.");
183                 break;
184
185         case "0.2.2": // SQL queries for v0.2.2
186                 // Update notes (these will be set as task text!)
187                 EXT_SET_UPDATE_NOTES("Link zum Freischalten von Sponoren-Accounts korregiert.");
188                 break;
189
190         case "0.2.3": // SQL queries for v0.2.3
191                 // Update notes (these will be set as task text!)
192                 EXT_SET_UPDATE_NOTES("Sortierungsreihenfolge grundlegend ge&auml;ndert: Es wird jetzt nach Mitglieder-ID, Aufgabenbereich, Infos und nach dem Erstellunsdatum sortiert.");
193                 break;
194
195         case "0.2.4": // SQL queries for v0.2.4
196                 // Update notes (these will be set as task text!)
197                 EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
198                 break;
199
200         case "0.2.5": // SQL queries for v0.2.5
201                 // Update notes (these will be set as task text!)
202                 EXT_SET_UPDATE_NOTES("<strong>Nur mit bonus v0.6.9 oder h&ouml;her:</strong> Zuschaltbare Bonis werden auch bei der Ermittlung Anzahl teilnehmender Mitglieder mit ber&uumk;cksichtigt.");
203                 break;
204
205         case "0.2.6": // SQL queries for v0.2.6
206                 // Update notes (these will be set as task text!)
207                 EXT_SET_UPDATE_NOTES("Teilnehmer der Bettel-Rallye werden angezeigt.");
208                 break;
209
210         case "0.2.7": // SQL queries for v0.2.7
211                 // Update notes (these will be set as task text!)
212                 EXT_SET_UPDATE_NOTES("Link zum direkten Aufheben einer Urlaubsschaltung eines Mitgliedes korregiert.");
213                 break;
214
215         case "0.2.8": // SQL queries for v0.2.8
216                 // Update notes (these will be set as task text!)
217                 EXT_SET_UPDATE_NOTES("Sicherheitsupdate f&uuml;r die Include-Befehle.");
218                 break;
219
220         case "0.2.9": // SQL queries for v0.2.9
221                 // Update notes (these will be set as task text!)
222                 EXT_SET_UPDATE_NOTES("if-Anweisungen auf Funktion <strong>empty()</strong> umgestellt. Update-Aufgaben werden nach &quot;Bearbeitung&quot; nicht mehr als <strong>Erledigt</strong> gesetzt. Dies hatte sonst den Anschein, die Update-Aufgaben m&uuml;ssten erledigt werden, um die Erweiterungs-Updates einzuspielen, was aber automatisch geschieht.");
223                 break;
224
225         case "0.3.0": // SQL queries for v0.3.0
226                 // Update notes (these will be set as task text!)
227                 EXT_SET_UPDATE_NOTES("Export-Accounts werden in Task-&Uuml;bersicht aufgelistet.");
228                 break;
229
230         case "0.3.1": // SQL queries for v0.3.1
231                 // Update notes (these will be set as task text!)
232                 EXT_SET_UPDATE_NOTES("Diverse Fixes an den Templates (Notice-Hinweise vom PHP-Interpreter entfernt).");
233                 break;
234         }
235         break;
236
237 case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
238         break;
239
240 default: // Do stuff when extension is loaded
241         break;
242 }
243
244 // Keep this extension always active!
245 EXT_SET_ALWAYS_ACTIVE("Y");
246
247 //
248 ?>