[TASK] Remove conf.php from ext:recycler 64/35064/4
authorWouter Wolters <typo3@wouterwolters.nl>
Thu, 4 Dec 2014 23:10:07 +0000 (00:10 +0100)
committerMarkus Klein <klein.t3@reelworx.at>
Mon, 8 Dec 2014 01:39:44 +0000 (02:39 +0100)
Resolves: #63587
Releases: master
Change-Id: I3a1fa569374f1bc65c82c0c34a73fa339f384e4c
Reviewed-on: http://review.typo3.org/35064
Tested-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>
typo3/sysext/recycler/Classes/Controller/RecyclerModuleController.php
typo3/sysext/recycler/ext_tables.php
typo3/sysext/recycler/mod1/conf.php [deleted file]

index b68c2af..1964eb0 100644 (file)
@@ -71,6 +71,13 @@ class RecyclerModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClass
        protected $languageService;
 
        /**
+        * The name of the module
+        *
+        * @var string
+        */
+       protected $moduleName = 'web_txrecyclerM1';
+
+       /**
         * Constructor
         */
        public function __construct() {
@@ -78,7 +85,10 @@ class RecyclerModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClass
                $this->languageService->includeLLFile('EXT:recycler/mod1/locallang.xlf');
 
                $this->backendUser = $GLOBALS['BE_USER'];
-               $this->backendUser->modAccess($GLOBALS['MCONF'], TRUE);
+
+               $this->MCONF = array(
+                       'name' => $this->moduleName,
+               );
        }
 
        /**
@@ -268,7 +278,7 @@ class RecyclerModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClass
        protected function getShortcutButton() {
                $result = '';
                if ($this->backendUser->mayMakeShortcut()) {
-                       $result = $this->doc->makeShortcutIcon('', 'function', $this->MCONF['name']);
+                       $result = $this->doc->makeShortcutIcon('', 'function', $this->moduleName);
                }
                return $result;
        }
index 2cacdfa..caf5395 100644 (file)
@@ -11,6 +11,17 @@ if (TYPO3_MODE === 'BE') {
                'web',
                'txrecyclerM1',
                '',
-               \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'mod1/'
+               \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'mod1/',
+               array(
+                       'script' => '_DISPATCH',
+                       'access' => 'user,group',
+                       'name' => 'web_txrecyclerM1',
+                       'labels' => array(
+                               'tabs_images' => array(
+                                       'tab' => '../Resources/Public/Icons/module-recycler.png',
+                               ),
+                               'll_ref' => 'LLL:EXT:recycler/mod1/locallang_mod.xlf',
+                       ),
+               )
        );
 }
diff --git a/typo3/sysext/recycler/mod1/conf.php b/typo3/sysext/recycler/mod1/conf.php
deleted file mode 100644 (file)
index 1f39913..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-<?php
-// DO NOT REMOVE OR CHANGE THESE 3 LINES:
-$MCONF['name'] = 'web_txrecyclerM1';
-$MCONF['script'] = '_DISPATCH';
-$MCONF['access'] = 'user,group';
-$MLANG['default']['tabs_images']['tab'] = '../Resources/Public/Icons/module-recycler.png';
-$MLANG['default']['ll_ref'] = 'LLL:EXT:recycler/mod1/locallang_mod.xlf';