[TASK] Remove conf.php from ext:taskcenter 61/35061/2
authorWouter Wolters <typo3@wouterwolters.nl>
Thu, 4 Dec 2014 22:45:37 +0000 (23:45 +0100)
committerStefan Neufeind <typo3.neufeind@speedpartner.de>
Sun, 7 Dec 2014 10:20:46 +0000 (11:20 +0100)
Resolves: #63584
Releases: master
Change-Id: I7da0dd37e275a7d2c42771f20e22f765ab0428c7
Reviewed-on: http://review.typo3.org/35061
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Tested-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
typo3/sysext/taskcenter/Classes/Controller/TaskModuleController.php
typo3/sysext/taskcenter/ext_tables.php
typo3/sysext/taskcenter/task/conf.php [deleted file]

index ec76754..b54012d 100644 (file)
@@ -31,13 +31,22 @@ class TaskModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClass {
        protected $pageinfo;
 
        /**
+        * The name of the module
+        *
+        * @var string
+        */
+       protected $moduleName = 'user_task';
+
+       /**
         * Initializes the Module
         *
         * @return void
         */
        public function __construct() {
                $GLOBALS['LANG']->includeLLFile('EXT:taskcenter/task/locallang.xlf');
-               $GLOBALS['BE_USER']->modAccess($GLOBALS['MCONF'], TRUE);
+               $this->MCONF = array(
+                       'name' => $this->moduleName
+               );
                parent::init();
                // Initialize document
                $this->doc = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Template\DocumentTemplate::class);
@@ -320,7 +329,7 @@ class TaskModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClass {
                );
                // Shortcut
                if ($GLOBALS['BE_USER']->mayMakeShortcut()) {
-                       $buttons['shortcut'] = $this->doc->makeShortcutIcon('', 'function', $this->MCONF['name']);
+                       $buttons['shortcut'] = $this->doc->makeShortcutIcon('', 'function', $this->moduleName);
                }
                return $buttons;
        }
index b94f38b..98cf077 100644 (file)
@@ -10,7 +10,18 @@ if (TYPO3_MODE === 'BE') {
                'user',
                'task',
                'top',
-               \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'task/'
+               \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'task/',
+               array(
+                       'script' => '_DISPATCH',
+                       'access' => 'group,user',
+                       'name' => 'user_task',
+                       'labels' => array(
+                               'tabs_images' => array(
+                                       'tab' => '../Resources/Public/Icons/module-taskcenter.png',
+                               ),
+                               'll_ref' => 'LLL:EXT:taskcenter/task/locallang_mod.xlf',
+                       ),
+               )
        );
 
        \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::registerAjaxHandler(
diff --git a/typo3/sysext/taskcenter/task/conf.php b/typo3/sysext/taskcenter/task/conf.php
deleted file mode 100644 (file)
index 9ea83e7..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$MLANG['default']['tabs_images']['tab'] = '../Resources/Public/Icons/module-taskcenter.png';
-$MLANG['default']['ll_ref'] = 'LLL:EXT:taskcenter/task/locallang_mod.xlf';
-$MCONF['script'] = '_DISPATCH';
-$MCONF['access'] = 'group,user';
-$MCONF['name'] = 'user_task';