branch prepared
[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 ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])))
36 {
37         $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
38         require($INC);
39 }
40
41 // Version number
42 $EXT_VERSION = "0.3.1";
43
44 // Auto-set extension version
45 if (empty($EXT_VER)) $EXT_VER = $EXT_VERSION;
46
47 // Version history array (add more with , "0.1" and so on)
48 $EXT_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");
49
50 switch ($EXT_LOAD_MODE)
51 {
52 case "register": // Do stuff when installtion is running (modules.php?module=admin&action=login is called)
53         // SQL commands to run
54         $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, sort, descr) VALUES ('task', '', 'Aufgaben-Management', '1', 'Erweitertes Aufgaben-Management zur leichten verwaltung der vom System erzeugten Aufgaben.')";
55         $SQLs[] = "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).')";
56         $SQLs[] = "UPDATE "._MYSQL_PREFIX."_task_system SET status='SOLVED' WHERE status='CLOSED'";
57
58         // Enable CSS file?
59         $EXT_CSS = "Y";
60         break;
61
62 case "remove": // Do stuff when removing extension
63         // SQL commands to run
64         $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE action='task' LIMIT 2";
65         break;
66
67 case "activate": // Do stuff when admin activates this extension
68         // SQL commands to run
69         $SQLs[] = "";
70         break;
71
72 case "deactivate": // Do stuff when admin deactivates this extension
73         // SQL commands to run
74         $SQLs[] = "";
75         break;
76
77 case "update": // Update an extension
78         switch ($EXT_VER)
79         {
80         case "0.0.1": // SQL queries for v0.0.1
81                 $SQLs[] = "UPDATE "._MYSQL_PREFIX."_extensions SET ext_has_css='Y' WHERE ext_name='task' AND ext_has_css='N' LIMIT 1";
82
83                 // This update depends on sql_patches update!
84                 $EXT_UPDATE_DEPENDS = "sql_patches";
85
86                 // Update notes (these will be set as task text!)
87                 $UPDATE_NOTES = "CSS-Datei kann per Admin-Bereich ein- und ausgeschaltet werden.";
88                 break;
89
90         case "0.0.1": // SQL queries for v0.0.1
91                 // Update notes (these will be set as task text!)
92                 $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.";
93                 break;
94
95         case "0.0.4": // SQL queries for v0.0.4
96                 // Update notes (these will be set as task text!)
97                 $UPDATE_NOTES = "Fehler <FONT class=\"admin_failed\">Warning: Missing argument 2 for create_timestamp_from_selections() in ".PATH."inc/libs/pro_functions.php on line 227</FONT> behoben.";
98                 break;
99
100         case "0.0.5": // SQL queries for v0.0.5
101                 // Update notes (these will be set as task text!)
102                 $UPDATE_NOTES = "&amp;admin= in &amp;amp;admin= umgewandelt.";
103                 break;
104
105         case "0.0.6": // SQL queries for v0.0.6
106                 // Update notes (these will be set as task text!)
107                 $UPDATE_NOTES = "Wegen des Theme-Supportes hat sich die URL zur CSS-Datei ge&auml;ndert.";
108                 break;
109
110         case "0.0.7": // SQL queries for v0.0.7
111                 // Update notes (these will be set as task text!)
112                 $UPDATE_NOTES = "Erstellung der Extra-&Uuml;bersichten verbessert.";
113                 break;
114
115         case "0.0.8": // SQL queries for v0.0.8
116                 // Update notes (these will be set as task text!)
117                 $UPDATE_NOTES = "Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.";
118                 break;
119
120         case "0.0.9": // SQL queries for v0.0.9
121                 // Update notes (these will be set as task text!)
122                 $UPDATE_NOTES = "Fehler bei Abfrage der payout-Erweiterung beseitigt.";
123                 break;
124
125         case "0.1.0": // SQL queries for v0.1.0
126                 // Update notes (these will be set as task text!)
127                 $UPDATE_NOTES = "Task-Liste ausgelagert als Template";
128                 break;
129
130         case "0.1.1": // SQL queries for v0.1.1
131                 // Update notes (these will be set as task text!)
132                 $UPDATE_NOTES = "Design &quot;Solid-Business&quot; eingebaut.";
133                 break;
134
135         case "0.1.2": // SQL queries for v0.1.2
136                 // Update notes (these will be set as task text!)
137                 $UPDATE_NOTES = "Seit <A href=\"".SERVER_URL."/patches/340-Gast_Mitgliedsmenue_Deaktivieren.zip\">Patch 340</A> &uuml;berfl&uuml;ssige HTML-Tags entfernt.";
138                 break;
139
140         case "0.1.3": // SQL queries for v0.1.3
141                 // Update notes (these will be set as task text!)
142                 $UPDATE_NOTES = "Link zum Mitgliedsprofil in Funktion <U>ADMIN_USER_PROFILE_LINK()</U> ausgelagert.";
143                 break;
144
145         case "0.1.4": // SQL queries for v0.1.4
146                 // Update notes (these will be set as task text!)
147                 $UPDATE_NOTES = "W&ouml;rter <STRONG>Mailtausch</STRONG>, <STRONG>Mailtausches</STRONG> und <STRONG>Mailtauscher</STRONG> sind austauschbar.";
148                 break;
149
150         case "0.1.5": // SQL queries for v0.1.5
151                 // Update notes (these will be set as task text!)
152                 $UPDATE_NOTES = "Links wegen <STRONG>what=admins_contct</STRONG> ge&auml;ndert.";
153                 break;
154
155         case "0.1.6": // SQL queries for v0.1.6
156                 // Update notes (these will be set as task text!)
157                 $UPDATE_NOTES = "Weitere Direkt-Links eingebaut:<BR>
158 <UL>
159   <LI>L&auml;ndercodes (<STRONG><A href=\"".SERVER_URL."/extensions/ext-country.zip\">ext-country.zip</A></STRONG>)</LI>
160   <LI>Wartende Verdopplungen (<STRONG><A href=\"".SERVER_URL."/extensions/ext-doubler.zip\">ext-doubler.zip</A></STRONG>)</LI>
161   <LI><STRONG>Ge&auml;ndert:</STRONG> Wartende Auszahlungen (<STRONG><A href=\"".SERVER_URL."/extensions/ext-payout.zip\">ext-payout.zip</A></STRONG>)</LI>
162   <LI>Teilnehmer an der Aktiv-Rallye (<STRONG><A href=\"".SERVER_URL."/extensions/ext-bonus.zip\">ext-bonus.zip</A></STRONG>; nur wenn Version neuer oder gleich 0.2.3 ist!)</LI>
163   <LI>Nett hinweisende Linktitel hinzugef&uuml;gt. :-)</LI>
164 </UL>";
165                 break;
166
167         case "0.1.7": // SQL queries for v0.1.7
168                 // Update notes (these will be set as task text!)
169                 $UPDATE_NOTES = "Direkt Links zum Sponsorenbereich vorbereitend eingebaut.";
170                 break;
171
172         case "0.1.8": // SQL queries for v0.1.8
173                 // Update notes (these will be set as task text!)
174                 $UPDATE_NOTES = "Es werden alle installierten und aktivierten Themes angezeigt und verlinkt.";
175                 break;
176
177         case "0.1.9": // SQL queries for v0.1.9
178                 // Update notes (these will be set as task text!)
179                 $UPDATE_NOTES = "CSS-Datei in general.css verschmolzen (Patch 435!)";
180                 break;
181
182         case "0.2.0": // SQL queries for v0.2.0
183                 // Update notes (these will be set as task text!)
184                 $UPDATE_NOTES = "Alle Administratoren, Referral-Banner und aktivierte Referral-Banner werden nun eingeblendet.";
185                 break;
186
187         case "0.2.1": // SQL queries for v0.2.1
188                 // Update notes (these will be set as task text!)
189                 $UPDATE_NOTES = "Problem mit &uuml;berlanger Textbreite beseitigt.";
190                 break;
191
192         case "0.2.2": // SQL queries for v0.2.2
193                 // Update notes (these will be set as task text!)
194                 $UPDATE_NOTES = "Link zum Freischalten von Sponoren-Accounts korregiert.";
195                 break;
196
197         case "0.2.3": // SQL queries for v0.2.3
198                 // Update notes (these will be set as task text!)
199                 $UPDATE_NOTES = "Sortierungsreihenfolge grundlegend ge&auml;ndert: Es wird jetzt nach Mitglieder-ID, Aufgabenbereich, Infos und nach dem Erstellunsdatum sortiert.";
200                 break;
201
202         case "0.2.4": // SQL queries for v0.2.4
203                 // Update notes (these will be set as task text!)
204                 $UPDATE_NOTES = "Abspeichern von Einstellungen repariert.";
205                 break;
206
207         case "0.2.5": // SQL queries for v0.2.5
208                 // Update notes (these will be set as task text!)
209                 $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.";
210                 break;
211
212         case "0.2.6": // SQL queries for v0.2.6
213                 // Update notes (these will be set as task text!)
214                 $UPDATE_NOTES = "Teilnehmer der Bettel-Rallye werden angezeigt.";
215                 break;
216
217         case "0.2.7": // SQL queries for v0.2.7
218                 // Update notes (these will be set as task text!)
219                 $UPDATE_NOTES = "Link zum direkten Aufheben einer Urlaubsschaltung eines Mitgliedes korregiert.";
220                 break;
221
222         case "0.2.8": // SQL queries for v0.2.8
223                 // Update notes (these will be set as task text!)
224                 $UPDATE_NOTES = "Sicherheitsupdate f&uuml;r die Include-Befehle.";
225                 break;
226
227         case "0.2.9": // SQL queries for v0.2.9
228                 // Update notes (these will be set as task text!)
229                 $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.";
230                 break;
231
232         case "0.3.0": // SQL queries for v0.3.0
233                 // Update notes (these will be set as task text!)
234                 $UPDATE_NOTES = "Export-Accounts werden in Task-&Uuml;bersicht aufgelistet.";
235                 break;
236
237         case "0.3.1": // SQL queries for v0.3.1
238                 // Update notes (these will be set as task text!)
239                 $UPDATE_NOTES = "Diverse Fixes an den Templates (Notice-Hinweise vom PHP-Interpreter entfernt).";
240                 break;
241         }
242         break;
243
244 default: // Do stuff when extension is loaded
245         break;
246 }
247
248 // Language file prefix
249 $EXT_LANG_PREFIX = "task";
250
251 // Extension is always active?
252 $EXT_ALWAYS_ACTIVE = "N";
253
254 //
255 ?>