[CLEANUP] Cleanup jumpToUrl() and unused JS in Backend
[Packages/TYPO3.CMS.git] / typo3 / sysext / sys_action / Classes / ActionTask.php
index be4e9e4..2bfac5d 100644 (file)
@@ -4,8 +4,8 @@ namespace TYPO3\CMS\SysAction;
 /***************************************************************
  *  Copyright notice
  *
- *  (c) 1999-2011 Kasper Skårhøj (kasperYYYY@typo3.com)
- *  (c) 2010-2011 Georg Ringer <typo3@ringerge.org>
+ *  (c) 1999-2013 Kasper Skårhøj (kasperYYYY@typo3.com)
+ *  (c) 2010-2013 Georg Ringer <typo3@ringerge.org>
  *  All rights reserved
  *
  *  This script is part of the TYPO3 project. The TYPO3 project is
@@ -24,6 +24,10 @@ namespace TYPO3\CMS\SysAction;
  *
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
+
+use TYPO3\CMS\Core\Utility\GeneralUtility;
+use TYPO3\CMS\Backend\Utility\BackendUtility;
+
 /**
  * This class provides a task for the taskcenter
  *
@@ -32,9 +36,13 @@ namespace TYPO3\CMS\SysAction;
  */
 class ActionTask implements \TYPO3\CMS\Taskcenter\TaskInterface {
 
+       /**
+        * @var \TYPO3\CMS\Taskcenter\Controller\TaskModuleController
+        */
        protected $taskObject;
 
        /**
+        * @var \TYPO3\CMS\Backend\Form\FormEngine
         * @todo Define visibility
         */
        public $t3lib_TCEforms;
@@ -47,14 +55,22 @@ class ActionTask implements \TYPO3\CMS\Taskcenter\TaskInterface {
        protected $hookObjects = array();
 
        /**
+        * URL to task module
+        *
+        * @var string
+        */
+       protected $moduleUrl;
+
+       /**
         * Constructor
         */
        public function __construct(\TYPO3\CMS\Taskcenter\Controller\TaskModuleController $taskObject) {
+               $this->moduleUrl = BackendUtility::getModuleUrl('user_task');
                $this->taskObject = $taskObject;
-               $GLOBALS['LANG']->includeLLFile('EXT:sys_action/locallang.xml');
+               $GLOBALS['LANG']->includeLLFile('EXT:sys_action/locallang.xlf');
                if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['sys_action']['tx_sysaction_task'])) {
                        foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['sys_action']['tx_sysaction_task'] as $classRef) {
-                               $this->hookObjects[] = \TYPO3\CMS\Core\Utility\GeneralUtility::getUserObj($classRef);
+                               $this->hookObjects[] = GeneralUtility::getUserObj($classRef);
                        }
                }
        }
@@ -66,7 +82,7 @@ class ActionTask implements \TYPO3\CMS\Taskcenter\TaskInterface {
         */
        public function getTask() {
                $content = '';
-               $show = intval(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('show'));
+               $show = (int)GeneralUtility::_GP('show');
                foreach ($this->hookObjects as $hookObject) {
                        if (method_exists($hookObject, 'getTask')) {
                                $show = $hookObject->getTask($show, $this);
@@ -77,34 +93,39 @@ class ActionTask implements \TYPO3\CMS\Taskcenter\TaskInterface {
                        $content .= $this->taskObject->description($GLOBALS['LANG']->getLL('sys_action'), $GLOBALS['LANG']->getLL('description'));
                        $content .= $this->renderActionList();
                } else {
-                       $record = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord('sys_action', $show);
+                       $record = BackendUtility::getRecord('sys_action', $show);
                        // If the action is not found
                        if (count($record) == 0) {
-                               $flashMessage = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', $GLOBALS['LANG']->getLL('action_error-not-found', TRUE), $GLOBALS['LANG']->getLL('action_error'), \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR);
+                               $flashMessage = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', $GLOBALS['LANG']->getLL('action_error-not-found', TRUE), $GLOBALS['LANG']->getLL('action_error'), \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR);
                                $content .= $flashMessage->render();
                        } else {
                                // Render the task
                                $content .= $this->taskObject->description($record['title'], $record['description']);
                                // Output depends on the type
                                switch ($record['type']) {
-                               case 1:
-                                       $content .= $this->viewNewBackendUser($record);
-                                       break;
-                               case 2:
-                                       $content .= $this->viewSqlQuery($record);
-                                       break;
-                               case 3:
-                                       $content .= $this->viewRecordList($record);
-                                       break;
-                               case 4:
-                                       $content .= $this->viewEditRecord($record);
-                                       break;
-                               case 5:
-                                       $content .= $this->viewNewRecord($record);
-                                       break;
-                               default:
-                                       $flashMessage = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', $GLOBALS['LANG']->getLL('action_noType', TRUE), $GLOBALS['LANG']->getLL('action_error'), \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR);
-                                       $content .= '<br />' . $flashMessage->render();
+                                       case 1:
+                                               $content .= $this->viewNewBackendUser($record);
+                                               break;
+                                       case 2:
+                                               $content .= $this->viewSqlQuery($record);
+                                               break;
+                                       case 3:
+                                               $content .= $this->viewRecordList($record);
+                                               break;
+                                       case 4:
+                                               $content .= $this->viewEditRecord($record);
+                                               break;
+                                       case 5:
+                                               $content .= $this->viewNewRecord($record);
+                                               break;
+                                       default:
+                                               $flashMessage = GeneralUtility::makeInstance(
+                                                       'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
+                                                       $GLOBALS['LANG']->getLL('action_noType', TRUE),
+                                                       $GLOBALS['LANG']->getLL('action_error'),
+                                                       \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR
+                                               );
+                                               $content .= '<br />' . $flashMessage->render();
                                }
                        }
                }
@@ -112,7 +133,7 @@ class ActionTask implements \TYPO3\CMS\Taskcenter\TaskInterface {
        }
 
        /**
-        * Gemeral overview over the task in the taskcenter menu
+        * General overview over the task in the taskcenter menu
         *
         * @return string Overview as HTML
         */
@@ -124,7 +145,7 @@ class ActionTask implements \TYPO3\CMS\Taskcenter\TaskInterface {
                        $items = '';
                        // Render a single action menu item
                        foreach ($actionList as $action) {
-                               $active = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('show') === $action['uid'] ? ' class="active" ' : '';
+                               $active = GeneralUtility::_GP('show') === $action['uid'] ? ' class="active" ' : '';
                                $items .= '<li' . $active . '>
                                                                <a href="' . $action['link'] . '" title="' . htmlspecialchars($action['description']) . '">' . htmlspecialchars($action['title']) . '</a>
                                                        </li>';
@@ -136,7 +157,7 @@ class ActionTask implements \TYPO3\CMS\Taskcenter\TaskInterface {
 
        /**
         * Get all actions of an user. Admins can see any action, all others only those
-        * whic are allowed in sys_action record itself.
+        * which are allowed in sys_action record itself.
         *
         * @return array Array holding every needed information of a sys_action
         */
@@ -147,15 +168,15 @@ class ActionTask implements \TYPO3\CMS\Taskcenter\TaskInterface {
                        $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'sys_action', '', '', 'sys_action.sorting');
                } else {
                        // Editors can only see the actions which are assigned to a usergroup they belong to
-                       $additionalWhere = 'be_groups.uid IN (' . ($GLOBALS['BE_USER']->groupList ? $GLOBALS['BE_USER']->groupList : 0) . ')';
+                       $additionalWhere = 'be_groups.uid IN (' . ($GLOBALS['BE_USER']->groupList ?: 0) . ')';
                        $res = $GLOBALS['TYPO3_DB']->exec_SELECT_mm_query('sys_action.*', 'sys_action', 'sys_action_asgr_mm', 'be_groups', ' AND sys_action.hidden=0 AND ' . $additionalWhere, 'sys_action.uid', 'sys_action.sorting');
                }
                while ($actionRow = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
                        $editActionLink = '';
                        // Admins are allowed to edit sys_action records
                        if ($GLOBALS['BE_USER']->isAdmin()) {
-                               $returnUrl = rawurlencode(\TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REQUEST_URI'));
-                               $link = \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_REQUEST_DIR') . $GLOBALS['BACK_PATH'] . 'alt_doc.php?returnUrl=' . $returnUrl . '&edit[sys_action][' . $actionRow['uid'] . ']=edit';
+                               $returnUrl = rawurlencode(GeneralUtility::getIndpEnv('REQUEST_URI'));
+                               $link = GeneralUtility::getIndpEnv('TYPO3_REQUEST_DIR') . $GLOBALS['BACK_PATH'] . 'alt_doc.php?returnUrl=' . $returnUrl . '&edit[sys_action][' . $actionRow['uid'] . ']=edit';
                                $editActionLink = '<a class="edit" href="' . $link . '">' . '<img class="icon"' . \TYPO3\CMS\Backend\Utility\IconUtility::skinImg($GLOBALS['BACK_PATH'], 'gfx/edit2.gif') . ' title="' . $GLOBALS['LANG']->getLL('edit-sys_action') . '" alt="" />' . $GLOBALS['LANG']->getLL('edit-sys_action') . '</a>';
                        }
                        $actionList[] = array(
@@ -163,7 +184,7 @@ class ActionTask implements \TYPO3\CMS\Taskcenter\TaskInterface {
                                'title' => $actionRow['title'],
                                'description' => $actionRow['description'],
                                'descriptionHtml' => nl2br(htmlspecialchars($actionRow['description'])) . $editActionLink,
-                               'link' => 'mod.php?M=user_task&SET[function]=sys_action.tx_sysaction_task&show=' . $actionRow['uid'],
+                               'link' => $this->moduleUrl . '&SET[function]=sys_action.tx_sysaction_task&show=' . $actionRow['uid'],
                                'icon' => 'EXT:sys_action/sys_action.gif'
                        );
                }
@@ -184,13 +205,13 @@ class ActionTask implements \TYPO3\CMS\Taskcenter\TaskInterface {
                if (count($actionList) > 0) {
                        $content .= $this->taskObject->renderListMenu($actionList);
                } else {
-                       $flashMessage = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', $GLOBALS['LANG']->getLL('action_not-found-description', TRUE), $GLOBALS['LANG']->getLL('action_not-found'), \TYPO3\CMS\Core\Messaging\FlashMessage::INFO);
+                       $flashMessage = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', $GLOBALS['LANG']->getLL('action_not-found-description', TRUE), $GLOBALS['LANG']->getLL('action_not-found'), \TYPO3\CMS\Core\Messaging\FlashMessage::INFO);
                        $content .= $flashMessage->render();
                }
                // Admin users can create a new action
                if ($GLOBALS['BE_USER']->isAdmin()) {
-                       $returnUrl = rawurlencode('mod.php?M=user_task');
-                       $link = \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_REQUEST_DIR') . $GLOBALS['BACK_PATH'] . 'alt_doc.php?returnUrl=' . $returnUrl . '&edit[sys_action][0]=new';
+                       $returnUrl = rawurlencode($this->moduleUrl);
+                       $link = GeneralUtility::getIndpEnv('TYPO3_REQUEST_DIR') . $GLOBALS['BACK_PATH'] . 'alt_doc.php?returnUrl=' . $returnUrl . '&edit[sys_action][0]=new';
                        $content .= '<br />
                                                <a href="' . $link . '" title="' . $GLOBALS['LANG']->getLL('new-sys_action') . '">' . '<img class="icon"' . \TYPO3\CMS\Backend\Utility\IconUtility::skinImg($GLOBALS['BACK_PATH'], 'gfx/new_record.gif') . ' title="' . $GLOBALS['LANG']->getLL('new-sys_action') . '" alt="" /> ' . $GLOBALS['LANG']->getLL('new-sys_action') . '</a>';
                }
@@ -205,25 +226,25 @@ class ActionTask implements \TYPO3\CMS\Taskcenter\TaskInterface {
         */
        protected function viewNewBackendUser($record) {
                $content = '';
-               $beRec = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord('be_users', intval($record['t1_copy_of_user']));
-               // A record is neeed which is used as copy for the new user
+               $beRec = BackendUtility::getRecord('be_users', (int)$record['t1_copy_of_user']);
+               // A record is need which is used as copy for the new user
                if (!is_array($beRec)) {
-                       $flashMessage = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', $GLOBALS['LANG']->getLL('action_notReady', TRUE), $GLOBALS['LANG']->getLL('action_error'), \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR);
+                       $flashMessage = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', $GLOBALS['LANG']->getLL('action_notReady', TRUE), $GLOBALS['LANG']->getLL('action_error'), \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR);
                        $content .= $flashMessage->render();
                        return $content;
                }
-               $vars = \TYPO3\CMS\Core\Utility\GeneralUtility::_POST('data');
+               $vars = GeneralUtility::_POST('data');
                $key = 'NEW';
                if ($vars['sent'] == 1) {
                        $errors = array();
                        // Basic error checks
-                       if (!empty($vars['email']) && !\TYPO3\CMS\Core\Utility\GeneralUtility::validEmail($vars['email'])) {
+                       if (!empty($vars['email']) && !GeneralUtility::validEmail($vars['email'])) {
                                $errors[] = $GLOBALS['LANG']->getLL('error-wrong-email');
                        }
                        if (empty($vars['username'])) {
                                $errors[] = $GLOBALS['LANG']->getLL('error-username-empty');
                        }
-                       if (empty($vars['password'])) {
+                       if ($vars['key'] === 'NEW' && empty($vars['password'])) {
                                $errors[] = $GLOBALS['LANG']->getLL('error-password-empty');
                        }
                        if ($vars['key'] !== 'NEW' && !$this->isCreatedByUser($vars['key'], $record)) {
@@ -236,24 +257,24 @@ class ActionTask implements \TYPO3\CMS\Taskcenter\TaskInterface {
                        }
                        // Show errors if there are any
                        if (count($errors) > 0) {
-                               $flashMessage = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', implode('<br />', $errors), $GLOBALS['LANG']->getLL('action_error'), \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR);
+                               $flashMessage = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', implode('<br />', $errors), $GLOBALS['LANG']->getLL('action_error'), \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR);
                                $content .= $flashMessage->render() . '<br />';
                        } else {
                                // Save user
                                $key = $this->saveNewBackendUser($record, $vars);
-                               // Success messsage
-                               $flashMessage = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', $vars['key'] === 'NEW' ? $GLOBALS['LANG']->getLL('success-user-created') : $GLOBALS['LANG']->getLL('success-user-updated'), $GLOBALS['LANG']->getLL('success'), \TYPO3\CMS\Core\Messaging\FlashMessage::OK);
+                               // Success message
+                               $flashMessage = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', $vars['key'] === 'NEW' ? $GLOBALS['LANG']->getLL('success-user-created') : $GLOBALS['LANG']->getLL('success-user-updated'), $GLOBALS['LANG']->getLL('success'), \TYPO3\CMS\Core\Messaging\FlashMessage::OK);
                                $content .= $flashMessage->render() . '<br />';
                        }
                }
                // Load BE user to edit
-               if (intval(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('be_users_uid')) > 0) {
-                       $tmpUserId = intval(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('be_users_uid'));
+               if ((int)GeneralUtility::_GP('be_users_uid') > 0) {
+                       $tmpUserId = (int)GeneralUtility::_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 (\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('delete') == 1) {
+                               if (GeneralUtility::_GP('delete') == 1) {
                                        $this->deleteUser($tmpUserId, $record['uid']);
                                }
                                $key = $tmpUserId;
@@ -261,29 +282,29 @@ class ActionTask implements \TYPO3\CMS\Taskcenter\TaskInterface {
                        }
                }
                $this->JScode();
-               $loadDB = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Database\\RelationHandler');
+               $loadDB = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Database\\RelationHandler');
                $loadDB->start($vars['db_mountpoints'], 'pages');
                $content .= '<form action="" method="post" enctype="multipart/form-data">
                                                <fieldset class="fields">
                                                        <legend>General fields</legend>
                                                        <div class="row">
-                                                               <label for="field_disable">' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_general.xml:LGL.disable') . '</label>
+                                                               <label for="field_disable">' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_general.xlf: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="field_realname">' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_general.xml:LGL.name') . '</label>
+                                                               <label for="field_realname">' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_general.xlf:LGL.name') . '</label>
                                                                <input type="text" id="field_realname" name="data[realName]" value="' . htmlspecialchars($vars['realName']) . '" />
                                                        </div>
                                                        <div class="row">
-                                                               <label for="field_username">' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_tca.xml:be_users.username') . '</label>
+                                                               <label for="field_username">' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_tca.xlf:be_users.username') . '</label>
                                                                <input type="text" id="field_username" name="data[username]" value="' . htmlspecialchars($vars['username']) . '" />
                                                        </div>
                                                        <div class="row">
-                                                               <label for="field_password">' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_tca.xml:be_users.password') . '</label>
+                                                               <label for="field_password">' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_tca.xlf:be_users.password') . '</label>
                                                                <input type="password" id="field_password" name="data[password]" value="" />
                                                        </div>
                                                        <div class="row">
-                                                               <label for="field_email">' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_general.xml:LGL.email') . '</label>
+                                                               <label for="field_email">' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_general.xlf:LGL.email') . '</label>
                                                                <input type="text" id="field_email" name="data[email]" value="' . htmlspecialchars($vars['email']) . '" />
                                                        </div>
                                                </fieldset>
@@ -291,13 +312,13 @@ class ActionTask implements \TYPO3\CMS\Taskcenter\TaskInterface {
                                                        <legend>Configuration</legend>
 
                                                        <div class="row">
-                                                               <label for="field_usergroup">' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_tca.xml:be_users.usergroup') . '</label>
+                                                               <label for="field_usergroup">' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_tca.xlf:be_users.usergroup') . '</label>
                                                                <select id="field_usergroup" name="data[usergroup][]" multiple="multiple">
                                                                        ' . $this->getUsergroups($record, $vars) . '
                                                                </select>
                                                        </div>
                                                        <div class="row">
-                                                               <label for="field_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.xlf:be_users.options_db_mounts') . '</label>
                                                                ' . $this->t3lib_TCEforms->dbFileIcons('data[db_mountpoints]', 'db', 'pages', $loadDB->itemArray, '', array('size' => 3)) . '
                                                        </div>
                                                        <div class="row">
@@ -324,7 +345,7 @@ class ActionTask implements \TYPO3\CMS\Taskcenter\TaskInterface {
                        'tstamp' => $GLOBALS['ACCESS_TIME']
                ));
                // redirect to the original task
-               $redirectUrl = 'mod.php?M=user_task&show=' . $actionId;
+               $redirectUrl = $this->moduleUrl . '&show=' . $actionId;
                \TYPO3\CMS\Core\Utility\HttpUtility::redirect($redirectUrl);
        }
 
@@ -336,7 +357,7 @@ class ActionTask implements \TYPO3\CMS\Taskcenter\TaskInterface {
         * @return mixed The record of the BE user if found, otherwise FALSE
         */
        protected function isCreatedByUser($id, $action) {
-               $record = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord('be_users', $id, '*', ' AND cruser_id=' . $GLOBALS['BE_USER']->user['uid'] . ' AND createdByAction=' . $action['uid']);
+               $record = BackendUtility::getRecord('be_users', $id, '*', ' AND cruser_id=' . $GLOBALS['BE_USER']->user['uid'] . ' AND createdByAction=' . $action['uid']);
                if (is_array($record)) {
                        return $record;
                } else {
@@ -355,10 +376,10 @@ class ActionTask implements \TYPO3\CMS\Taskcenter\TaskInterface {
                $content = '';
                $userList = array();
                // List of users
-               $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'be_users', 'cruser_id=' . $GLOBALS['BE_USER']->user['uid'] . ' AND createdByAction=' . intval($action['uid']) . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause('be_users'), '', 'username');
+               $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'be_users', 'cruser_id=' . $GLOBALS['BE_USER']->user['uid'] . ' AND createdByAction=' . (int)$action['uid'] . BackendUtility::deleteClause('be_users'), '', 'username');
                // Render the user records
                while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
-                       $icon = \t3lib_iconworks::getSpriteIconForRecord('be_users', $row, array('title' => 'uid=' . $row['uid']));
+                       $icon = \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconForRecord('be_users', $row, array('title' => 'uid=' . $row['uid']));
                        $line = $icon . $this->action_linkUserName($row['username'], $row['realName'], $action['uid'], $row['uid']);
                        // Selected user
                        if ($row['uid'] == $selectedUser) {
@@ -388,10 +409,10 @@ class ActionTask implements \TYPO3\CMS\Taskcenter\TaskInterface {
                        $username .= ' (' . $realName . ')';
                }
                // Link to update the user record
-               $href = 'mod.php?M=user_task&SET[function]=sys_action.tx_sysaction_task&show=' . intval($sysActionUid) . '&be_users_uid=' . intval($userId);
+               $href = $this->moduleUrl . '&SET[function]=sys_action.tx_sysaction_task&show=' . (int)$sysActionUid . '&be_users_uid=' . (int)$userId;
                $link = '<a href="' . htmlspecialchars($href) . '">' . htmlspecialchars($username) . '</a>';
                // Link to delete the user record
-               $onClick = ' onClick="return confirm(' . $GLOBALS['LANG']->JScharCode($GLOBALS['LANG']->getLL('lDelete_warning')) . ');"';
+               $onClick = ' onClick="return confirm(' . GeneralUtility::quoteJSvalue($GLOBALS['LANG']->getLL('lDelete_warning')) . ');"';
                $link .= '
                                <a href="' . htmlspecialchars(($href . '&delete=1')) . '" ' . $onClick . '>
                                        <img' . \TYPO3\CMS\Backend\Utility\IconUtility::skinImg($GLOBALS['BACK_PATH'], 'gfx/delete_record.gif') . ' alt="" />
@@ -411,23 +432,24 @@ class ActionTask implements \TYPO3\CMS\Taskcenter\TaskInterface {
                $vars['db_mountpoints'] = $this->fixDbMount($vars['db_mountpoints']);
                // Check if the usergroup is allowed
                $vars['usergroup'] = $this->fixUserGroup($vars['usergroup'], $record);
+               $key = $vars['key'];
+               $vars['password'] = trim($vars['password']);
                // Check if md5 is used as password encryption
-               if (strpos($GLOBALS['TCA']['be_users']['columns']['password']['config']['eval'], 'md5') !== FALSE) {
+               if ($vars['password'] !== '' && strpos($GLOBALS['TCA']['be_users']['columns']['password']['config']['eval'], 'md5') !== FALSE) {
                        $vars['password'] = md5($vars['password']);
                }
-               $key = $vars['key'];
                $data = '';
                $newUserId = 0;
                if ($key === 'NEW') {
-                       $beRec = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord('be_users', intval($record['t1_copy_of_user']));
+                       $beRec = BackendUtility::getRecord('be_users', (int)$record['t1_copy_of_user']);
                        if (is_array($beRec)) {
                                $data = array();
                                $data['be_users'][$key] = $beRec;
                                $data['be_users'][$key]['username'] = $this->fixUsername($vars['username'], $record['t1_userprefix']);
-                               $data['be_users'][$key]['password'] = trim($vars['password']);
+                               $data['be_users'][$key]['password'] = $vars['password'];
                                $data['be_users'][$key]['realName'] = $vars['realName'];
                                $data['be_users'][$key]['email'] = $vars['email'];
-                               $data['be_users'][$key]['disable'] = intval($vars['disable']);
+                               $data['be_users'][$key]['disable'] = (int)$vars['disable'];
                                $data['be_users'][$key]['admin'] = 0;
                                $data['be_users'][$key]['usergroup'] = $vars['usergroup'];
                                $data['be_users'][$key]['db_mountpoints'] = $vars['db_mountpoints'];
@@ -435,16 +457,16 @@ class ActionTask implements \TYPO3\CMS\Taskcenter\TaskInterface {
                        }
                } else {
                        // Check ownership
-                       $beRec = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord('be_users', intval($key));
+                       $beRec = BackendUtility::getRecord('be_users', (int)$key);
                        if (is_array($beRec) && $beRec['cruser_id'] == $GLOBALS['BE_USER']->user['uid']) {
                                $data = array();
                                $data['be_users'][$key]['username'] = $this->fixUsername($vars['username'], $record['t1_userprefix']);
-                               if (trim($vars['password'])) {
-                                       $data['be_users'][$key]['password'] = trim($vars['password']);
+                               if ($vars['password'] !== '') {
+                                       $data['be_users'][$key]['password'] = $vars['password'];
                                }
                                $data['be_users'][$key]['realName'] = $vars['realName'];
                                $data['be_users'][$key]['email'] = $vars['email'];
-                               $data['be_users'][$key]['disable'] = intval($vars['disable']);
+                               $data['be_users'][$key]['disable'] = (int)$vars['disable'];
                                $data['be_users'][$key]['admin'] = 0;
                                $data['be_users'][$key]['usergroup'] = $vars['usergroup'];
                                $data['be_users'][$key]['db_mountpoints'] = $vars['db_mountpoints'];
@@ -453,18 +475,18 @@ class ActionTask implements \TYPO3\CMS\Taskcenter\TaskInterface {
                }
                // Save/update user by using TCEmain
                if (is_array($data)) {
-                       $tce = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\DataHandling\\DataHandler');
+                       $tce = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\DataHandling\\DataHandler');
                        $tce->stripslashes_values = 0;
                        $tce->start($data, array(), $GLOBALS['BE_USER']);
                        $tce->admin = 1;
                        $tce->process_datamap();
-                       $newUserId = intval($tce->substNEWwithIDs['NEW']);
+                       $newUserId = (int)$tce->substNEWwithIDs['NEW'];
                        if ($newUserId) {
                                // Create
                                $this->action_createDir($newUserId);
                        } else {
                                // Update
-                               $newUserId = intval($key);
+                               $newUserId = (int)$key;
                        }
                        unset($tce);
                }
@@ -494,7 +516,7 @@ class ActionTask implements \TYPO3\CMS\Taskcenter\TaskInterface {
                        $cleanGroupList = array();
                        // Create an array from the allowed usergroups using the uid as key
                        $allowedUsergroups = array_flip(explode(',', $actionRecord['t1_allowed_groups']));
-                       // Walk through the array and check every uid if it is undder the allowed ines
+                       // Walk through the array and check every uid if it is under the allowed ines
                        foreach ($appliedUsergroups as $group) {
                                if (isset($allowedUsergroups[$group])) {
                                        $cleanGroupList[] = $group;
@@ -515,11 +537,11 @@ class ActionTask implements \TYPO3\CMS\Taskcenter\TaskInterface {
                // Admins can see any page, no need to check there
                if (!empty($appliedDbMounts) && !$GLOBALS['BE_USER']->isAdmin()) {
                        $cleanDbMountList = array();
-                       $dbMounts = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $appliedDbMounts, 1);
+                       $dbMounts = GeneralUtility::trimExplode(',', $appliedDbMounts, TRUE);
                        // Walk through every wanted DB-Mount and check if it allowed for the current user
                        foreach ($dbMounts as $dbMount) {
-                               $uid = intval(substr($dbMount, strrpos($dbMount, '_') + 1));
-                               $page = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord('pages', $uid);
+                               $uid = (int)substr($dbMount, strrpos($dbMount, '_') + 1);
+                               $page = BackendUtility::getRecord('pages', $uid);
                                // Check rootline and access rights
                                if ($this->checkRootline($uid) && $GLOBALS['BE_USER']->calcPerms($page)) {
                                        $cleanDbMountList[] = 'pages_' . $uid;
@@ -540,7 +562,7 @@ class ActionTask implements \TYPO3\CMS\Taskcenter\TaskInterface {
        protected function checkRootline($pageId) {
                $access = FALSE;
                $dbMounts = array_flip(explode(',', trim($GLOBALS['BE_USER']->dataLists['webmount_list'], ',')));
-               $rootline = \TYPO3\CMS\Backend\Utility\BackendUtility::BEgetRootLine($pageId);
+               $rootline = BackendUtility::BEgetRootLine($pageId);
                foreach ($rootline as $page) {
                        if (isset($dbMounts[$page['uid']]) && !$access) {
                                $access = TRUE;
@@ -555,7 +577,7 @@ class ActionTask implements \TYPO3\CMS\Taskcenter\TaskInterface {
         * @return void
         */
        protected function JScode() {
-               $this->t3lib_TCEforms = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Form\\FormEngine');
+               $this->t3lib_TCEforms = GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Form\\FormEngine');
                $this->t3lib_TCEforms->backPath = $GLOBALS['BACK_PATH'];
                $js = $this->t3lib_TCEforms->dbFileCon();
                $this->taskObject->doc->JScodeArray[] = $js;
@@ -571,8 +593,8 @@ class ActionTask implements \TYPO3\CMS\Taskcenter\TaskInterface {
        protected function action_createDir($uid) {
                $path = $this->action_getUserMainDir();
                if ($path) {
-                       \TYPO3\CMS\Core\Utility\GeneralUtility::mkdir($path . $uid);
-                       \TYPO3\CMS\Core\Utility\GeneralUtility::mkdir($path . $uid . '/_temp_/');
+                       GeneralUtility::mkdir($path . $uid);
+                       GeneralUtility::mkdir($path . $uid . '/_temp_/');
                }
        }
 
@@ -584,7 +606,7 @@ class ActionTask implements \TYPO3\CMS\Taskcenter\TaskInterface {
        protected function action_getUserMainDir() {
                $path = $GLOBALS['TYPO3_CONF_VARS']['BE']['userHomePath'];
                // If path is set and a valid directory
-               if ($path && @is_dir($path) && $GLOBALS['TYPO3_CONF_VARS']['BE']['lockRootPath'] && \TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($path, $GLOBALS['TYPO3_CONF_VARS']['BE']['lockRootPath']) && substr($path, -1) == '/') {
+               if ($path && @is_dir($path) && $GLOBALS['TYPO3_CONF_VARS']['BE']['lockRootPath'] && GeneralUtility::isFirstPartOfStr($path, $GLOBALS['TYPO3_CONF_VARS']['BE']['lockRootPath']) && substr($path, -1) == '/') {
                        return $path;
                }
        }
@@ -603,11 +625,11 @@ class ActionTask implements \TYPO3\CMS\Taskcenter\TaskInterface {
                        return $content;
                }
                $content .= '<option value=""></option>';
-               $grList = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $record['t1_allowed_groups'], 1);
+               $grList = GeneralUtility::trimExplode(',', $record['t1_allowed_groups'], TRUE);
                foreach ($grList as $group) {
-                       $checkGroup = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord('be_groups', $group);
+                       $checkGroup = BackendUtility::getRecord('be_groups', $group);
                        if (is_array($checkGroup)) {
-                               $selected = \TYPO3\CMS\Core\Utility\GeneralUtility::inList($vars['usergroup'], $checkGroup['uid']) ? ' selected="selected" ' : '';
+                               $selected = GeneralUtility::inList($vars['usergroup'], $checkGroup['uid']) ? ' selected="selected" ' : '';
                                $content .= '<option ' . $selected . 'value="' . $checkGroup['uid'] . '">' . htmlspecialchars($checkGroup['title']) . '</option>';
                        }
                }
@@ -621,8 +643,8 @@ class ActionTask implements \TYPO3\CMS\Taskcenter\TaskInterface {
         * @return void Redirect to form to create a record
         */
        protected function viewNewRecord($record) {
-               $returnUrl = rawurlencode('mod.php?M=user_task');
-               $link = \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_REQUEST_DIR') . $GLOBALS['BACK_PATH'] . 'alt_doc.php?returnUrl=' . $returnUrl . '&edit[' . $record['t3_tables'] . '][' . intval($record['t3_listPid']) . ']=new';
+               $returnUrl = rawurlencode($this->moduleUrl);
+               $link = GeneralUtility::getIndpEnv('TYPO3_REQUEST_DIR') . $GLOBALS['BACK_PATH'] . 'alt_doc.php?returnUrl=' . $returnUrl . '&edit[' . $record['t3_tables'] . '][' . (int)$record['t3_listPid'] . ']=new';
                \TYPO3\CMS\Core\Utility\HttpUtility::redirect($link);
        }
 
@@ -635,26 +657,26 @@ class ActionTask implements \TYPO3\CMS\Taskcenter\TaskInterface {
        protected function viewEditRecord($record) {
                $content = '';
                $actionList = array();
-               $dbAnalysis = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Database\\RelationHandler');
-               $dbAnalysis->fromTC = 0;
+               $dbAnalysis = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Database\\RelationHandler');
+               $dbAnalysis->setFetchAllFields(TRUE);
                $dbAnalysis->start($record['t4_recordsToEdit'], '*');
                $dbAnalysis->getFromDB();
                // collect the records
                foreach ($dbAnalysis->itemArray as $el) {
-                       $path = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordPath($el['id'], $this->taskObject->perms_clause, $GLOBALS['BE_USER']->uc['titleLen']);
-                       $record = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord($el['table'], $dbAnalysis->results[$el['table']][$el['id']]);
-                       $title = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordTitle($el['table'], $dbAnalysis->results[$el['table']][$el['id']]);
-                       $description = $GLOBALS['LANG']->sL($GLOBALS['TCA'][$el['table']]['ctrl']['title'], 1);
-                       // @todo: which information could be needfull
+                       $path = BackendUtility::getRecordPath($el['id'], $this->taskObject->perms_clause, $GLOBALS['BE_USER']->uc['titleLen']);
+                       $record = BackendUtility::getRecord($el['table'], $dbAnalysis->results[$el['table']][$el['id']]);
+                       $title = BackendUtility::getRecordTitle($el['table'], $dbAnalysis->results[$el['table']][$el['id']]);
+                       $description = $GLOBALS['LANG']->sL($GLOBALS['TCA'][$el['table']]['ctrl']['title'], TRUE);
+                       // @todo: which information could be needful
                        if (isset($record['crdate'])) {
-                               $description .= ' - ' . \TYPO3\CMS\Backend\Utility\BackendUtility::dateTimeAge($record['crdate']);
+                               $description .= ' - ' . BackendUtility::dateTimeAge($record['crdate']);
                        }
                        $actionList[$el['id']] = array(
                                'title' => $title,
-                               'description' => \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordTitle($el['table'], $dbAnalysis->results[$el['table']][$el['id']]),
+                               'description' => BackendUtility::getRecordTitle($el['table'], $dbAnalysis->results[$el['table']][$el['id']]),
                                'descriptionHtml' => $description,
-                               'link' => $GLOBALS['BACK_PATH'] . 'alt_doc.php?returnUrl=' . rawurlencode(\TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REQUEST_URI')) . '&edit[' . $el['table'] . '][' . $el['id'] . ']=edit',
-                               'icon' => \t3lib_iconworks::getSpriteIconForRecord($el['table'], $dbAnalysis->results[$el['table']][$el['id']], array('title' => htmlspecialchars($path)))
+                               'link' => $GLOBALS['BACK_PATH'] . 'alt_doc.php?returnUrl=' . rawurlencode(GeneralUtility::getIndpEnv('REQUEST_URI')) . '&edit[' . $el['table'] . '][' . $el['id'] . ']=edit',
+                               'icon' => \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconForRecord($el['table'], $dbAnalysis->results[$el['table']][$el['id']], array('title' => htmlspecialchars($path)))
                        );
                }
                // Render the record list
@@ -674,7 +696,7 @@ class ActionTask implements \TYPO3\CMS\Taskcenter\TaskInterface {
                        $sql_query = unserialize($record['t2_data']);
                        if (!is_array($sql_query) || is_array($sql_query) && strtoupper(substr(trim($sql_query['qSelect']), 0, 6)) === 'SELECT') {
                                $actionContent = '';
-                               $fullsearch = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Database\\QueryView');
+                               $fullsearch = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Database\\QueryView');
                                $fullsearch->formW = 40;
                                $fullsearch->noDownloadB = 1;
                                $type = $sql_query['qC']['search_query_makeQuery'];
@@ -693,7 +715,7 @@ class ActionTask implements \TYPO3\CMS\Taskcenter\TaskInterface {
                                                $actionContent = $cP['content'];
                                                // If the result is rendered as csv or xml, show a download link
                                                if ($type === 'csv' || $type === 'xml') {
-                                                       $actionContent .= '<br /><br /><a href="' . \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REQUEST_URI') . '&download_file=1"><strong>' . $GLOBALS['LANG']->getLL('action_download_file') . '</strong></a>';
+                                                       $actionContent .= '<br /><br /><a href="' . GeneralUtility::getIndpEnv('REQUEST_URI') . '&download_file=1"><strong>' . $GLOBALS['LANG']->getLL('action_download_file') . '</strong></a>';
                                                }
                                        } else {
                                                $actionContent .= $GLOBALS['TYPO3_DB']->sql_error();
@@ -701,7 +723,7 @@ class ActionTask implements \TYPO3\CMS\Taskcenter\TaskInterface {
                                } else {
                                        // Query is empty (not built)
                                        $queryIsEmpty = TRUE;
-                                       $flashMessage = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', $GLOBALS['LANG']->getLL('action_emptyQuery', TRUE), $GLOBALS['LANG']->getLL('action_error'), \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR);
+                                       $flashMessage = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', $GLOBALS['LANG']->getLL('action_emptyQuery', TRUE), $GLOBALS['LANG']->getLL('action_error'), \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR);
                                        $content .= '<br />' . $flashMessage->render();
                                }
                                // Admin users are allowed to see and edit the query
@@ -709,18 +731,23 @@ class ActionTask implements \TYPO3\CMS\Taskcenter\TaskInterface {
                                        if (!$queryIsEmpty) {
                                                $actionContent .= '<hr /> ' . $fullsearch->tableWrap($sql_query['qSelect']);
                                        }
-                                       $actionContent .= '<br /><a title="' . $GLOBALS['LANG']->getLL('action_editQuery') . '" href="' . $GLOBALS['BACK_PATH'] . \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('lowlevel') . 'dbint/index.php?id=' . '&SET[function]=search' . '&SET[search]=query' . '&storeControl[STORE]=-' . $record['uid'] . '&storeControl[LOAD]=1' . '">
-                                               <img class="icon"' . \TYPO3\CMS\Backend\Utility\IconUtility::skinImg($GLOBALS['BACK_PATH'], 'gfx/edit2.gif') . ' alt="" />' . $GLOBALS['LANG']->getLL(($queryIsEmpty ? 'action_createQuery' : 'action_editQuery')) . '</a><br /><br />';
+                                       $actionContent .= '<br /><a title="' . $GLOBALS['LANG']->getLL('action_editQuery') . '" href="'
+                                               . BackendUtility::getModuleUrl('system_dbint')
+                                               . '&id=' . '&SET[function]=search' . '&SET[search]=query'
+                                               . '&storeControl[STORE]=-' . $record['uid'] . '&storeControl[LOAD]=1' . '">
+                                               <img class="icon"' . \TYPO3\CMS\Backend\Utility\IconUtility::skinImg($GLOBALS['BACK_PATH'],
+                                               'gfx/edit2.gif') . ' alt="" />' . $GLOBALS['LANG']->getLL(($queryIsEmpty ? 'action_createQuery'
+                                               : 'action_editQuery')) . '</a><br /><br />';
                                }
                                $content .= $this->taskObject->doc->section($GLOBALS['LANG']->getLL('action_t2_result'), $actionContent, 0, 1);
                        } else {
                                // Query is not configured
-                               $flashMessage = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', $GLOBALS['LANG']->getLL('action_notReady', TRUE), $GLOBALS['LANG']->getLL('action_error'), \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR);
+                               $flashMessage = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', $GLOBALS['LANG']->getLL('action_notReady', TRUE), $GLOBALS['LANG']->getLL('action_error'), \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR);
                                $content .= '<br />' . $flashMessage->render();
                        }
                } else {
                        // Required sysext lowlevel is not installed
-                       $flashMessage = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', $GLOBALS['LANG']->getLL('action_lowlevelMissing', TRUE), $GLOBALS['LANG']->getLL('action_error'), \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR);
+                       $flashMessage = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', $GLOBALS['LANG']->getLL('action_lowlevelMissing', TRUE), $GLOBALS['LANG']->getLL('action_error'), \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR);
                        $content .= '<br />' . $flashMessage->render();
                }
                return $content;
@@ -734,21 +761,21 @@ class ActionTask implements \TYPO3\CMS\Taskcenter\TaskInterface {
         */
        protected function viewRecordList($record) {
                $content = '';
-               $this->id = intval($record['t3_listPid']);
+               $this->id = (int)$record['t3_listPid'];
                $this->table = $record['t3_tables'];
                if ($this->id == 0 || $this->table == '') {
-                       $flashMessage = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', $GLOBALS['LANG']->getLL('action_notReady', TRUE), $GLOBALS['LANG']->getLL('action_error'), \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR);
+                       $flashMessage = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', $GLOBALS['LANG']->getLL('action_notReady', TRUE), $GLOBALS['LANG']->getLL('action_error'), \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR);
                        $content .= '<br />' . $flashMessage->render();
                        return $content;
                }
                // Loading current page record and checking access:
-               $this->pageinfo = \TYPO3\CMS\Backend\Utility\BackendUtility::readPageAccess($this->id, $this->taskObject->perms_clause);
+               $this->pageinfo = BackendUtility::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:
-                       $dblist = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\SysAction\\ActionList');
-                       $dblist->script = \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REQUEST_URI');
+                       $dblist = GeneralUtility::makeInstance('TYPO3\\CMS\\SysAction\\ActionList');
+                       $dblist->script = GeneralUtility::getIndpEnv('REQUEST_URI');
                        $dblist->backPath = $GLOBALS['BACK_PATH'];
                        $dblist->calcPerms = $GLOBALS['BE_USER']->calcPerms($this->pageinfo);
                        $dblist->thumbs = $GLOBALS['BE_USER']->uc['thumbnailsByDefault'];
@@ -761,9 +788,9 @@ class ActionTask implements \TYPO3\CMS\Taskcenter\TaskInterface {
                        $dblist->counter++;
                        $dblist->MOD_MENU = array('bigControlPanel' => '', 'clipBoard' => '', 'localization' => '');
                        $dblist->modTSconfig = $this->taskObject->modTSconfig;
-                       $dblist->dontShowClipControlPanels = $CLIENT['FORMSTYLE'] && !$this->taskObject->MOD_SETTINGS['bigControlPanel'] && $dblist->clipObj->current == 'normal' && !$this->modTSconfig['properties']['showClipControlPanelsDespiteOfCMlayers'];
+                       $dblist->dontShowClipControlPanels = (!$this->taskObject->MOD_SETTINGS['bigControlPanel'] && $dblist->clipObj->current == 'normal' && !$this->modTSconfig['properties']['showClipControlPanelsDespiteOfCMlayers']);
                        // Initialize the listing object, dblist, for rendering the list:
-                       $this->pointer = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('pointer'), 0, 100000);
+                       $this->pointer = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange(GeneralUtility::_GP('pointer'), 0, 100000);
                        $dblist->start($this->id, $this->table, $this->pointer, $this->taskObject->search_field, $this->taskObject->search_levels, $this->taskObject->showLimit);
                        $dblist->setDispFields();
                        // Render the list of tables:
@@ -771,10 +798,6 @@ class ActionTask implements \TYPO3\CMS\Taskcenter\TaskInterface {
                        // Add JavaScript functions to the page:
                        $this->taskObject->doc->JScode = $this->taskObject->doc->wrapScriptTags('
 
-                               function jumpToUrl(URL) {
-                                       window.location.href = URL;
-                                       return false;
-                               }
                                function jumpExt(URL,anchor) {
                                        var anc = anchor?anchor:"";
                                        window.location.href = URL+(T3_THIS_LOCATION?"&returnUrl="+T3_THIS_LOCATION:"")+anc;
@@ -796,7 +819,7 @@ class ActionTask implements \TYPO3\CMS\Taskcenter\TaskInterface {
 
                                ' . $dblist->CBfunctions() . '
                                function editRecords(table,idList,addParams,CBflag) {
-                                       window.location.href="' . $GLOBALS['BACK_PATH'] . 'alt_doc.php?returnUrl=' . rawurlencode(\TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REQUEST_URI')) . '&edit["+table+"]["+idList+"]=edit"+addParams;
+                                       window.location.href="' . $GLOBALS['BACK_PATH'] . 'alt_doc.php?returnUrl=' . rawurlencode(GeneralUtility::getIndpEnv('REQUEST_URI')) . '&edit["+table+"]["+idList+"]=edit"+addParams;
                                }
                                function editList(table,idList) {
                                        var list="";
@@ -817,9 +840,9 @@ class ActionTask implements \TYPO3\CMS\Taskcenter\TaskInterface {
 
                                        return list ? list : idList;
                                }
-                               T3_THIS_LOCATION = "' . rawurlencode(\TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REQUEST_URI')) . '";
+                               T3_THIS_LOCATION = "' . rawurlencode(GeneralUtility::getIndpEnv('REQUEST_URI')) . '";
 
-                               if (top.fsMod) top.fsMod.recentIds["web"] = ' . intval($this->id) . ';
+                               if (top.fsMod) top.fsMod.recentIds["web"] = ' . (int)$this->id . ';
                        ');
                        // Setting up the context sensitive menu:
                        $this->taskObject->doc->getContextMenuCode();
@@ -838,13 +861,10 @@ class ActionTask implements \TYPO3\CMS\Taskcenter\TaskInterface {
                        }
                } else {
                        // Not enough rights to access the list view or the page
-                       $flashMessage = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', $GLOBALS['LANG']->getLL('action_error-access', TRUE), $GLOBALS['LANG']->getLL('action_error'), \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR);
+                       $flashMessage = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', $GLOBALS['LANG']->getLL('action_error-access', TRUE), $GLOBALS['LANG']->getLL('action_error'), \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR);
                        $content .= $flashMessage->render();
                }
                return $content;
        }
 
 }
-
-
-?>
\ No newline at end of file