X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fextensions%2Fext-task.php;h=29945d6c925c7399357e3db5709cb0fc5f901155;hb=5ef42cb239e9225f160f5963a718f14bc70a1866;hp=c3a83952056268f70d5cc8ab832df34cd230a373;hpb=e2148142f8b1a8f40fd6e7ca32185569c5a9083e;p=mailer.git diff --git a/inc/extensions/ext-task.php b/inc/extensions/ext-task.php index c3a8395205..29945d6c92 100644 --- a/inc/extensions/ext-task.php +++ b/inc/extensions/ext-task.php @@ -14,11 +14,10 @@ * $Date:: $ * * $Tag:: 0.2.1-FINAL $ * * $Author:: $ * - * Needs to be in all Files and every File needs "svn propset * - * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * For more information visit: http://www.mxchange.org * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * + * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * @@ -39,23 +38,30 @@ // Some security stuff... if (!defined('__SECURITY')) { die(); -} +} // END - if // Version number -setThisExtensionVersion('0.3.2'); +setThisExtensionVersion('0.3.3'); -// Version history array (add more with , '0.1.0' and so on) -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')); +// Version history array (add more with , '0.0.1' and so on) +setExtensionVersionHistory(array('0.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', '0.3.3')); // Keep this extension always active! setExtensionAlwaysActive('Y'); switch (getExtensionMode()) { - case 'register': // Do stuff when installation is running (modules.php?module=admin is called) + case 'register': // Do stuff when installation is running // SQL commands to run addAdminMenuSql('task', NULL, 'Aufgaben-Management','Erweitertes Aufgaben-Management zur leichten verwaltung der vom System erzeugten Aufgaben.',1); addAdminMenuSql('task','list_task','Aufgaben auflisten','Alle Ihnen zugewiesenen Aufgaben auflisten (keine Updates).',1); addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_task_system` SET `status`='SOLVED' WHERE `status`='CLOSED'"); + // These SQL updates has been moved from ext-sql_patches to here + addExtensionAddTableIndexSql('task_system', 'task_type', '(`task_type`)'); + addExtensionAddTableIndexSql('task_system', 'status', '(`status`)'); + addExtensionAddTableIndexSql('task_system', 'task_created', '(`task_created`)'); + addExtensionAddTableFulltextSql('task_system', 'subject', '(`subject`)'); + addExtensionAddTableIndexSql('task_system', 'subject', '(`subject`)'); + addExtensionAddTableIndexSql('task_system', 'subject', '(`subject`)'); break; case 'remove': // Do stuff when removing extension @@ -74,16 +80,13 @@ switch (getExtensionMode()) { break; case 'update': // Update an extension - switch (getCurrentExtensionVersion()) - { + switch (getCurrentExtensionVersion()) { case '0.0.1': // SQL queries for v0.0.1 - addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_extensions` SET ext_has_css='Y' WHERE `ext_name`='task' AND ext_has_css='N' LIMIT 1"); - - // This update depends on sql_patches update! - addExtensionUpdateDependency('sql_patches'); + // This update depends on ext-sql_patches update! + addExtensionDependency('sql_patches'); // Update notes (these will be set as task text!) - setExtensionUpdateNotes("CSS-Datei kann per Admin-Bereich ein- und ausgeschaltet werden."); + setExtensionUpdateNotes("Veraltetes Update entfernt."); break; case '0.0.1': // SQL queries for v0.0.1 @@ -93,7 +96,7 @@ switch (getExtensionMode()) { case '0.0.4': // SQL queries for v0.0.4 // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Fehler
Warning: Missing argument 2 for create_timestamp_from_selections() in {?PATH?}inc/libs/pro_functions.php on line 227
behoben."); + setExtensionUpdateNotes("Fehler
Warning: Missing argument 2 for create_timestamp_from_selections() in {?PATH?}inc/libs/pro_functions.php on line 227
behoben."); break; case '0.0.5': // SQL queries for v0.0.5 @@ -180,7 +183,7 @@ switch (getExtensionMode()) { case '0.2.0': // SQL queries for v0.2.0 // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Alle Administratoren, Referal-Banner und aktivierte Referal-Banner werden nun eingeblendet."); + setExtensionUpdateNotes("Alle Administratoren, Referral-Banner und aktivierte Referral-Banner werden nun eingeblendet."); break; case '0.2.1': // SQL queries for v0.2.1 @@ -195,7 +198,7 @@ switch (getExtensionMode()) { case '0.2.3': // SQL queries for v0.2.3 // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Sortierungsreihenfolge grundlegend geändert: Es wird jetzt nach Mitglieder-Id, Aufgabenbereich, Infos und nach dem Erstellunsdatum sortiert."); + setExtensionUpdateNotes("Sortierungsreihenfolge grundlegend geändert: Es wird jetzt nach Mitglieds-Id, Aufgabenbereich, Infos und nach dem Erstellunsdatum sortiert."); break; case '0.2.4': // SQL queries for v0.2.4 @@ -240,27 +243,37 @@ switch (getExtensionMode()) { case '0.3.2': // SQL queries for v0.3.2 // This update depends on user update - addExtensionUpdateDependency('sql_patches'); + addExtensionDependency('sql_patches'); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Hängt nun von ext-user ab."); break; - } + + case '0.3.3': // SQL queries for v0.3.3 + addExtensionChangeTableColumnSql('task_system', 'assigned_admin', 'assigned_admin', 'BIGINT(20) UNSIGNED NULL DEFAULT NULL'); + addExtensionChangeTableColumnSql('task_system', 'userid', 'userid', 'BIGINT(20) UNSIGNED NULL DEFAULT NULL'); + addExtensionSql('UPDATE `{?_MYSQL_PREFIX?}_task_system` SET `assigned_admin`=NULL WHERE `assigned_admin`=0'); + addExtensionSql('UPDATE `{?_MYSQL_PREFIX?}_task_system` SET `userid`=NULL WHERE `userid`=0'); + + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Zugewiesener Admin und User-Id dürfen nun NULL sein."); + break; + } // END - switch break; case 'modify': // When the extension got modified break; - case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. + case 'test': // For testing purposes break; case 'init': // Do stuff when extension is initialized break; default: // Unknown extension mode - DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown extension mode %s detected.", getExtensionMode())); + logDebugMessage(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName())); break; -} +} // END - switch // [EOF] ?>