SQLs fixed
[mailer.git] / inc / extensions / ext-task.php
1 <?php
2 /************************************************************************
3  * Mailer v0.2.1-FINAL                                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  * $Revision::                                                        $ *
14  * $Date::                                                            $ *
15  * $Tag:: 0.2.1-FINAL                                                 $ *
16  * $Author::                                                          $ *
17  * -------------------------------------------------------------------- *
18  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
19  * Copyright (c) 2009 - 2011 by Mailer Developer Team                   *
20  * For more information visit: http://www.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 // Version number
44 setThisExtensionVersion('0.3.2');
45
46 // Version history array (add more with , '0.1.0' and so on)
47 setExtensionVersionHistory(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', '0.3.2'));
48
49 // Keep this extension always active!
50 setExtensionAlwaysActive('Y');
51
52 switch (getExtensionMode()) {
53         case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
54                 // SQL commands to run
55                 addAdminMenuSql('task', NULL, 'Aufgaben-Management','Erweitertes Aufgaben-Management zur leichten verwaltung der vom System erzeugten Aufgaben.',1);
56                 addAdminMenuSql('task','list_task','Aufgaben auflisten','Alle Ihnen zugewiesenen Aufgaben auflisten (keine Updates).',1);
57                 addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_task_system` SET `status`='SOLVED' WHERE `status`='CLOSED'");
58                 break;
59
60         case 'remove': // Do stuff when removing extension
61                 // SQL commands to run
62                 addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `action`='task'");
63                 break;
64
65         case 'activate': // Do stuff when admin activates this extension
66                 // SQL commands to run
67                 addExtensionSql('');
68                 break;
69
70         case 'deactivate': // Do stuff when admin deactivates this extension
71                 // SQL commands to run
72                 addExtensionSql('');
73                 break;
74
75         case 'update': // Update an extension
76                 switch (getCurrentExtensionVersion()) {
77                         case '0.0.1': // SQL queries for v0.0.1
78                                 // This update depends on sql_patches update!
79                                 addExtensionDependency('sql_patches');
80
81                                 // Update notes (these will be set as task text!)
82                                 setExtensionUpdateNotes("Veraltetes Update entfernt.");
83                                 break;
84
85                         case '0.0.1': // SQL queries for v0.0.1
86                                 // Update notes (these will be set as task text!)
87                                 setExtensionUpdateNotes("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.");
88                                 break;
89
90                         case '0.0.4': // SQL queries for v0.0.4
91                                 // Update notes (these will be set as task text!)
92                                 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.");
93                                 break;
94
95                         case '0.0.5': // SQL queries for v0.0.5
96                                 // Update notes (these will be set as task text!)
97                                 setExtensionUpdateNotes("&amp;admin= in &amp;amp;admin= umgewandelt.");
98                                 break;
99
100                         case '0.0.6': // SQL queries for v0.0.6
101                                 // Update notes (these will be set as task text!)
102                                 setExtensionUpdateNotes("Wegen des Theme-Supportes hat sich die URL zur CSS-Datei ge&auml;ndert.");
103                                 break;
104
105                         case '0.0.7': // SQL queries for v0.0.7
106                                 // Update notes (these will be set as task text!)
107                                 setExtensionUpdateNotes("Erstellung der Extra-&Uuml;bersichten verbessert.");
108                                 break;
109
110                         case '0.0.8': // SQL queries for v0.0.8
111                                 // Update notes (these will be set as task text!)
112                                 setExtensionUpdateNotes("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
113                                 break;
114
115                         case '0.0.9': // SQL queries for v0.0.9
116                                 // Update notes (these will be set as task text!)
117                                 setExtensionUpdateNotes("Fehler bei Abfrage der payout-Erweiterung beseitigt.");
118                                 break;
119
120                         case '0.1.0': // SQL queries for v0.2.1
121                                 // Update notes (these will be set as task text!)
122                                 setExtensionUpdateNotes("Task-Liste ausgelagert als Template");
123                                 break;
124
125                         case '0.1.1': // SQL queries for v0.1.1
126                                 // Update notes (these will be set as task text!)
127                                 setExtensionUpdateNotes("Design &quot;Solid-Business&quot; eingebaut.");
128                                 break;
129
130                         case '0.1.2': // SQL queries for v0.1.2
131                                 // Update notes (these will be set as task text!)
132                                 setExtensionUpdateNotes("Seit <strong>Patch 340</strong> &uuml;berfl&uuml;ssige HTML-Tags entfernt.");
133                                 break;
134
135                         case '0.1.3': // SQL queries for v0.1.3
136                                 // Update notes (these will be set as task text!)
137                                 setExtensionUpdateNotes("Link zum Mitgliedsprofil in Funktion <u>generateUserProfileLink()</u> ausgelagert.");
138                                 break;
139
140                         case '0.1.4': // SQL queries for v0.1.4
141                                 // Update notes (these will be set as task text!)
142                                 setExtensionUpdateNotes("W&ouml;rter <strong>{?mt_word?}</strong>, <strong>{?mt_word2?}</strong> und <strong>{?mt_word3?}</strong> sind austauschbar.");
143                                 break;
144
145                         case '0.1.5': // SQL queries for v0.1.5
146                                 // Update notes (these will be set as task text!)
147                                 setExtensionUpdateNotes("Links wegen <strong>what=admins_contct</strong> ge&auml;ndert.");
148                                 break;
149
150                         case '0.1.6': // SQL queries for v0.1.6
151                                 // Update notes (these will be set as task text!)
152                                 setExtensionUpdateNotes("Weitere Direkt-Links eingebaut:<br />
153 <ul>
154   <li>L&auml;ndercodes</li>
155   <li>Wartende Verdopplungen</li>
156   <li><strong>Ge&auml;ndert:</strong> Wartende Auszahlungen</li>
157   <li>Teilnehmer an der Aktiv-Rallye</li>
158   <li>Nett hinweisende Linktitel hinzugef&uuml;gt. :-)</li>
159 </ul>");
160                                 break;
161
162                         case '0.1.7': // SQL queries for v0.1.7
163                                 // Update notes (these will be set as task text!)
164                                 setExtensionUpdateNotes("Direkt Links zum Sponsorenbereich vorbereitend eingebaut.");
165                                 break;
166
167                         case '0.1.8': // SQL queries for v0.1.8
168                                 // Update notes (these will be set as task text!)
169                                 setExtensionUpdateNotes("Es werden alle installierten und aktivierten Themes angezeigt und verlinkt.");
170                                 break;
171
172                         case '0.1.9': // SQL queries for v0.1.9
173                                 // Update notes (these will be set as task text!)
174                                 setExtensionUpdateNotes("CSS-Datei in general.css verschmolzen (Patch 435!)");
175                                 break;
176
177                         case '0.2.0': // SQL queries for v0.2.0
178                                 // Update notes (these will be set as task text!)
179                                 setExtensionUpdateNotes("Alle Administratoren, Referal-Banner und aktivierte Referal-Banner werden nun eingeblendet.");
180                                 break;
181
182                         case '0.2.1': // SQL queries for v0.2.1
183                                 // Update notes (these will be set as task text!)
184                                 setExtensionUpdateNotes("Problem mit &uuml;berlanger Textbreite beseitigt.");
185                                 break;
186
187                         case '0.2.2': // SQL queries for v0.2.2
188                                 // Update notes (these will be set as task text!)
189                                 setExtensionUpdateNotes("Link zum Freischalten von Sponoren-Accounts korregiert.");
190                                 break;
191
192                         case '0.2.3': // SQL queries for v0.2.3
193                                 // Update notes (these will be set as task text!)
194                                 setExtensionUpdateNotes("Sortierungsreihenfolge grundlegend ge&auml;ndert: Es wird jetzt nach Mitglieder-Id, Aufgabenbereich, Infos und nach dem Erstellunsdatum sortiert.");
195                                 break;
196
197                         case '0.2.4': // SQL queries for v0.2.4
198                                 // Update notes (these will be set as task text!)
199                                 setExtensionUpdateNotes("Abspeichern von Einstellungen repariert.");
200                                 break;
201
202                         case '0.2.5': // SQL queries for v0.2.5
203                                 // Update notes (these will be set as task text!)
204                                 setExtensionUpdateNotes("<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.");
205                                 break;
206
207                         case '0.2.6': // SQL queries for v0.2.6
208                                 // Update notes (these will be set as task text!)
209                                 setExtensionUpdateNotes("Teilnehmer der Bettel-Rallye werden angezeigt.");
210                                 break;
211
212                         case '0.2.7': // SQL queries for v0.2.7
213                                 // Update notes (these will be set as task text!)
214                                 setExtensionUpdateNotes("Link zum direkten Aufheben einer Urlaubsschaltung eines Mitgliedes korregiert.");
215                                 break;
216
217                         case '0.2.8': // SQL queries for v0.2.8
218                                 // Update notes (these will be set as task text!)
219                                 setExtensionUpdateNotes("Sicherheitsupdate f&uuml;r die Include-Befehle.");
220                                 break;
221
222                         case '0.2.9': // SQL queries for v0.2.9
223                                 // Update notes (these will be set as task text!)
224                                 setExtensionUpdateNotes("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.");
225                                 break;
226
227                         case '0.3.0': // SQL queries for v0.3.0
228                                 // Update notes (these will be set as task text!)
229                                 setExtensionUpdateNotes("Export-Accounts werden in Task-&Uuml;bersicht aufgelistet.");
230                                 break;
231
232                         case '0.3.1': // SQL queries for v0.3.1
233                                 // Update notes (these will be set as task text!)
234                                 setExtensionUpdateNotes("Diverse Fixes an den Templates (Notice-Hinweise vom PHP-Interpreter entfernt).");
235                                 break;
236
237                         case '0.3.2': // SQL queries for v0.3.2
238                                 // This update depends on user update
239                                 addExtensionDependency('sql_patches');
240
241                                 // Update notes (these will be set as task text!)
242                                 setExtensionUpdateNotes("H&auml;ngt nun von <u>ext-user</u> ab.");
243                                 break;
244                 } // END - switch
245                 break;
246
247         case 'modify': // When the extension got modified
248                 break;
249
250         case 'test': // For testing purposes
251                 break;
252
253         case 'init': // Do stuff when extension is initialized
254                 break;
255
256         default: // Unknown extension mode
257                 logDebugMessage(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName()));
258                 break;
259 } // END - switch
260
261 // [EOF]
262 ?>