[TASK] Remove conf.php from ext:scheduler 63/35063/2
authorWouter Wolters <typo3@wouterwolters.nl>
Thu, 4 Dec 2014 23:01:54 +0000 (00:01 +0100)
committerStefan Neufeind <typo3.neufeind@speedpartner.de>
Sun, 7 Dec 2014 10:28:40 +0000 (11:28 +0100)
Resolves: #63586
Releases: master
Change-Id: Ib19d2b77c7df7c009c9f905c0322a9b304fea0dc
Reviewed-on: http://review.typo3.org/35063
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/scheduler/Classes/Controller/SchedulerModuleController.php
typo3/sysext/scheduler/ext_tables.php
typo3/sysext/scheduler/mod1/conf.php [deleted file]

index c20f8c0..a04fe0b 100644 (file)
@@ -77,14 +77,22 @@ class SchedulerModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClas
        protected $view;
 
        /**
+        * The name of the module
+        *
+        * @var string
+        */
+       protected $moduleName = 'system_txschedulerM1';
+
+       /**
         * @return \TYPO3\CMS\Scheduler\Controller\SchedulerModuleController
         */
        public function __construct() {
                $GLOBALS['LANG']->includeLLFile('EXT:scheduler/Resources/Private/Language/locallang.xlf');
-               $GLOBALS['BE_USER']->modAccess($GLOBALS['MCONF'], TRUE);
-
+               $this->MCONF = array(
+                       'name' => $this->moduleName,
+               );
                $this->backPath = $GLOBALS['BACK_PATH'];
-               $this->cshKey = '_MOD_' . $GLOBALS['MCONF']['name'];
+               $this->cshKey = '_MOD_' . $this->moduleName;
                $this->backendTemplatePath = ExtensionManagementUtility::extPath('scheduler') . 'Resources/Private/Templates/Backend/SchedulerModule/';
                $this->view = GeneralUtility::makeInstance(\TYPO3\CMS\Fluid\View\StandaloneView::class);
                $this->view->getRequest()->setControllerExtensionName('scheduler');
@@ -1454,7 +1462,7 @@ class SchedulerModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClas
        protected function getShortcutButton() {
                $result = '';
                if ($GLOBALS['BE_USER']->mayMakeShortcut()) {
-                       $result = $this->doc->makeShortcutIcon('', 'function', $this->MCONF['name']);
+                       $result = $this->doc->makeShortcutIcon('', 'function', $this->moduleName);
                }
                return $result;
        }
index 3fba46e..e55cc25 100644 (file)
@@ -7,7 +7,18 @@ if (TYPO3_MODE === 'BE') {
                'system',
                'txschedulerM1',
                '',
-               \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'mod1/'
+               \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'mod1/',
+               array(
+                       'script' => '_DISPATCH',
+                       'access' => 'admin',
+                       'name' => 'system_txschedulerM1',
+                       'labels' => array(
+                               'tabs_images' => array(
+                                       'tab' => '../Resources/Public/Icons/module-scheduler.png',
+                               ),
+                               'll_ref' => 'LLL:EXT:scheduler/Resources/Private/Language/locallang_mod.xlf',
+                       ),
+               )
        );
 
        // Add context sensitive help (csh) to the backend module
diff --git a/typo3/sysext/scheduler/mod1/conf.php b/typo3/sysext/scheduler/mod1/conf.php
deleted file mode 100644 (file)
index a2cb472..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$MLANG['default']['tabs_images']['tab'] = '../Resources/Public/Icons/module-scheduler.png';
-$MLANG['default']['ll_ref'] = 'LLL:EXT:scheduler/Resources/Private/Language/locallang_mod.xlf';
-$MCONF['access'] = 'admin';
-$MCONF['script'] = '_DISPATCH';
-$MCONF['name'] = 'system_txschedulerM1';