[TASK] Remove conf.php from ext:setup 62/35062/5
authorWouter Wolters <typo3@wouterwolters.nl>
Thu, 4 Dec 2014 22:52:55 +0000 (23:52 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Fri, 12 Dec 2014 20:23:13 +0000 (21:23 +0100)
Resolves: #63585
Releases: master
Change-Id: Id2f94cc304841a9fbe2e9422ca6519b4a7d9afab
Reviewed-on: http://review.typo3.org/35062
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/setup/Classes/Controller/SetupModuleController.php
typo3/sysext/setup/ext_tables.php
typo3/sysext/setup/mod/conf.php [deleted file]

index 1f62fb4..933c9c8 100644 (file)
@@ -27,11 +27,6 @@ class SetupModuleController {
        /**
         * @var array
         */
-       public $MCONF = array();
-
-       /**
-        * @var array
-        */
        public $MOD_MENU = array();
 
        /**
@@ -129,6 +124,13 @@ class SetupModuleController {
        protected $simUser = '';
 
        /**
+        * The name of the module
+        *
+        * @var string
+        */
+       protected $moduleName = 'user_setup';
+
+       /**
         * Instantiate the form protection before a simulated user is initialized.
         */
        public function __construct() {
@@ -277,11 +279,10 @@ class SetupModuleController {
         */
        public function init() {
                $GLOBALS['LANG']->includeLLFile('EXT:setup/mod/locallang.xlf');
-               $this->MCONF = $GLOBALS['MCONF'];
+
                // Returns the script user - that is the REAL logged in user! ($GLOBALS[BE_USER] might be another user due to simulation!)
                $scriptUser = $this->getRealScriptUserObj();
-               // ... and checking module access for the logged in user.
-               $scriptUser->modAccess($this->MCONF, 1);
+
                $this->isAdmin = $scriptUser->isAdmin();
                // Getting the 'override' values as set might be set in User TSconfig
                $this->overrideConf = $GLOBALS['BE_USER']->getTSConfigProp('setup.override');
@@ -420,7 +421,7 @@ class SetupModuleController {
                $buttons['csh'] = BackendUtility::cshItem('_MOD_user_setup', '');
                $buttons['save'] = \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-save', array('html' => '<input type="image" name="data[save]" class="c-inputButton" src="clear.gif" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:rm.saveDoc', TRUE) . '" />'));
                if ($GLOBALS['BE_USER']->mayMakeShortcut()) {
-                       $buttons['shortcut'] = $this->doc->makeShortcutIcon('', '', $this->MCONF['name']);
+                       $buttons['shortcut'] = $this->doc->makeShortcutIcon('', '', $this->moduleName);
                }
                return $buttons;
        }
index bdcef68..4a94a20 100644 (file)
@@ -6,7 +6,18 @@ if (TYPO3_MODE === 'BE') {
                'user',
                'setup',
                'after:task',
-               \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'mod/'
+               \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'mod/',
+               array(
+                       'script' => '_DISPATCH',
+                       'access' => 'group,user',
+                       'name' => 'user_setup',
+                       'labels' => array(
+                               'tabs_images' => array(
+                                       'tab' => '../Resources/Public/Icons/module-setup.png',
+                               ),
+                               'll_ref' => 'LLL:EXT:setup/mod/locallang_mod.xlf',
+                       ),
+               )
        );
        \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr(
                '_MOD_user_setup',
diff --git a/typo3/sysext/setup/mod/conf.php b/typo3/sysext/setup/mod/conf.php
deleted file mode 100644 (file)
index fc90a90..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$MCONF['script'] = '_DISPATCH';
-$MLANG['default']['tabs_images']['tab'] = '../Resources/Public/Icons/module-setup.png';
-$MLANG['default']['ll_ref'] = 'LLL:EXT:setup/mod/locallang_mod.xlf';
-$MCONF['access'] = 'group,user';
-$MCONF['name'] = 'user_setup';