Mailer used in many places, we still need a good 'selling' title
[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  * Needs to be in all Files and every File needs "svn propset           *
18  * svn:keywords Date Revision" (autoprobset!) at least!!!!!!            *
19  * -------------------------------------------------------------------- *
20  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
21  * For more information visit: http://www.mxchange.org                  *
22  *                                                                      *
23  * This program is free software; you can redistribute it and/or modify *
24  * it under the terms of the GNU General Public License as published by *
25  * the Free Software Foundation; either version 2 of the License, or    *
26  * (at your option) any later version.                                  *
27  *                                                                      *
28  * This program is distributed in the hope that it will be useful,      *
29  * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
30  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
31  * GNU General Public License for more details.                         *
32  *                                                                      *
33  * You should have received a copy of the GNU General Public License    *
34  * along with this program; if not, write to the Free Software          *
35  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
36  * MA  02110-1301  USA                                                  *
37  ************************************************************************/
38
39 // Some security stuff...
40 if (!defined('__SECURITY')) {
41         die();
42 }
43
44 // Version number
45 setThisExtensionVersion('0.3.2');
46
47 // Version history array (add more with , '0.1.0' and so on)
48 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'));
49
50 // Keep this extension always active!
51 setExtensionAlwaysActive('Y');
52
53 switch (getExtensionMode()) {
54         case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
55                 // SQL commands to run
56                 addAdminMenuSql('task', NULL, 'Aufgaben-Management','Erweitertes Aufgaben-Management zur leichten verwaltung der vom System erzeugten Aufgaben.',1);
57                 addAdminMenuSql('task','list_task','Aufgaben auflisten','Alle Ihnen zugewiesenen Aufgaben auflisten (keine Updates).',1);
58                 addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_task_system` SET `status`='SOLVED' WHERE `status`='CLOSED'");
59                 break;
60
61         case 'remove': // Do stuff when removing extension
62                 // SQL commands to run
63                 addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `action`='task'");
64                 break;
65
66         case 'activate': // Do stuff when admin activates this extension
67                 // SQL commands to run
68                 addExtensionSql('');
69                 break;
70
71         case 'deactivate': // Do stuff when admin deactivates this extension
72                 // SQL commands to run
73                 addExtensionSql('');
74                 break;
75
76         case 'update': // Update an extension
77                 switch (getCurrentExtensionVersion())
78                 {
79                         case '0.0.1': // SQL queries for v0.0.1
80                                 addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_extensions` SET ext_has_css='Y' WHERE `ext_name`='task' AND ext_has_css='N' LIMIT 1");
81
82                                 // This update depends on sql_patches update!
83                                 addExtensionUpdateDependency('sql_patches');
84
85                                 // Update notes (these will be set as task text!)
86                                 setExtensionUpdateNotes("CSS-Datei kann per Admin-Bereich ein- und ausgeschaltet werden.");
87                                 break;
88
89                         case '0.0.1': // SQL queries for v0.0.1
90                                 // Update notes (these will be set as task text!)
91                                 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.");
92                                 break;
93
94                         case '0.0.4': // SQL queries for v0.0.4
95                                 // Update notes (these will be set as task text!)
96                                 setExtensionUpdateNotes("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.");
97                                 break;
98
99                         case '0.0.5': // SQL queries for v0.0.5
100                                 // Update notes (these will be set as task text!)
101                                 setExtensionUpdateNotes("&amp;admin= in &amp;amp;admin= umgewandelt.");
102                                 break;
103
104                         case '0.0.6': // SQL queries for v0.0.6
105                                 // Update notes (these will be set as task text!)
106                                 setExtensionUpdateNotes("Wegen des Theme-Supportes hat sich die URL zur CSS-Datei ge&auml;ndert.");
107                                 break;
108
109                         case '0.0.7': // SQL queries for v0.0.7
110                                 // Update notes (these will be set as task text!)
111                                 setExtensionUpdateNotes("Erstellung der Extra-&Uuml;bersichten verbessert.");
112                                 break;
113
114                         case '0.0.8': // SQL queries for v0.0.8
115                                 // Update notes (these will be set as task text!)
116                                 setExtensionUpdateNotes("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
117                                 break;
118
119                         case '0.0.9': // SQL queries for v0.0.9
120                                 // Update notes (these will be set as task text!)
121                                 setExtensionUpdateNotes("Fehler bei Abfrage der payout-Erweiterung beseitigt.");
122                                 break;
123
124                         case '0.1.0': // SQL queries for v0.2.1
125                                 // Update notes (these will be set as task text!)
126                                 setExtensionUpdateNotes("Task-Liste ausgelagert als Template");
127                                 break;
128
129                         case '0.1.1': // SQL queries for v0.1.1
130                                 // Update notes (these will be set as task text!)
131                                 setExtensionUpdateNotes("Design &quot;Solid-Business&quot; eingebaut.");
132                                 break;
133
134                         case '0.1.2': // SQL queries for v0.1.2
135                                 // Update notes (these will be set as task text!)
136                                 setExtensionUpdateNotes("Seit <strong>Patch 340</strong> &uuml;berfl&uuml;ssige HTML-Tags entfernt.");
137                                 break;
138
139                         case '0.1.3': // SQL queries for v0.1.3
140                                 // Update notes (these will be set as task text!)
141                                 setExtensionUpdateNotes("Link zum Mitgliedsprofil in Funktion <u>generateUserProfileLink()</u> ausgelagert.");
142                                 break;
143
144                         case '0.1.4': // SQL queries for v0.1.4
145                                 // Update notes (these will be set as task text!)
146                                 setExtensionUpdateNotes("W&ouml;rter <strong>{?mt_word?}</strong>, <strong>{?mt_word2?}</strong> und <strong>{?mt_word3?}</strong> sind austauschbar.");
147                                 break;
148
149                         case '0.1.5': // SQL queries for v0.1.5
150                                 // Update notes (these will be set as task text!)
151                                 setExtensionUpdateNotes("Links wegen <strong>what=admins_contct</strong> ge&auml;ndert.");
152                                 break;
153
154                         case '0.1.6': // SQL queries for v0.1.6
155                                 // Update notes (these will be set as task text!)
156                                 setExtensionUpdateNotes("Weitere Direkt-Links eingebaut:<br />
157 <ul>
158   <li>L&auml;ndercodes</li>
159   <li>Wartende Verdopplungen</li>
160   <li><strong>Ge&auml;ndert:</strong> Wartende Auszahlungen</li>
161   <li>Teilnehmer an der Aktiv-Rallye</li>
162   <li>Nett hinweisende Linktitel hinzugef&uuml;gt. :-)</li>
163 </ul>");
164                                 break;
165
166                         case '0.1.7': // SQL queries for v0.1.7
167                                 // Update notes (these will be set as task text!)
168                                 setExtensionUpdateNotes("Direkt Links zum Sponsorenbereich vorbereitend eingebaut.");
169                                 break;
170
171                         case '0.1.8': // SQL queries for v0.1.8
172                                 // Update notes (these will be set as task text!)
173                                 setExtensionUpdateNotes("Es werden alle installierten und aktivierten Themes angezeigt und verlinkt.");
174                                 break;
175
176                         case '0.1.9': // SQL queries for v0.1.9
177                                 // Update notes (these will be set as task text!)
178                                 setExtensionUpdateNotes("CSS-Datei in general.css verschmolzen (Patch 435!)");
179                                 break;
180
181                         case '0.2.0': // SQL queries for v0.2.0
182                                 // Update notes (these will be set as task text!)
183                                 setExtensionUpdateNotes("Alle Administratoren, Referal-Banner und aktivierte Referal-Banner werden nun eingeblendet.");
184                                 break;
185
186                         case '0.2.1': // SQL queries for v0.2.1
187                                 // Update notes (these will be set as task text!)
188                                 setExtensionUpdateNotes("Problem mit &uuml;berlanger Textbreite beseitigt.");
189                                 break;
190
191                         case '0.2.2': // SQL queries for v0.2.2
192                                 // Update notes (these will be set as task text!)
193                                 setExtensionUpdateNotes("Link zum Freischalten von Sponoren-Accounts korregiert.");
194                                 break;
195
196                         case '0.2.3': // SQL queries for v0.2.3
197                                 // Update notes (these will be set as task text!)
198                                 setExtensionUpdateNotes("Sortierungsreihenfolge grundlegend ge&auml;ndert: Es wird jetzt nach Mitglieder-Id, Aufgabenbereich, Infos und nach dem Erstellunsdatum sortiert.");
199                                 break;
200
201                         case '0.2.4': // SQL queries for v0.2.4
202                                 // Update notes (these will be set as task text!)
203                                 setExtensionUpdateNotes("Abspeichern von Einstellungen repariert.");
204                                 break;
205
206                         case '0.2.5': // SQL queries for v0.2.5
207                                 // Update notes (these will be set as task text!)
208                                 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.");
209                                 break;
210
211                         case '0.2.6': // SQL queries for v0.2.6
212                                 // Update notes (these will be set as task text!)
213                                 setExtensionUpdateNotes("Teilnehmer der Bettel-Rallye werden angezeigt.");
214                                 break;
215
216                         case '0.2.7': // SQL queries for v0.2.7
217                                 // Update notes (these will be set as task text!)
218                                 setExtensionUpdateNotes("Link zum direkten Aufheben einer Urlaubsschaltung eines Mitgliedes korregiert.");
219                                 break;
220
221                         case '0.2.8': // SQL queries for v0.2.8
222                                 // Update notes (these will be set as task text!)
223                                 setExtensionUpdateNotes("Sicherheitsupdate f&uuml;r die Include-Befehle.");
224                                 break;
225
226                         case '0.2.9': // SQL queries for v0.2.9
227                                 // Update notes (these will be set as task text!)
228                                 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.");
229                                 break;
230
231                         case '0.3.0': // SQL queries for v0.3.0
232                                 // Update notes (these will be set as task text!)
233                                 setExtensionUpdateNotes("Export-Accounts werden in Task-&Uuml;bersicht aufgelistet.");
234                                 break;
235
236                         case '0.3.1': // SQL queries for v0.3.1
237                                 // Update notes (these will be set as task text!)
238                                 setExtensionUpdateNotes("Diverse Fixes an den Templates (Notice-Hinweise vom PHP-Interpreter entfernt).");
239                                 break;
240
241                         case '0.3.2': // SQL queries for v0.3.2
242                                 // This update depends on user update
243                                 addExtensionUpdateDependency('sql_patches');
244
245                                 // Update notes (these will be set as task text!)
246                                 setExtensionUpdateNotes("H&auml;ngt nun von <u>ext-user</u> ab.");
247                                 break;
248                 }
249                 break;
250
251         case 'modify': // When the extension got modified
252                 break;
253
254         case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
255                 break;
256
257         case 'init': // Do stuff when extension is initialized
258                 break;
259
260         default: // Unknown extension mode
261                 DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown extension mode %s detected.", getExtensionMode()));
262                 break;
263 }
264
265 // [EOF]
266 ?>