Fixed bug #14771: Updates for taskcenter, sys_action, impexp (Thanks to Georg Ringer)
authorSteffen Kamper <info@sk-typo3.de>
Tue, 22 Jun 2010 11:33:46 +0000 (11:33 +0000)
committerSteffen Kamper <info@sk-typo3.de>
Tue, 22 Jun 2010 11:33:46 +0000 (11:33 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@8030 709f56b5-9817-0410-a4d7-c38de5d9e867

19 files changed:
ChangeLog
typo3/sysext/impexp/ext_tables.php
typo3/sysext/impexp/task/class.tx_impexp_task.php
typo3/sysext/sys_action/ext_emconf.php
typo3/sysext/sys_action/ext_tables.php
typo3/sysext/sys_action/task/class.tx_sysaction_task.php
typo3/sysext/sys_action/tca.php
typo3/sysext/sys_action/toolbarmenu/class.tx_sysaction_toolbarmenu.php
typo3/sysext/sys_action/toolbarmenu/tx_sysactions.css
typo3/sysext/sys_action/toolbarmenu/tx_sysactions.js
typo3/sysext/taskcenter/classes/class.tx_taskcenter_status.php
typo3/sysext/taskcenter/ext_autoload.php
typo3/sysext/taskcenter/ext_emconf.php
typo3/sysext/taskcenter/ext_tables.php
typo3/sysext/taskcenter/interfaces/interface.tx_taskcenter_task.php
typo3/sysext/taskcenter/res/mod_styles.css
typo3/sysext/taskcenter/task/class.mod_user_task.php [deleted file]
typo3/sysext/taskcenter/task/index.php
typo3/sysext/taskcenter/task/locallang.xml

index 7e31e21..0b3aa85 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,7 @@
 
 2010-06-22  Steffen Kamper  <info@sk-typo3.de>
 
+       * Fixed bug #14771: Updates for taskcenter, sys_action, impexp (Thanks to Georg Ringer)
        * Follow-up to #14465: Make use of the new Sprite API throughout the TYPO3 Core Backend (Thanks to Steffen Ritter)
        * Follow-up to #14798: Sitename missing in Login form
 
index cd2ce46..bab1e6d 100755 (executable)
@@ -4,17 +4,16 @@ if (!defined ('TYPO3_MODE')) {
 }
 
 if (TYPO3_MODE == 'BE')        {
-       $GLOBALS['TBE_MODULES_EXT']['xMOD_alt_clickmenu']['extendCMclasses'][] = array (
+       $GLOBALS['TBE_MODULES_EXT']['xMOD_alt_clickmenu']['extendCMclasses'][] = array(
                'name' => 'tx_impexp_clickmenu',
                'path' => t3lib_extMgm::extPath($_EXTKEY).'class.tx_impexp_clickmenu.php'
        );
 
 
-       $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['taskcenter']['impexp']['tasks'] = array (
+       $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['taskcenter']['impexp']['tx_impexp_task'] = array(
                'title'       => 'LLL:EXT:impexp/locallang_csh.xml:.alttitle',
                'description' => 'LLL:EXT:impexp/locallang_csh.xml:.description',
-               'icon'            => 'EXT:impexp/export.gif',
-               'task'            => 'tx_impexp_task',
+               'icon'            => 'EXT:impexp/export.gif'
        );
 
        t3lib_extMgm::addLLrefForTCAdescr('xMOD_tx_impexp','EXT:impexp/locallang_csh.xml');
index 25638f4..de38a9e 100644 (file)
@@ -68,8 +68,6 @@ class tx_impexp_task implements tx_taskcenter_Task {
                return '';
        }
 
-
-
        /**
         * Main Task center module
         *
@@ -86,9 +84,9 @@ class tx_impexp_task implements tx_taskcenter_Task {
                } else {
                                // header
                        $content .= $this->taskObject->description(
-                                                       $GLOBALS['LANG']->getLL('.alttitle'),
-                                                       $GLOBALS['LANG']->getLL('.description')
-                                               );
+                               $GLOBALS['LANG']->getLL('.alttitle'),
+                               $GLOBALS['LANG']->getLL('.description')
+                       );
 
                        $thumbnails = $lines = array();
 
@@ -109,15 +107,8 @@ class tx_impexp_task implements tx_taskcenter_Task {
                                foreach($presets as $key => $presetCfg) {
                                        $configuration = unserialize($presetCfg['preset_data']);
                                        $thumbnailFile = $thumbnails[$configuration['meta']['thumbnail']];
-                                       $title = strlen($presetCfg['title']) ? $presetCfg['title'] : '['.$presetCfg['uid'].']';
-
-                                       if ($thumbnailFile && 1==2) {
-                                               // @todo: create icon or maybe completly remove it because where to display?
-                                               $src=  '../' . $GLOBALS['BACK_PATH'] .  substr($tempDir, strlen(PATH_site)) . basename($thumbnailFile);
-                                               $icon = $src;
-                                       } else {
-                                               $icon = 'EXT:impexp/export.gif';
-                                       }
+                                       $title = strlen($presetCfg['title']) ? $presetCfg['title'] : '[' . $presetCfg['uid'] . ']';
+                                       $icon = 'EXT:impexp/export.gif';
 
                                        $description = array();
 
@@ -157,10 +148,10 @@ class tx_impexp_task implements tx_taskcenter_Task {
 
                                                // collect all preset information
                                        $lines[$key] = array(
-                                               'icon' => $icon,
-                                               'title' => htmlspecialchars($title),
-                                               'descriptionHtml' => implode('<br />', $description),
-                                               'link' => 'mod.php?M=user_task&SET[function]=impexp.tasks&display=' . $presetCfg['uid']
+                                               'icon'                          => $icon,
+                                               'title'                         => $title,
+                                               'descriptionHtml'       => implode('<br />', $description),
+                                               'link'                          => 'mod.php?M=user_task&SET[function]=impexp.tx_impexp_task&display=' . $presetCfg['uid']
                                        );
 
                                }
@@ -174,7 +165,6 @@ class tx_impexp_task implements tx_taskcenter_Task {
                                        $GLOBALS['LANG']->getLL('no-presets'),
                                        '',
                                        t3lib_FlashMessage::NOTICE
-
                                );
                                $content .= $flashMessage->render();
                        }
@@ -189,14 +179,14 @@ class tx_impexp_task implements tx_taskcenter_Task {
         *
         * @return      array           Array of preset records
         */
-       function getPresets() {
+       protected function getPresets() {
                $presets = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
-                               '*',
-                               'tx_impexp_presets',
-                               '(public > 0 OR user_uid=' . $GLOBALS['BE_USER']->user['uid'] . ')',
-                               '',
-                               'item_uid DESC, title'
-                       );
+                       '*',
+                       'tx_impexp_presets',
+                       '(public > 0 OR user_uid=' . $GLOBALS['BE_USER']->user['uid'] . ')',
+                       '',
+                       'item_uid DESC, title'
+               );
 
                return $presets;
        }
@@ -206,15 +196,16 @@ class tx_impexp_task implements tx_taskcenter_Task {
         *
         * @return      string          Absolute path to first "_temp_" folder of the current user, otherwise blank.
         */
-       function userTempFolder() {
+       protected function userTempFolder() {
                foreach($GLOBALS['FILEMOUNTS'] as $filePathInfo) {
                        $tempFolder = $filePathInfo['path'] . '_temp_/';
                        if (@is_dir($tempFolder)) {
                                return $tempFolder;
                        }
                }
-       }
 
+               return '';
+       }
 
 }
 
index de13a82..b32de59 100755 (executable)
@@ -33,13 +33,12 @@ $EM_CONF[$_EXTKEY] = array(
        'author_company' => 'Curby Soft Multimedia',
        'CGLcompliance' => '',
        'CGLcompliance_note' => '',
-       'version' => '1.2.0',
+       'version' => '2.0.0',
        '_md5_values_when_last_written' => 'a:17:{s:8:"TODO.txt";s:4:"17ff";s:22:"class.tx_sysaction.php";s:4:"627a";s:16:"ext_autoload.php";s:4:"9b72";s:12:"ext_icon.gif";s:4:"f410";s:14:"ext_tables.php";s:4:"abdf";s:14:"ext_tables.sql";s:4:"c36f";s:13:"locallang.xml";s:4:"3327";s:27:"locallang_csh_sysaction.xml";s:4:"a1d4";s:17:"locallang_tca.xml";s:4:"abe1";s:14:"sys_action.gif";s:4:"eb3a";s:17:"sys_action__h.gif";s:4:"7a29";s:7:"tca.php";s:4:"3356";s:32:"task/class.tx_sysaction_task.php";s:4:"207e";s:46:"toolbarmenu/class.tx_sysaction_toolbarmenu.php";s:4:"11d3";s:35:"toolbarmenu/registerToolbarItem.php";s:4:"58a6";s:29:"toolbarmenu/tx_sysactions.css";s:4:"bd1b";s:28:"toolbarmenu/tx_sysactions.js";s:4:"deb0";}',
        'constraints' => array(
                'depends' => array(
-                       'taskcenter' => '1.0.0-0.0.0',
-                       'php' => '5.1.0-0.0.0',
-                       'typo3' => '4.3.0-0.0.0',
+                       'taskcenter' => '2.0.0-0.0.0',
+                       'typo3' => '4.4.0-0.0.0',
                ),
                'conflicts' => array(
                ),
index 51c7625..813eac8 100755 (executable)
@@ -4,8 +4,8 @@ if (!defined ('TYPO3_MODE')) {
 }
 
 if (TYPO3_MODE == 'BE')        {
-       $TCA['sys_action'] = array (
-               'ctrl' => array (
+       $TCA['sys_action'] = array(
+               'ctrl' => array(
                        'label' => 'title',
                        'tstamp' => 'tstamp',
                        'default_sortby' => 'ORDER BY title',
@@ -17,7 +17,7 @@ if (TYPO3_MODE == 'BE')       {
                        'adminOnly' => 1,
                        'rootLevel' => -1,
                        'setToDefaultOnCopy' => 'assign_to_groups',
-                       'enablecolumns' => array (
+                       'enablecolumns' => array(
                                'disabled' => 'hidden'
                        ),
                        'typeicon_classes' => array(
@@ -33,11 +33,10 @@ if (TYPO3_MODE == 'BE')     {
 
        t3lib_extMgm::addLLrefForTCAdescr('sys_action','EXT:sys_action/locallang_csh_sysaction.xml');
 
-       $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['taskcenter']['sys_action']['tasks'] = array(
+       $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['taskcenter']['sys_action']['tx_sysaction_task'] = array(
                'title'       => 'LLL:EXT:sys_action/locallang_tca.xml:sys_action',
                'description' => 'LLL:EXT:sys_action/locallang_csh_sysaction.xml:.description',
-               'icon'            => 'EXT:sys_action/sys_action.gif',
-               'task'            => 'tx_sysaction_task'
+               'icon'            => 'EXT:sys_action/x-sys_action.png',
        );
 }
 ?>
\ No newline at end of file
index e9f601e..ddd7a68 100644 (file)
@@ -59,9 +59,9 @@ class tx_sysaction_task implements tx_taskcenter_Task {
                        // if no task selected, render the menu
                if ($show == 0) {
                        $content .= $this->taskObject->description(
-                                                       $GLOBALS['LANG']->getLL('sys_action'),
-                                                       $GLOBALS['LANG']->getLL('description')
-                                               );
+                               $GLOBALS['LANG']->getLL('sys_action'),
+                               $GLOBALS['LANG']->getLL('description')
+                       );
 
                        $content .= $this->renderActionList();
                } else {
@@ -71,7 +71,7 @@ class tx_sysaction_task implements tx_taskcenter_Task {
                        if (count($record) == 0) {
                                $flashMessage = t3lib_div::makeInstance(
                                        't3lib_FlashMessage',
-                                       $GLOBALS['LANG']->getLL('action_error-not-found', true),
+                                       $GLOBALS['LANG']->getLL('action_error-not-found', TRUE),
                                        $GLOBALS['LANG']->getLL('action_error'),
                                        t3lib_FlashMessage::ERROR
                                );
@@ -100,7 +100,7 @@ class tx_sysaction_task implements tx_taskcenter_Task {
                                        default:
                                                $flashMessage = t3lib_div::makeInstance(
                                                        't3lib_FlashMessage',
-                                                       $GLOBALS['LANG']->getLL('action_noType', true),
+                                                       $GLOBALS['LANG']->getLL('action_noType', TRUE),
                                                        $GLOBALS['LANG']->getLL('action_error'),
                                                        t3lib_FlashMessage::ERROR
                                                );
@@ -121,16 +121,16 @@ class tx_sysaction_task implements tx_taskcenter_Task {
                $content = '<p>' . $GLOBALS['LANG']->getLL('description') . '</p>';
 
                        // get the actions
-               $lines = $this->getActions();
-               if (count($lines) > 0) {
+               $actionList = $this->getActions();
+               if (count($actionList) > 0) {
                        $items = '';
 
                                // render a single action menu item
-                       foreach ($lines as $line) {
-                               $active = (t3lib_div::_GP('show') === $line['uid']) ? ' class="active" ' : '';
+                       foreach ($actionList as $action) {
+                               $active = (t3lib_div::_GP('show') === $action['uid']) ? ' class="active" ' : '';
                                $items .= '<li' . $active . '>
-                                                               <a href="' . $line['link'] . '" title="' . htmlspecialchars($line['description']) . '">' .
-                                                                       htmlspecialchars($line['title']) .
+                                                               <a href="' . $action['link'] . '" title="' . htmlspecialchars($action['description']) . '">' .
+                                                                       htmlspecialchars($action['title']) .
                                                                '</a>
                                                        </li>';
                        }
@@ -144,11 +144,11 @@ class tx_sysaction_task implements tx_taskcenter_Task {
         * Get all actions of an user. Admins can see any action, all others only those
         * whic are allowed in sys_action record itself.
         *
-        * @param       boolean         $toOverview: If true, the link redirects to the taskcenter
+        * @param       boolean         $toOverview: If TRUE, the link redirects to the taskcenter
         * @return      array Array holding every needed information of a sys_action
         */
        protected function getActions() {
-               $lines = array();
+               $actionList = array();
 
                        // admins can see any record
                if ($GLOBALS['BE_USER']->isAdmin()) {
@@ -188,18 +188,18 @@ class tx_sysaction_task implements tx_taskcenter_Task {
                                                '</a>';
                        }
 
-                       $lines[] = array(
+                       $actionList[] = array(
                                'uid'                           => $actionRow['uid'],
                                'title'                         => $actionRow['title'],
                                'description'           => $actionRow['description'],
                                'descriptionHtml'       => nl2br(htmlspecialchars($actionRow['description'])) . $editActionLink,
-                               'link'                          => 'mod.php?M=user_task&SET[function]=sys_action.tasks&show=' . $actionRow['uid'],
+                               'link'                          => 'mod.php?M=user_task&SET[function]=sys_action.tx_sysaction_task&show=' . $actionRow['uid'],
                                'icon'                          => 'EXT:sys_action/sys_action.gif'
                        );
                }
                $GLOBALS['TYPO3_DB']->sql_free_result($res);
 
-               return $lines;
+               return $actionList;
        }
 
        /**
@@ -211,15 +211,15 @@ class tx_sysaction_task implements tx_taskcenter_Task {
                $content = '';
 
                        // get the sys_action records
-               $lines = $this->getActions();
+               $actionList = $this->getActions();
 
                        // if any actions are found for the current users
-               if (count($lines) > 0) {
-                       $content .= $this->taskObject->renderListMenu($lines);
+               if (count($actionList) > 0) {
+                       $content .= $this->taskObject->renderListMenu($actionList);
                } else {
                        $flashMessage = t3lib_div::makeInstance (
                                't3lib_FlashMessage',
-                               $GLOBALS['LANG']->getLL('action_not-found-description', true),
+                               $GLOBALS['LANG']->getLL('action_not-found-description', TRUE),
                                $GLOBALS['LANG']->getLL('action_not-found'),
                                t3lib_FlashMessage::INFO
                        );
@@ -255,7 +255,7 @@ class tx_sysaction_task implements tx_taskcenter_Task {
                if (!is_array($beRec)) {
                        $flashMessage = t3lib_div::makeInstance(
                                't3lib_FlashMessage',
-                               $GLOBALS['LANG']->getLL('action_notReady', true),
+                               $GLOBALS['LANG']->getLL('action_notReady', TRUE),
                                $GLOBALS['LANG']->getLL('action_error'),
                                t3lib_FlashMessage::ERROR
                        );
@@ -264,8 +264,6 @@ class tx_sysaction_task implements tx_taskcenter_Task {
                        return $content;
                }
 
-               $userRecord = array();
-               $newFlag = 0;
                $vars = t3lib_div::_POST('data');
                $key = 'NEW';
 
@@ -311,13 +309,12 @@ class tx_sysaction_task implements tx_taskcenter_Task {
 
                }
 
-
                        // load BE user to edit
                if (intval(t3lib_div::_GP('be_users_uid')) > 0) {
                        $tmpUserId = intval(t3lib_div::_GP('be_users_uid'));
 
+                               // check if the selected user is created by the current user
                        $rawRecord = $this->isCreatedByUser($tmpUserId, $record);
-
                        if ($rawRecord) {
                                        // delete user
                                if (t3lib_div::_GP('delete') == 1) {
@@ -327,7 +324,6 @@ class tx_sysaction_task implements tx_taskcenter_Task {
                                $key = $tmpUserId;
                                $vars = $rawRecord;
                        }
-
                }
 
                $this->JScode();
@@ -338,37 +334,37 @@ class tx_sysaction_task implements tx_taskcenter_Task {
                                                <fieldset class="fields">
                                                        <legend>General fields</legend>
                                                        <div class="row">
-                                                               <label for="disable">' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_general.xml:LGL.disable') . '</label>
-                                                               <input type="checkbox" id="disable" name="data[disable]" value="1" class="checkbox" ' . ($vars['disable'] == 1 ? ' checked="checked" ' : '') . ' />
+                                                               <label for="field_disable">' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_general.xml:LGL.disable') . '</label>
+                                                               <input type="checkbox" id="field_disable" name="data[disable]" value="1" class="checkbox" ' . ($vars['disable'] == 1 ? ' checked="checked" ' : '') . ' />
                                                        </div>
                                                        <div class="row">
-                                                               <label for="realname">' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_general.xml:LGL.name') . '</label>
-                                                               <input type="text" id="realname" name="data[realName]" value="' . htmlspecialchars($vars['realName']) .'" />
+                                                               <label for="field_realname">' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_general.xml:LGL.name') . '</label>
+                                                               <input type="text" id="field_realname" name="data[realName]" value="' . htmlspecialchars($vars['realName']) .'" />
                                                        </div>
                                                        <div class="row">
-                                                               <label for="username">' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_tca.xml:be_users.username') . '</label>
-                                                               <input type="text" id="username" name="data[username]" value="' . htmlspecialchars($vars['username']) .'" />
+                                                               <label for="field_username">' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_tca.xml:be_users.username') . '</label>
+                                                               <input type="text" id="field_username" name="data[username]" value="' . htmlspecialchars($vars['username']) .'" />
                                                        </div>
                                                        <div class="row">
-                                                               <label for="password">' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_tca.xml:be_users.password') . '</label>
-                                                               <input type="password" id="password" name="data[password]" value="" />
+                                                               <label for="field_password">' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_tca.xml:be_users.password') . '</label>
+                                                               <input type="password" id="field_password" name="data[password]" value="" />
                                                        </div>
                                                        <div class="row">
-                                                               <label for="email">' .$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_general.xml:LGL.email') . '</label>
-                                                               <input type="text" id="email" name="data[email]" value="' . htmlspecialchars($vars['email']) .'" />
+                                                               <label for="field_email">' .$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_general.xml:LGL.email') . '</label>
+                                                               <input type="text" id="field_email" name="data[email]" value="' . htmlspecialchars($vars['email']) .'" />
                                                        </div>
                                                </fieldset>
                                                <fieldset class="fields">
                                                        <legend>Configuration</legend>
 
                                                        <div class="row">
-                                                               <label for="usergroup">' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_tca.xml:be_users.usergroup') . '</label>
-                                                               <select id="usergroup" name="data[usergroup][]" multiple="multiple">
+                                                               <label for="field_usergroup">' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_tca.xml:be_users.usergroup') . '</label>
+                                                               <select id="field_usergroup" name="data[usergroup][]" multiple="multiple">
                                                                        ' . $this->getUsergroups($record, $vars) . '
                                                                </select>
                                                        </div>
                                                        <div class="row">
-                                                               <label for="db_mountpoints">' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_tca.xml:be_users.options_db_mounts') . '</label>
+                                                               <label for="field_db_mountpoints">' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_tca.xml:be_users.options_db_mounts') . '</label>
                                                                ' . $this->t3lib_TCEforms->dbFileIcons('data[db_mountpoints]', 'db', 'pages', $loadDB->itemArray, '', array('size' => 3)) . '
                                                        </div>
                                                        <div class="row">
@@ -396,8 +392,8 @@ class tx_sysaction_task implements tx_taskcenter_Task {
                        'be_users',
                        'uid=' . $userId,
                        array (
-                               'deleted' => 1,
-                               'tstamp' => $GLOBALS['ACCESS_TIME']
+                               'deleted'       => 1,
+                               'tstamp'        => $GLOBALS['ACCESS_TIME']
                        )
                );
 
@@ -411,14 +407,14 @@ class tx_sysaction_task implements tx_taskcenter_Task {
         *
         * @param       int             $id: Id of the BE user
         * @param       array           $action: sys_action record.
-        * @return      mixed the record of the BE user if found, otherwise false
+        * @return      mixed the record of the BE user if found, otherwise FALSE
         */
        protected function isCreatedByUser($id, $action) {
                $record = t3lib_BEfunc::getRecord(
                        'be_users',
                        $id,
                        '*',
-                       ' AND cruser_id=' . $GLOBALS['BE_USER']->user['uid'] . ' AND createdByAction=' . intval($action['uid'])
+                       ' AND cruser_id=' . $GLOBALS['BE_USER']->user['uid'] . ' AND createdByAction=' . $action['uid']
                );
 
                if (is_array($record)) {
@@ -438,7 +434,7 @@ class tx_sysaction_task implements tx_taskcenter_Task {
         */
        protected function getCreatedUsers($action, $selectedUser) {
                $content = '';
-               $lines = array();
+               $userList = array();
 
                        // List of users
                $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
@@ -459,13 +455,13 @@ class tx_sysaction_task implements tx_taskcenter_Task {
                                $line = '<strong>' . $line . '</strong>';
                        }
 
-                       $lines[] = $line;
+                       $userList[] = $line;
                }
                $GLOBALS['TYPO3_DB']->sql_free_result($res);
 
                        // if any records found
-               if (count($lines)) {
-                       $content .= '<br />' . $this->taskObject->doc->section($GLOBALS['LANG']->getLL('action_t1_listOfUsers'), implode('<br />', $lines));
+               if (count($userList)) {
+                       $content .= '<br />' . $this->taskObject->doc->section($GLOBALS['LANG']->getLL('action_t1_listOfUsers'), implode('<br />', $userList));
                }
 
                return $content;
@@ -507,8 +503,6 @@ class tx_sysaction_task implements tx_taskcenter_Task {
         * @return      int Id of the new/updated user
         */
        protected function saveNewBackendUser($record, $vars) {
-               $content = '';
-
                        // check if the db mount is a page the current user is allowed to.);
                $vars['db_mountpoints'] = $this->fixDbMount($vars['db_mountpoints']);
                        // check if the usergroup is allowed
@@ -709,6 +703,13 @@ class tx_sysaction_task implements tx_taskcenter_Task {
                }
        }
 
+       /**
+        * Get all allowed usergroups which can be applied to a user record
+        *
+        * @param array $record sys_action record
+        * @param array $vars Selected be_user record
+        * @return string rendered user groups
+        */
        protected function getUsergroups($record, $vars) {
                $content = '';
                        // do nothing if no groups are allowed
@@ -750,7 +751,7 @@ class tx_sysaction_task implements tx_taskcenter_Task {
         */
        protected function viewEditRecord($record) {
                $content = '';
-               $lines = array();
+               $actionList = array();
 
                $dbAnalysis = t3lib_div::makeInstance('t3lib_loadDBGroup');
                $dbAnalysis->fromTC = 0;
@@ -767,7 +768,7 @@ class tx_sysaction_task implements tx_taskcenter_Task {
                                $description .= ' - ' . t3lib_BEfunc::dateTimeAge($record['crdate']);
                        }
 
-                       $lines[$el['id']] = array(
+                       $actionList[$el['id']] = array(
                                'title'                         => $title,
                                'description'           => t3lib_BEfunc::getRecordTitle($el['table'], $dbAnalysis->results[$el['table']][$el['id']]),
                                'descriptionHtml'       => $description,
@@ -777,7 +778,7 @@ class tx_sysaction_task implements tx_taskcenter_Task {
                }
 
                        // render the record list
-               $content .= $this->taskObject->renderListMenu($lines);
+               $content .= $this->taskObject->renderListMenu($actionList);
 
                return $content;
        }
@@ -801,7 +802,6 @@ class tx_sysaction_task implements tx_taskcenter_Task {
                                $fullsearch->formW = 40;
                                $fullsearch->noDownloadB = 1;
 
-
                                $type = $sql_query['qC']['search_query_makeQuery'];
                                $res = $GLOBALS['TYPO3_DB']->sql_query($sql_query['qSelect']);
 
@@ -823,14 +823,14 @@ class tx_sysaction_task implements tx_taskcenter_Task {
                                // Admin users are allowed to see and edit the query
                                if ($GLOBALS['BE_USER']->isAdmin()) {
                                        $actionContent .= '<hr /> ' . $fullsearch->tableWrap($sql_query['qSelect']);
-                                       $actionContent .= '<br /><a title="' . $GLOBALS['LANG']->getLL('action_editQuery') . '" href="'.$GLOBALS['BACK_PATH'] . t3lib_extMgm::extRelPath('lowlevel') . 'dbint/index.php?id='.
+                                       $actionContent .= '<br /><a title="' . $GLOBALS['LANG']->getLL('action_editQuery') . '" href="' . $GLOBALS['BACK_PATH'] . t3lib_extMgm::extRelPath('lowlevel') . 'dbint/index.php?id=' .
                                                '&SET[function]=search' .
                                                '&SET[search]=query' .
                                                '&storeControl[STORE]=-' . $record['uid'] .
                                                '&storeControl[LOAD]=1' .
                                                '">
                                                <img class="icon"' . t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], 'gfx/edit2.gif') . ' alt="" />' .
-                                                       $GLOBALS['LANG']->getLL('action_editQuery') . '</a><br /><br />';
+                                               $GLOBALS['LANG']->getLL('action_editQuery') . '</a><br /><br />';
                                }
 
                                $content .= $this->taskObject->doc->section($GLOBALS['LANG']->getLL('action_t2_result'), $actionContent, 0, 1);
@@ -838,7 +838,7 @@ class tx_sysaction_task implements tx_taskcenter_Task {
                                        // query is not configured
                                $flashMessage = t3lib_div::makeInstance (
                                        't3lib_FlashMessage',
-                                       $GLOBALS['LANG']->getLL('action_notReady', true),
+                                       $GLOBALS['LANG']->getLL('action_notReady', TRUE),
                                        $GLOBALS['LANG']->getLL('action_error'),
                                        t3lib_FlashMessage::ERROR
                                );
@@ -848,7 +848,7 @@ class tx_sysaction_task implements tx_taskcenter_Task {
                                // required sysext lowlevel is not installed
                        $flashMessage = t3lib_div::makeInstance (
                                't3lib_FlashMessage',
-                               $GLOBALS['LANG']->getLL('action_lowlevelMissing', true),
+                               $GLOBALS['LANG']->getLL('action_lowlevelMissing', TRUE),
                                $GLOBALS['LANG']->getLL('action_error'),
                                t3lib_FlashMessage::ERROR
                        );
@@ -872,7 +872,7 @@ class tx_sysaction_task implements tx_taskcenter_Task {
                if ($this->id == 0 || $this->table == '') {
                        $flashMessage = t3lib_div::makeInstance(
                                't3lib_FlashMessage',
-                               $GLOBALS['LANG']->getLL('action_lowlevelMissing', true),
+                               $GLOBALS['LANG']->getLL('action_lowlevelMissing', TRUE),
                                $GLOBALS['LANG']->getLL('action_error'),
                                t3lib_FlashMessage::ERROR
                        );
@@ -884,15 +884,10 @@ class tx_sysaction_task implements tx_taskcenter_Task {
                require_once($GLOBALS['BACK_PATH'] . 'class.db_list.inc');
                require_once($GLOBALS['BACK_PATH'] . 'class.db_list_extra.inc');
 
-
-                       // Start document template object:
-//             $this->doc = t3lib_div::makeInstance('template');
-
                        // Loading current page record and checking access:
                $this->pageinfo = t3lib_BEfunc::readPageAccess($this->id,$this->taskObject->perms_clause);
                $access = is_array($this->pageinfo) ? 1 : 0;
 
-
                        // If there is access to the page, then render the list contents and set up the document template object:
                if ($access) {
                                // Initialize the dblist object:
@@ -978,7 +973,6 @@ class tx_sysaction_task implements tx_taskcenter_Task {
                                // Setting up the context sensitive menu:
                        $this->taskObject->doc->getContextMenuCode();
 
-
                                // Begin to compile the whole page
                        $content .= '<form action="'.htmlspecialchars($dblist->listURL()).'" method="post" name="dblistForm">' .
                                                        $dblist->HTMLcode .
@@ -987,7 +981,6 @@ class tx_sysaction_task implements tx_taskcenter_Task {
 
                                // If a listing was produced, create the page footer with search form etc:
                        if ($dblist->HTMLcode) {
-
                                        // Making field select box (when extended view for a single table is enabled):
                                if ($dblist->table) {
                                        $tmpBackpath = $GLOBALS['BACK_PATH'];
@@ -1000,7 +993,7 @@ class tx_sysaction_task implements tx_taskcenter_Task {
                                // not enough rights to access the list view or the page
                        $flashMessage = t3lib_div::makeInstance(
                                't3lib_FlashMessage',
-                               $GLOBALS['LANG']->getLL('action_error-access', true),
+                               $GLOBALS['LANG']->getLL('action_error-access', TRUE),
                                $GLOBALS['LANG']->getLL('action_error'),
                                t3lib_FlashMessage::ERROR
                        );
index f23e086..5c4f854 100755 (executable)
@@ -3,40 +3,40 @@
 // ******************************************************************
 // sys_action
 // ******************************************************************
-$TCA['sys_action'] = array (
+$TCA['sys_action'] = array(
        'ctrl' => $TCA['sys_action']['ctrl'],
-       'interface' => array (
+       'interface' => array(
                'showRecordFieldList' => 'hidden,title,type,description,assign_to_groups'
        ),
-       'columns' => array (
-               'title' => array (
+       'columns' => array(
+               'title' => array(
                        'label' => 'LLL:EXT:lang/locallang_general.php:LGL.title',
-                       'config' => array (
+                       'config' => array(
                                'type' => 'input',
                                'size' => '25',
                                'max' => '256',
                                'eval' => 'trim,required'
                        )
                ),
-               'description' => array (
+               'description' => array(
                        'label' => 'LLL:EXT:lang/locallang_general.php:LGL.description',
-                       'config' => array (
+                       'config' => array(
                                'type' => 'text',
                                'rows' => 10,
                                'cols' => 48
                        )
                ),
-               'hidden' => array (
+               'hidden' => array(
                        'label' => 'LLL:EXT:sys_action/locallang_tca.php:sys_action.hidden',
-                       'config' => array (
+                       'config' => array(
                                'type' => 'check'
                        )
                ),
-               'type' => array (
+               'type' => array(
                        'label' => 'LLL:EXT:lang/locallang_general.php:LGL.type',
-                       'config' => array (
+                       'config' => array(
                                'type' => 'select',
-                               'items' => array (
+                               'items' => array(
                                        array('', '0'),
                                        array('LLL:EXT:sys_action/locallang_tca.php:sys_action.type.1', '1'),
                                        array('LLL:EXT:sys_action/locallang_tca.php:sys_action.type.2', '2'),
@@ -46,9 +46,9 @@ $TCA['sys_action'] = array (
                                )
                        )
                ),
-               'assign_to_groups' => array (
+               'assign_to_groups' => array(
                        'label' => 'LLL:EXT:sys_action/locallang_tca.php:sys_action.assign_to_groups',
-                       'config' => array (
+                       'config' => array(
                                'type' => 'select',
                                'foreign_table' => 'be_groups',
                                'foreign_table_where' => 'ORDER BY be_groups.title',
@@ -59,18 +59,18 @@ $TCA['sys_action'] = array (
                                'autoSizeMax' => '10'
                        )
                ),
-               't1_userprefix' => array (
+               't1_userprefix' => array(
                        'label' =>  'LLL:EXT:sys_action/locallang_tca.php:sys_action.t1_userprefix',
-                       'config' => array (
+                       'config' => array(
                                'type' => 'input',
                                'size' => '25',
                                'max' => '10',
                                'eval' => 'trim'
                        )
                ),
-               't1_allowed_groups' => array (
+               't1_allowed_groups' => array(
                        'label' => 'LLL:EXT:sys_action/locallang_tca.php:sys_action.t1_allowed_groups',
-                       'config' => array (
+                       'config' => array(
                                'type' => 'select',
                                'foreign_table' => 'be_groups',
                                'foreign_table_where' => 'ORDER BY be_groups.title',
@@ -79,15 +79,15 @@ $TCA['sys_action'] = array (
                                'autoSizeMax' => '10'
                        )
                ),
-               't1_create_user_dir' => array (
+               't1_create_user_dir' => array(
                        'label' => 'LLL:EXT:sys_action/locallang_tca.php:sys_action.t1_create_user_dir',
-                       'config' => array (
+                       'config' => array(
                                'type' => 'check'
                        )
                ),
-               't1_copy_of_user' => array (
+               't1_copy_of_user' => array(
                        'label' => 'LLL:EXT:sys_action/locallang_tca.php:sys_action.t1_copy_of_user',
-                       'config' => array (
+                       'config' => array(
                                'type' => 'group',
                                'internal_type' => 'db',
                                'allowed' => 'be_users',
@@ -102,9 +102,9 @@ $TCA['sys_action'] = array (
                                )
                        )
                ),
-               't3_listPid' => array (
+               't3_listPid' => array(
                        'label' => 'LLL:EXT:sys_action/locallang_tca.php:sys_action.t3_listPid',
-                       'config' => array (
+                       'config' => array(
                                'type' => 'group',
                                'internal_type' => 'db',
                                'allowed' => 'pages',
@@ -119,19 +119,19 @@ $TCA['sys_action'] = array (
                                )
                        )
                ),
-               't3_tables' => array (
+               't3_tables' => array(
                        'label' => 'LLL:EXT:sys_action/locallang_tca.php:sys_action.t3_tables',
-                       'config' => array (
+                       'config' => array(
                                'type' => 'select',
                                'special' => 'tables',
-                               'items' => array (
+                               'items' => array(
                                        array('','')
                                )
                        )
                ),
-               't4_recordsToEdit' => array (
+               't4_recordsToEdit' => array(
                        'label' => 'LLL:EXT:sys_action/locallang_tca.php:sys_action.t4_recordsToEdit',
-                       'config' => array (
+                       'config' => array(
                                'type' => 'group',
                                'internal_type' => 'db',
                                'allowed' => '*',
@@ -149,8 +149,8 @@ $TCA['sys_action'] = array (
                ),
 
        ),
-       'types' => array (
-               '0' => array('showitem' => 'hidden;;;;1-1-1,type,title;;;;2-2-2'),
+       'types' => array(
+               '0' => array('showitem' => 'hidden;;;;1-1-1,type,title;;;;2-2-2,description;;;;3-3-3,assign_to_groups,'),
                '1' => array('showitem' => 'hidden;;;;1-1-1,type,title;;;;2-2-2,description;;;;3-3-3,assign_to_groups,--div--,t1_userprefix;;;;5-5-5,t1_copy_of_user,t1_allowed_groups,t1_create_user_dir'),
                '2' => array('showitem' => 'hidden;;;;1-1-1,type,title;;;;2-2-2,description;;;;3-3-3,assign_to_groups,--div--,'),
                '3' => array('showitem' => 'hidden;;;;1-1-1,type,title;;;;2-2-2,description;;;;3-3-3,assign_to_groups,--div--,t3_listPid;;;;5-5-5,t3_tables;'),
index 1f74167..de51a04 100644 (file)
@@ -79,12 +79,9 @@ class tx_sysactionToolbarMenu implements backend_toolbarItem {
                        $this->addCssToBackend();
                        $title = $GLOBALS['LANG']->getLL('action_toolbaritem', TRUE);
 
-                       $actionMenu[] = '<a href="#" class="toolbar-item"><img' .
-                               t3lib_iconWorks::skinImg(
-                                       $this->backPath,
-                                       t3lib_extMgm::extRelPath($this->EXTKEY) . 'ext_icon.gif',
-                                       'width="16" height="16"'
-                               ) . ' title="' . $title . '" alt="' . $title . '" /></a>';
+                       $actionMenu[] = '<a href="#" class="toolbar-item">'.
+                               t3lib_iconWorks::getSpriteIcon('apps-toolbar-menu-actions', array('title' => $title)) .
+                               '</a>';
 
                        $actionMenu[] = '<ul class="toolbar-item-menu" style="display: none;">';
                        foreach ($actionEntries as $linkConf) {
@@ -142,12 +139,10 @@ class tx_sysactionToolbarMenu implements backend_toolbarItem {
                        while ($actionRow = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($queryResource)) {
                                $actions[] = array(
                                        $actionRow['title'],
-                                       'mod.php?M=user_task&SET[function]=sys_action.tasks&show=' . $actionRow['uid'],
-                                       t3lib_iconworks::getIconImage(
+                                       'mod.php?M=user_task&SET[function]==sys_action.tx_sysaction_task&show=' . $actionRow['uid'],
+                                       t3lib_iconworks::getSpriteIconForRecord(
                                                'sys_action',
-                                               $actionRow,
-                                               $GLOBALS['BACK_PATH'],
-                                               'hspace="2" class="absmiddle"'
+                                               $actionRow
                                        ),
                                );
                        }
index c6b0a18..be638e7 100644 (file)
@@ -5,8 +5,8 @@
 #tx-sys-action-menu ul {
        position: absolute;
        list-style: none;
-       padding: 2px 0px 0px;
-       margin: 0px;
+       padding: 2px 0 0;
+       margin: 0;
        background-color: #f9f9f9;
        border: 1px solid #abb2bc;
        border-top: none;
index 881a25f..4dd6b4a 100644 (file)
@@ -39,7 +39,7 @@ var SysActionMenu = Class.create({
 
                Ext.onReady(function() {
                        this.positionMenu();
-                       this.toolbarItemIcon = $$('#tx-sys-action-menu .toolbar-item img')[0].src;
+                       this.toolbarItemIcon = $$('#tx-sys-action-menu .toolbar-item span')[0].src;
 
                        Event.observe('tx-sys-action-menu', 'click', this.toggleMenu);
 
index 8050740..efb1218 100644 (file)
@@ -26,7 +26,7 @@
 /**
  * Status of tasks
  *
- * @author             Georg Ringer <typo3@ringerge.org
+ * @author             Georg Ringer <typo3@ringerge.org>
  * @package            TYPO3
  * @subpackage taskcenter
  *
@@ -41,7 +41,7 @@ class tx_taskcenter_status {
         * @return      void
         */
        public function saveCollapseState(array $params, TYPO3AJAX $ajaxObj) {
-                       // remove 'el_' in the beginning which is needed for the saveSortingState
+                       // remove 'el_' in the beginning which is needed for the saveSortingState()
                $item   = substr(htmlspecialchars(t3lib_div::_POST('item')), 3);
                $state  = (bool)t3lib_div::_POST('state');
 
index a9453c5..1261996 100644 (file)
@@ -5,7 +5,6 @@
  */
 $extensionPath = t3lib_extMgm::extPath('taskcenter');
 return array (
-       'tx_taskcenter_task' => $extensionPath . 'interfaces/interface.tx_taskcenter_task.php',
-       'tx_taskcenter_about' => $extensionPath . 'task/class.tx_taskcenter_about.php',
+       'tx_taskcenter_task' => $extensionPath . 'interfaces/interface.tx_taskcenter_task.php'
 );
 ?>
index 65b8992..b42ff92 100755 (executable)
@@ -32,16 +32,16 @@ $EM_CONF[$_EXTKEY] = array(
        'author_company' => 'Curby Soft Multimedia',
        'CGLcompliance' => '',
        'CGLcompliance_note' => '',
-       'version' => '1.0.0',
+       'version' => '2.0.0',
        '_md5_values_when_last_written' => 'a:22:{s:16:"ext_autoload.php";s:4:"db4e";s:12:"ext_icon.gif";s:4:"fc53";s:14:"ext_tables.php";s:4:"697a";s:13:"locallang.xml";s:4:"5e6d";s:38:"classes/class.tx_taskcenter_status.php";s:4:"bdbe";s:43:"interfaces/interface.tx_taskcenter_task.php";s:4:"a913";s:13:"res/Thumbs.db";s:4:"2468";s:23:"res/item-background.jpg";s:4:"c87c";s:21:"res/list-item-act.gif";s:4:"6fa4";s:17:"res/list-item.gif";s:4:"e82d";s:18:"res/mod_styles.css";s:4:"a29c";s:19:"res/mod_styles2.css";s:4:"a66b";s:21:"res/mod_template.html";s:4:"eb07";s:28:"task/class.mod_user_task.php";s:4:"5869";s:34:"task/class.tx_taskcenter_about.php";s:4:"3ca7";s:14:"task/clear.gif";s:4:"cc11";s:13:"task/conf.php";s:4:"e419";s:13:"task/icon.gif";s:4:"7941";s:14:"task/index.php";s:4:"2baa";s:18:"task/locallang.xml";s:4:"c202";s:22:"task/locallang_mod.xml";s:4:"c0f2";s:13:"task/task.gif";s:4:"fc53";}',
        'constraints' => array(
                'depends' => array(
-                       'php' => '5.1.0-0.0.0',
-                       'typo3' => '4.3.0-0.0.0',
+                       'typo3' => '4.4.0-0.0.0'
                ),
                'conflicts' => array(
                ),
                'suggests' => array(
+                       'sys_action' => '1.2.0-0.0.0'
                ),
        ),
        'suggests' => array(
index e5c14ce..bdae044 100755 (executable)
@@ -7,13 +7,6 @@ if (TYPO3_MODE == 'BE') {
        t3lib_extMgm::addModulePath('tools_txtaskcenterM1', t3lib_extMgm::extPath($_EXTKEY) . 'task/');
        t3lib_extMgm::addModule('user','task', 'top', t3lib_extMgm::extPath($_EXTKEY) . 'task/');
 
-//     $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['taskcenter']['taskcenter']['about'] = array(
-//             'title'                 => 'LLL:EXT:taskcenter/locallang.xml:task_help_title',
-//             'description'   => 'LLL:EXT:taskcenter/locallang.xml:task_help_description',
-//             'icon'                  => 'EXT:taskcenter/task/icon.gif',
-//             'task'                  => 'tx_taskcenter_about'
-//     );
-
        $GLOBALS['TYPO3_CONF_VARS']['BE']['AJAX']['Taskcenter::saveCollapseState']      = 'EXT:taskcenter/classes/class.tx_taskcenter_status.php:tx_taskcenter_status->saveCollapseState';
        $GLOBALS['TYPO3_CONF_VARS']['BE']['AJAX']['Taskcenter::saveSortingState']       = 'EXT:taskcenter/classes/class.tx_taskcenter_status.php:tx_taskcenter_status->saveSortingState';
 }
index 9a7a8bb..79ce04f 100644 (file)
@@ -2,7 +2,7 @@
 /***************************************************************
 *  Copyright notice
 *
-*  (c) 2010 Georg Ringer <typo3@ringerge.orgY
+*  (c) 2010 Georg Ringer <typo3@ringerge.org>
 *  All rights reserved
 *
 *  This script is part of the TYPO3 project. The TYPO3 project is
@@ -27,7 +27,7 @@
 
 
 /**
- * Interface for classes which provide a report.
+ * Interface for classes which provide a task.
  *
  * @author             Georg Ringer <typo3@ringerge.org
  * @package            TYPO3
index 1896343..1d494ba 100644 (file)
@@ -2,16 +2,16 @@
 
 /* general */
 body#ext-taskcenter-task-index-php {
-       margin:0;
+       margin: 0;
 }
 
 body#ext-taskcenter-task-index-php div#typo3-docbody {
-       top:60px;
+       top: 60px;
 }
 
 body#ext-taskcenter-task-index-php div#typo3-inner-docbody {
-       padding:0 10px;
-       height:100%;
+       padding: 0 10px;
+       height: 100%;
 }
 
 #typo3-inner-docbody p.help {
@@ -24,74 +24,73 @@ body#ext-taskcenter-task-index-php img.icon {
 }
 
 body#ext-taskcenter-task-index-php h3 {
-       margin:4px 0 8px;
-       padding:0;
+       margin: 4px 0 8px;
+       padding: 0;
 }
 
 /* ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- */
 /* overview */
 
 #taskcenter-main {
-       width:100%;
+       width: 100%;
 }
 
 #taskcenter-main #taskcenter-menu {
-       width:250px;
+       width: 250px;
 }
 
 #taskcenter-main #taskcenter-item {
-       position:absolute;
-       margin-left:270px;
-       margin-right:20px;
-       top:0;
-       min-width:300px;
-
+       position: absolute;
+       margin-left: 270px;
+       margin-right: 20px;
+       top: 0;
+       min-width: 300px;
 }
 
 /* ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- */
 /* menu */
 #taskcenter-menu ul {
-       list-style:none;
-       padding:0;
-       margin:0;
-       border-bottom:1px solid #b0b7c2;
+       list-style: none;
+       padding: 0;
+       margin: 0;
+       border-bottom: 1px solid #b0b7c2;
 }
 
 #taskcenter-menu li {
-       margin-top:1px;
-       border-top:1px solid #EFEFF4;
+       margin-top: 1px;
+       border-top: 1px solid #EFEFF4;
 }
 
 #taskcenter-menu .image {
-       float:left;
-       height:23px;
-       width:23px;
+       float: left;
+       height: 23px;
+       width: 23px;
 }
 #taskcenter-menu .image img {
-       margin:3px 0 0 1px;
+       margin: 3px 0 0 1px;
 }
 
 #taskcenter-menu .down {
-       background:url(../../t3skin/icons/gfx/pil2down.gif) no-repeat 5px 7px;
-       height:23px;
-       float:left;
-       width:25px;
-       cursor:pointer;
+       background: url(../../t3skin/icons/gfx/pil2down.gif) no-repeat 5px 7px;
+       height: 23px;
+       float: left;
+       width: 25px;
+       cursor: pointer;
 }
 
 #taskcenter-menu .collapsed .down {
-       background-image:url(../../t3skin/icons/gfx/pil2right.gif);
+       background-image: url(../../t3skin/icons/gfx/pil2right.gif);
 }
 
 #taskcenter-menu .drag {
-       float:right;
-       height:23px;
-       width:24px;
+       float: right;
+       height: 23px;
+       width: 24px;
 }
 
 #taskcenter-menu .drag img {
-       margin-top:6px;
-       cursor:move;
+       margin-top: 6px;
+       cursor: move;
 }
 
 
@@ -100,7 +99,10 @@ body#ext-taskcenter-task-index-php h3 {
        border-width: 1px 1px 0;
        line-height: 18px;
        display: block;
-       background: #585858;
+}
+
+#taskcenter-menu .t3-row-header a{
+       float: none;
 }
 
 #taskcenter-menu .link a {
@@ -110,41 +112,41 @@ body#ext-taskcenter-task-index-php h3 {
 }
 
 #taskcenter-menu .active-task .link a {
-       font-weight:bold;
+       font-weight: bold;
 }
 
 #taskcenter-menu .content {
-       padding:5px 0;
-       background:#fff;
-       border: 1px solid #adadad;
+       padding: 5px 0;
+       background: #fff;
+       border: 1px solid #b7bec9;
 }
 
 #taskcenter-menu .content p {
-       padding:3px 5px 5px 5px;
-       margin:0;
+       padding: 3px 5px 5px 5px;
+       margin: 0;
 }
 
 #taskcenter-menu .content ul, #taskcenter-menu .content ul li {
-       border:0;
+       border: 0;
 }
 
 
 #taskcenter-menu .content ul li a {
-       display:block;
-       line-height:16px;
-       margin:0;
-       padding:2px 24px;
-       background:url(list-item.gif) no-repeat 10px 6px;
+       display: block;
+       line-height: 16px;
+       margin: 0;
+       padding: 2px 24px;
+       background: url(list-item.gif) no-repeat 10px 6px;
 }
 
 #taskcenter-menu .content ul li.active {
-       background-color: #DADADA;
+       background-color: #dadada;
 }
 
 #taskcenter-menu .content ul li.active a {
        color: #000000;
        font-weight: bold;
-       background-image:url(list-item-act.gif);
+       background-image: url(list-item-act.gif);
 }
 
 
@@ -152,21 +154,21 @@ body#ext-taskcenter-task-index-php h3 {
 /* ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- */
 /* content section */
 #taskcenter-item ul {
-       padding:5px 0 5px 5px;
-       margin:0;
-       list-style:none;
+       padding: 5px 0 5px 5px;
+       margin: 0;
+       list-style: none;
 }
 
 #taskcenter-item ul li {
-       padding:5px 0 0 12px;
+       padding: 5px 0 0 12px;
 }
 
 #taskcenter-item ul.withicons li {
-       background:url(list-item.gif) no-repeat 0 7px;
+       background: url(list-item.gif) no-repeat 0 7px;
 }
 
 #taskcenter-item ul .image {
-       float:left;
+       float: left;
        width: 20px;
 }
 
@@ -176,61 +178,60 @@ body#ext-taskcenter-task-index-php h3 {
 }
 
 #taskcenter-item ul .link a {
-       padding:5px;
+       padding: 5px;
 }
 
-#taskcenter-item ul .link a:hover {
-       text-decoration:underline;
+#taskcenter-item ul .link a: hover {
+       text-decoration: underline;
 }
 
 #taskcenter-item ul .content {
-       padding:2px 0 0 25px;
+       padding: 2px 0 0 25px;
 }
 
 #taskcenter-item ul .content .edit {
-       display:block;
-       margin-top:2px;
+       display: block;
+       margin-top: 2px;
 }
 
 
 /* ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- */
 /* forms */
 #taskcenter-item fieldset.fields legend {
-       font-weight:bold;
-       border-bottom:1px solid #ccc;
-       width:100%;
-       padding:0 0 2px 20px;
+       font-weight: bold;
+       border-bottom: 1px solid #ccc;
+       width: 100%;
+       padding: 0 0 2px 20px;
 }
 
 #taskcenter-item fieldset.fields {
-       border:0;
+       border: 0;
 }
 
 #taskcenter-item fieldset.fields .row {
-       width:350px;
-       clear:both;
-       padding:5px 0;
+       width: 350px;
+       clear: both;
+       padding: 5px 0;
 }
 
 #taskcenter-item fieldset.fields label {
-       width:120px;
-       display:block;
-       float:left;
+       width: 120px;
+       display: block;
+       float: left;
 }
 
 #taskcenter-item fieldset.fields input, #taskcenter-item fieldset.fields select {
-       /*margin-left:140px;*/
-       width:160px;
-       float:left;
+       width: 160px;
+       float: left;
        border: 1px solid #ccc;
-       padding:2px 3px;
+       padding: 2px 3px;
 }
 
 #taskcenter-item fieldset.fields select {
-       width:170px;
+       width: 170px;
 }
 
 #taskcenter-item fieldset.fields input[type=checkbox] {
-       width:16px;
-       text-align:left;
+       width: 16px;
+       text-align: left;
 }
diff --git a/typo3/sysext/taskcenter/task/class.mod_user_task.php b/typo3/sysext/taskcenter/task/class.mod_user_task.php
deleted file mode 100755 (executable)
index dc1e409..0000000
+++ /dev/null
@@ -1,211 +0,0 @@
-<?php
-/***************************************************************
-*  Copyright notice
-*
-*  (c) 1999-2010 Kasper Skaarhoj (kasperYYYY@typo3.com)
-*  All rights reserved
-*
-*  This script is part of the TYPO3 project. The TYPO3 project is
-*  free software; you can redistribute it and/or modify
-*  it under the terms of the GNU General Public License as published by
-*  the Free Software Foundation; either version 2 of the License, or
-*  (at your option) any later version.
-*
-*  The GNU General Public License can be found at
-*  http://www.gnu.org/copyleft/gpl.html.
-*  A copy is found in the textfile GPL.txt and important notices to the license
-*  from the author is found in LICENSE.txt distributed with these scripts.
-*
-*
-*  This script is distributed in the hope that it will be useful,
-*  but WITHOUT ANY WARRANTY; without even the implied warranty of
-*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-*  GNU General Public License for more details.
-*
-*  This copyright notice MUST APPEAR in all copies of the script!
-***************************************************************/
-/**
-* Module class for task module
-*
-* @author Kasper Skårhøj <kasperYYYY@typo3.com>
-* @author Christian Jul Jensen <christian(at)jul(dot)net>
-*
-* Revision for TYPO3 3.8.0 / Native Workflow System
-*/
-
-class mod_user_task extends t3lib_extobjbase {
-       var $getUserNamesFields = 'username,usergroup,usergroup_cached_list,uid,realName,email';
-       var $userGroupArray = array();
-       var $perms_clause = '';
-
-       var $backPath;
-
-       /**
-        * BE user
-        *
-        * @var t3lib_beUserAuth
-        */
-       var $BE_USER;
-
-       function JScode() {
-
-       }
-
-       /**
-        * Send an email...
-        *
-        * @param       string          $email: the email address to send to
-        * @param       string          $subject: the subject of the emil
-        * @param       string          $message: the message body of the email
-        * @return      void
-        */
-       function sendEmail($recipient, $subject, $message) {
-               $message .= '
-
-                               --------
-                               '.sprintf($GLOBALS['LANG']->getLL('messages_emailFooter'), $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'], t3lib_div::getIndpEnv('HTTP_HOST'));
-
-               $email = t3lib_div::makeInstance('t3lib_htmlmail');
-               $email->start();
-               $email->useBase64();
-               $email->subject = $GLOBALS['TYPO3_CONF_VARS']['BE']['notificationPrefix'].' '.$subject;
-               $email->from_email = $this->BE_USER->user['email'];
-               $email->from_name = $this->BE_USER->user['realName'];
-               $email->addPlain($message);
-               $email->setHTML($email->encodeMsg($message));
-               $email->setHeaders();
-               $email->setContent();
-               $email->recipient = $recipient;
-               $email->sendTheMail();
-       }
-
-       /**
-        * Initialise the object
-        *
-        * @param       object          $BE_USER: instance of t3lib_beuserauth representing the current be user.
-        * @return      void
-        */
-       function mod_user_task_init($BE_USER) {
-               $this->BE_USER = $BE_USER;
-               $this->perms_clause = $this->BE_USER->getPagePermsClause(1);
-       }
-
-       /**
-        * Return helpbubble image
-        *
-        * @return      string          image tag (HTML)
-        */
-       function helpBubble() {
-               return '<img src="'.$this->backPath.'gfx/helpbubble.gif" width="14" height="14" hspace=2 align=top'.$GLOBALS['SOBE']->doc->helpStyle().'>';
-       }
-
-
-       /**
-        * Create a link to the module with the name of the module as link text.
-        *
-        * @param       string          $key: the classname of the module
-        * @param       bool            $dontLink: Just return the name of the module without a link.
-        * @param       stting          $params: HTTP GET parameter string to add to the link (not used if dontLink true)
-        * @return      string          link (HTML) / name of module (regular string)
-        */
-       function headLink($key, $dontLink = false, $params = '') {
-               $str = $GLOBALS['SOBE']->MOD_MENU['function'][$key];
-               if (!$dontLink) $str = '<a href="index.php?SET[function]='.$key.$params.'" onClick="this.blur();">'.htmlspecialchars($str).'</a>';
-               return $str;
-       }
-
-       /**
-        * Return a string cropped to a fixed length according to system setting or parameter
-        *
-        * @param       string          $str: string to be cropped.
-        * @param       int             $len: length of the cropped string, system settings is used if none is given
-        * @return      string          cropped string
-        */
-       function fixed_lgd($str, $len = 0) {
-               return t3lib_div::fixed_lgd_cs($str, $len?$len:$this->BE_USER->uc['titleLen']);
-       }
-
-       /**
-        * Return an error icon
-        *
-        * @return      string          Image tag (HTML)
-        */
-       function errorIcon() {
-               return '<img src="'.$this->backPath.'gfx/icon_fatalerror.gif" width="18" height="16" align=top>';
-       }
-
-       /**
-        * [Describe function...]
-        *
-        * @return      array           ...
-        */
-       function getUserAndGroupArrays() {
-               // Get groupnames for todo-tasks
-               $be_group_Array = t3lib_BEfunc::getListGroupNames('title,uid');
-               $groupArray = array_keys($be_group_Array);
-               // Usernames
-               $be_user_Array = $be_user_Array_o = t3lib_BEfunc::getUserNames($this->getUserNamesFields);
-               if (!$GLOBALS['BE_USER']->isAdmin()) $be_user_Array = t3lib_BEfunc::blindUserNames($be_user_Array, $groupArray, 1);
-
-               $this->userGroupArray = array($be_user_Array, $be_group_Array, $be_user_Array_o);
-               return $this->userGroupArray;
-       }
-
-       /**
-        * [Describe function...]
-        *
-        * @param       [type]          $tstamp: ...
-        * @param       [type]          $prefix: ...
-        * @return      [type]          ...
-        */
-       function dateTimeAge($tstamp, $prefix = 1) {
-               return t3lib_BEfunc::dateTimeAge($tstamp, $prefix);
-       }
-
-       /**
-        * [Describe function...]
-        *
-        * @param       [type]          $mod: ...
-        * @return      [type]          ...
-        */
-       function accessMod($mod) {
-               return $this->BE_USER->modAccess(array('name' => $mod, 'access' => 'user,group'), 0);
-       }
-
-       /**
-        * Create configuration for entry in the left tab menu.
-        *
-        * @param       string          $htmlContent: Content that does not get escaped, use this for icons links etc. (HTML)
-        * @param       string          $label: bTitle of the tab, escaped for HTML, dispalyed after html content.
-        * @param       string          $content: html content that gets displayed when the tab is activated. (HTML)
-        * @param       string          $popUpDescription: alt-text for the tab text
-        * @return      array           proper configuration for the tab menu.
-        */
-       function mkMenuConfig($htmlContent, $label = "", $content = "", $popUpDescription = '') {
-               $configArr = Array();
-               if ((string) $htmlContent) $configArr['icon'] = $htmlContent;
-               if ((string) $label) $configArr['label'] = $label;
-               if ((string) $content) $configArr['content'] = $content;
-               if ((string) $linkTitle) $configArr['linkTitle'] = $linkTitle;
-               return $configArr;
-       }
-
-       /**
-        * Returns HTML code to dislay an url in an iframe with the right side of the taskcenter
-        *
-        * @param       string          $url: url to display
-        * @param       [type]          $max: ...
-        * @return      string          code that inserts the iframe (HTML)
-        */
-       function urlInIframe($url,$max=0) {
-               return '<iframe onload="resizeIframe(this,'.$max.');" scrolling="auto" width="100%" src="'.$url.'" name="list_frame" id="list_frame" frameborder="no" style="border: none;"></iframe>';
-       }
-
-
-}
-
-if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/taskcenter/task/class.mod_user_task.php']) {
-       include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/taskcenter/task/class.mod_user_task.php']);
-}
-
-?>
index dce393b..f424bec 100755 (executable)
@@ -73,11 +73,11 @@ class SC_mod_user_task_index extends t3lib_SCbase {
         * @return      void
         */
        public function menuConfig() {
-               $this->MOD_MENU   = array('mode' => array());
+               $this->MOD_MENU  = array('mode' => array());
 
                $this->MOD_MENU['mode']['information'] = $GLOBALS['LANG']->sL('LLL:EXT:taskcenter/locallang.xml:task_overview');
                $this->MOD_MENU['mode']['tasks'] = 'Tasks';
-               
+
                parent::menuConfig();
        }
 
@@ -91,88 +91,74 @@ class SC_mod_user_task_index extends t3lib_SCbase {
                $docHeaderButtons = $this->getButtons();
                $markers = array();
 
-                       // Access check! @todo: need access check?
-               if ($GLOBALS['BE_USER']->user['admin'] || 1==1) {
+               $this->doc->JScodeArray[] = '
+                       script_ended = 0;
+                       function jumpToUrl(URL) {
+                               document.location = URL;
+                       }
 
-                       $this->doc->JScodeArray[] = '
-                               script_ended = 0;
-                               function jumpToUrl(URL) {
-                                       document.location = URL;
-                               }
+                       Event.observe(document, "dom:loaded", function(){
+                               var changeEffect;
+                               Sortable.create("task-list", { handles:$$("#task-list .drag"), tag: "li", ghosting:false, overlap:"vertical", constraint:false,
+                                onChange: function(item) {
+                                        var list = Sortable.options(item).element;
+                                        // deactivate link
+                                       $$("#task-list a").each(function(link) {
+                                               link.writeAttribute("onclick","return false;");
+                                       });
+
+                                },
 
-                               Event.observe(document, "dom:loaded", function(){
-                                       var changeEffect;
-                                       Sortable.create("task-list", { handles:$$("#task-list .drag"), tag: "li", ghosting:false, overlap:"vertical", constraint:false,
-                                        onChange: function(item) {
-                                                var list = Sortable.options(item).element;
-                                                // deactivate link
+                                onUpdate: function(list) {
+                                        new Ajax.Request("ajax.php", {
+                                                method: "post",
+                                                parameters: { ajaxID :"Taskcenter::saveSortingState", data:  Sortable.serialize(list)}
+                                        });
+                                               // activate link
+                                        Event.observe(window,"mouseup",function(){
                                                $$("#task-list a").each(function(link) {
-                                                       link.writeAttribute("onclick","return false;");
+                                                       link.writeAttribute("onclick","");
                                                });
+                                       });
 
-                                        },
-
-                                        onUpdate: function(list) {
-                                                new Ajax.Request("ajax.php", {
-                                                        method: "post",
-                                                        parameters: { ajaxID :"Taskcenter::saveSortingState", data:  Sortable.serialize(list)}
-                                                });
-                                                       // activate link
-                                                Event.observe(window,"mouseup",function(){
-                                                       $$("#task-list a").each(function(link) {
-                                                               link.writeAttribute("onclick","");
-                                                       });
-                                               });
+                                }
+                               });
 
-                                        }
-                                       });
+                               $$("#taskcenter-menu .down").invoke("observe", "click", function(event){
+                                       var item = Event.element(event);
+                                       var itemParent = item.up();
+                                       item = item.next("div").next("div").next("div").next("div");
 
-                                       $$("#taskcenter-menu .down").invoke("observe", "click", function(event){
-                                               var item = Event.element(event);
-                                               var itemParent = item.up();
-                                               item = item.next("div").next("div").next("div").next("div");
-
-                                               if (itemParent.hasClassName("expanded")) {
-                                                       itemParent.removeClassName("expanded").addClassName("collapsed");
-                                                       Effect.BlindUp(item, {duration : 0.5});
-                                                       state = 1;
-                                               } else {
-                                                       itemParent.removeClassName("collapsed").addClassName("expanded");
-                                                       Effect.BlindDown(item, {duration : 0.5});
-                                                       state = 0;
-                                               }
-                                               new Ajax.Request("ajax.php", {
-                                                       parameters : "ajaxID=Taskcenter::saveCollapseState&item=" + itemParent.id + "&state=" + state
-                                               });
+                                       if (itemParent.hasClassName("expanded")) {
+                                               itemParent.removeClassName("expanded").addClassName("collapsed");
+                                               Effect.BlindUp(item, {duration : 0.5});
+                                               state = 1;
+                                       } else {
+                                               itemParent.removeClassName("collapsed").addClassName("expanded");
+                                               Effect.BlindDown(item, {duration : 0.5});
+                                               state = 0;
+                                       }
+                                       new Ajax.Request("ajax.php", {
+                                               parameters : "ajaxID=Taskcenter::saveCollapseState&item=" + itemParent.id + "&state=" + state
                                        });
                                });
-                       ';
-                       $this->doc->postCode='
-                               <script language="javascript" type="text/javascript">
-                                       script_ended = 1;
-                                       if (top.fsMod) {
-                                               top.fsMod.recentIds["web"] = 0;
-                                       }
-                               </script>
-                       ';
-
-                               // Render content depending on the mode
-                       $mode = (string)$this->MOD_SETTINGS['mode'];
-                       if ($mode == 'information') {
-                               $this->renderInformationContent();
-                       } else {
-                               $this->renderModuleContent();
-                       }
+                       });
+               ';
+               $this->doc->postCode='
+                       <script language="javascript" type="text/javascript">
+                               script_ended = 1;
+                               if (top.fsMod) {
+                                       top.fsMod.recentIds["web"] = 0;
+                               }
+                       </script>
+               ';
 
-                       
+                       // Render content depending on the mode
+               $mode = (string)$this->MOD_SETTINGS['mode'];
+               if ($mode == 'information') {
+                       $this->renderInformationContent();
                } else {
-                       $flashMessage = t3lib_div::makeInstance(
-                               't3lib_FlashMessage',
-                               $GLOBALS['LANG']->getLL('error-access', true),
-                               $GLOBALS['LANG']->getLL('error_header'),
-                               t3lib_FlashMessage::ERROR
-                       );
-                       $this->content.= $flashMessage->render();
+                       $this->renderModuleContent();
                }
 
                        // compile document
@@ -215,17 +201,15 @@ class SC_mod_user_task_index extends t3lib_SCbase {
                }
 
                        // remder the task
-               list($extKey, $taskName) = explode('.', $chosenTask, 2);
-
-               $taskClass = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['taskcenter'][$extKey][$taskName]['task'];
-               $title     = $GLOBALS['LANG']->sL($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['taskcenter'][$extKey][$taskName]['title']);
+               list($extKey, $taskClass) = explode('.', $chosenTask, 2);
+               $title = $GLOBALS['LANG']->sL($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['taskcenter'][$extKey][$taskClass]['title']);
 
                if (class_exists($taskClass)) {
                        $taskInstance = t3lib_div::makeInstance($taskClass, $this);
 
                        if ($taskInstance instanceof tx_taskcenter_Task) {
                                        // check if the task is restricted to admins only
-                               if ($this->checkAccess($extKey, $taskName)) {
+                               if ($this->checkAccess($extKey, $taskClass)) {
                                        $actionContent .= $taskInstance->getTask();
                                } else {
                                        $flashMessage = t3lib_div::makeInstance(
@@ -246,11 +230,19 @@ class SC_mod_user_task_index extends t3lib_SCbase {
                                );
                                $actionContent .= $flashMessage->render();
                        }
+               } else {
+                       $flashMessage = t3lib_div::makeInstance(
+                               't3lib_FlashMessage',
+                               $GLOBALS['LANG']->sL('LLL:EXT:taskcenter/task/locallang_mod.xml:mlang_labels_tabdescr'),
+                               $GLOBALS['LANG']->sL('LLL:EXT:taskcenter/task/locallang_mod.xml:mlang_tabs_tab'),
+                               t3lib_FlashMessage::INFO
+                       );
+                       $actionContent .= $flashMessage->render();
                }
 
                $content = '<div id="taskcenter-main">
                                                <div id="taskcenter-menu">' . $this->indexAction() . '</div>
-                                               <div id="taskcenter-item" class="' . $extKey . '-' . $taskName . '">' .
+                                               <div id="taskcenter-item" class="' . $extKey . '-' . $taskClass . '">' .
                                                        $actionContent . '
                                                </div>
                                        </div>';
@@ -277,7 +269,7 @@ class SC_mod_user_task_index extends t3lib_SCbase {
                                $GLOBALS['LANG']->getLL('taskcenter-admin')
                        );
                }
-               
+
                $this->content .= $content;
        }
 
@@ -309,11 +301,11 @@ class SC_mod_user_task_index extends t3lib_SCbase {
         *                                                                                      description
         *
         * @param       array           $items: List of items to be displayed in the definition list.
-        * @param       boolean         $mainMenu: Set it to true to render the main menu
+        * @param       boolean         $mainMenu: Set it to TRUE to render the main menu
         * @return      string  definition list
         */
-       public function renderListMenu($items, $mainMenu=FALSE) {
-               $content = '';
+       public function renderListMenu($items, $mainMenu = FALSE) {
+               $content = $section = '';
                $count = 0;
 
                        // change the sorting of items to the user's one
@@ -376,27 +368,27 @@ class SC_mod_user_task_index extends t3lib_SCbase {
                                        // active menu item
                                $active = ((string) $this->MOD_SETTINGS['function'] == $item['uid']) ? ' active-task' : '';
 
+                                       // Main menu: Render additional syntax to sort tasks
                                if ($mainMenu) {
+                                       $dragIcon = '<img' . t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], 'gfx/move.gif', 'width="16" height="16" hspace="2"') . ' title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.move', 1) . '" alt="" />';
                                        $section = '<div class="down">&nbsp;</div>
-                                                                                       <div class="image">' . $icon . '</div>
-                                                                                       <div class="drag">
-                                                                                               <img' . t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], 'gfx/move.gif', 'width="16" height="16" hspace="2"') . ' title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.move', 1) . '" alt="" />
-                                                                                       </div>';
+                                                               <div class="drag">' . $dragIcon . '</div>';
+                                       $backgroundClass = 't3-row-header ';
                                }
 
                                $content .= '<li class="' . $additionalClass . $active . '" id="el_' .$id . '">
                                                                ' . $section . '
-                                                               <div class="link"><a href="' . $item['link'] . '">' . $title . '</a></div>
-                                                               
+                                                               <div class="image">' . $icon . '</div>
+                                                               <div class="' . $backgroundClass . 'link"><a href="' . $item['link'] . '">' . $title . '</a></div>
                                                                <div class="content " ' . $collapsedStyle . '>' . $description . '</div>
                                                        </li>';
 
                                $count++;
                        }
 
-                       $navId = ($mainMenu) ? 'id="task-list"' : '';
+                       $navigationId = ($mainMenu) ? 'id="task-list"' : '';
 
-                       $content = '<ul ' . $navId . ' class="task-list">' . $content . '</ul>';
+                       $content = '<ul ' . $navigationId . ' class="task-list">' . $content . '</ul>';
 
                }
 
@@ -409,39 +401,42 @@ class SC_mod_user_task_index extends t3lib_SCbase {
         * @return      string  list of available reports
         */
        protected function indexAction() {
-               $icon = t3lib_extMgm::extRelPath('taskcenter') . 'task/task.gif';
+               $content = '';
                $tasks = array();
-               
+               $icon = t3lib_extMgm::extRelPath('taskcenter') . 'task/task.gif';
+
                        // render the tasks only if there are any available
                if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['taskcenter']) && count($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['taskcenter']) > 0) {
                        foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['taskcenter'] as $extKey => $extensionReports) {
-                               foreach ($extensionReports as $taskName => $task) {
-                                       if (!$this->checkAccess($extKey, $taskName)) {
+                               foreach ($extensionReports as $taskClass => $task) {
+                                       if (!$this->checkAccess($extKey, $taskClass)) {
                                                continue;
                                        }
-                                       $link = 'mod.php?M=user_task&SET[function]=' . $extKey . '.' . $taskName;
+                                       $link = 'mod.php?M=user_task&SET[function]=' . $extKey . '.' . $taskClass;
                                        $taskTitle = $GLOBALS['LANG']->sL($task['title']);
                                        $taskDescriptionHtml = '';
-       
+
                                                // Check for custom icon
                                        if (!empty($task['icon'])) {
                                                $icon = t3lib_div::getFileAbsFilename($task['icon']);
                                        }
-       
-                                       $taskInstance = t3lib_div::makeInstance($task['task'], $this);
-                                       if ($taskInstance instanceof tx_taskcenter_Task) {
-                                               $taskDescriptionHtml = $taskInstance->getOverview();
+
+                                       if (class_exists($taskClass)) {
+                                               $taskInstance = t3lib_div::makeInstance($taskClass, $this);
+                                               if ($taskInstance instanceof tx_taskcenter_Task) {
+                                                       $taskDescriptionHtml = $taskInstance->getOverview();
+                                               }
                                        }
-       
-       
-                                       $uniqueKey = $this->getUniqueKey($extKey . '.' . $taskName);
+
+                                               // generate an array of all tasks
+                                       $uniqueKey = $this->getUniqueKey($extKey . '.' . $taskClass);
                                        $tasks[$uniqueKey] = array(
                                                'title'                         => $taskTitle,
                                                'descriptionHtml'       => $taskDescriptionHtml,
                                                'description'           => $GLOBALS['LANG']->sL($task['description']),
                                                'icon'                          => $icon,
                                                'link'                          => $link,
-                                               'uid'                           => $extKey . '.' . $taskName
+                                               'uid'                           => $extKey . '.' . $taskClass
                                        );
                                }
                        }
@@ -454,8 +449,7 @@ class SC_mod_user_task_index extends t3lib_SCbase {
                                '',
                                t3lib_FlashMessage::INFO
                        );
-                       $this->content.= $flashMessage->render();
-               
+                       $this->content .= $flashMessage->render();
                }
 
                return $content;
@@ -489,15 +483,15 @@ class SC_mod_user_task_index extends t3lib_SCbase {
         *  - Tasks can be blinded for Users with TsConfig taskcenter.<extensionkey>.<taskName> = 0
         *
         * @param       string          $extKey: Extension key
-        * @param       string          $taskName: Name of the task
+        * @param       string          $taskClass: Name of the task
         * @return boolean              Access to the task allowed or not
         */
-       protected function checkAccess($extKey, $taskName) {
+       protected function checkAccess($extKey, $taskClass) {
                        // check if task is blinded with TsConfig (taskcenter.<extkey>.<taskName>
-               $tsConfig = $GLOBALS['BE_USER']->getTSConfig('taskcenter.' . $extKey . '.' . $taskName);
+               $tsConfig = $GLOBALS['BE_USER']->getTSConfig('taskcenter.' . $extKey . '.' . $taskClass);
                if (isset($tsConfig['value']) && intval($tsConfig['value']) == 0) {
                        return FALSE;
-               } 
+               }
 
                // admins are always allowed
                if ($GLOBALS['BE_USER']->isAdmin()) {
@@ -505,10 +499,11 @@ class SC_mod_user_task_index extends t3lib_SCbase {
                }
 
                        // check if task is restricted to admins
-               if (intval($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['taskcenter'][$extKey][$taskName]['admin']) == 1) {
+               if (intval($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['taskcenter'][$extKey][$taskClass]['admin']) == 1) {
                        return FALSE;
                }
 
+               return FALSE;
        }
 
        /**
@@ -574,9 +569,9 @@ if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/taskcen
 
 
 
-// Make instance:
+       // Make instance:
 $SOBE = t3lib_div::makeInstance('SC_mod_user_task_index');
-// Include files?
+       // Include files?
 foreach($SOBE->include_once as $INC_FILE) {
        include_once($INC_FILE);
 }
index 3cb11c7..742f0be 100755 (executable)
@@ -39,7 +39,7 @@
                                ]]>
                        </label>
                        <label index="taskcenter-adminheader">Create a task</label>
-                       <label index="taskcenter-admin">It is very to extend the taskcenter by a custom task. For more information please look into the manual of the extension 'taskcenter'.</label>
+                       <label index="taskcenter-admin">It is simple to extend the taskcenter by a custom task. For more information please look into the manual of the extension 'taskcenter'.</label>