[TASK] Remove conf.php from ext:info 74/35074/4
authorWouter Wolters <typo3@wouterwolters.nl>
Fri, 5 Dec 2014 16:25:30 +0000 (17:25 +0100)
committerTymoteusz Motylewski <t.motylewski@gmail.com>
Wed, 10 Dec 2014 17:13:36 +0000 (18:13 +0100)
Resolves: #63610
Releases: master
Change-Id: I5eb82346151cb45efd38c870421141f58552308b
Reviewed-on: http://review.typo3.org/35074
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>
Reviewed-by: Tymoteusz Motylewski <t.motylewski@gmail.com>
Tested-by: Tymoteusz Motylewski <t.motylewski@gmail.com>
typo3/sysext/info/Classes/Controller/InfoModuleController.php
typo3/sysext/info/ext_tables.php
typo3/sysext/info/mod1/conf.php [deleted file]

index 4c3521b..aee7195 100644 (file)
@@ -50,6 +50,13 @@ class InfoModuleController extends BaseScriptClass {
        protected $languageService;
 
        /**
+        * The name of the module
+        *
+        * @var string
+        */
+       protected $moduleName = 'web_info';
+
+       /**
         * Constructor
         */
        public function __construct() {
@@ -57,7 +64,10 @@ class InfoModuleController extends BaseScriptClass {
                $this->languageService->includeLLFile('EXT:lang/locallang_mod_web_info.xlf');
 
                $this->backendUser = $GLOBALS['BE_USER'];
-               $this->backendUser->modAccess($GLOBALS['MCONF'], TRUE);
+
+               $this->MCONF = array(
+                       'name' => $this->moduleName,
+               );
        }
 
        /**
@@ -94,7 +104,7 @@ class InfoModuleController extends BaseScriptClass {
                        $this->doc->postCode = $this->doc->wrapScriptTags('if (top.fsMod) top.fsMod.recentIds["web"] = ' . (int)$this->id . ';');
                        // Setting up the context sensitive menu:
                        $this->doc->getContextMenuCode();
-                       $this->doc->form = '<form action="' . htmlspecialchars(BackendUtility::getModuleUrl('web_info')) .
+                       $this->doc->form = '<form action="' . htmlspecialchars(BackendUtility::getModuleUrl($this->moduleName)) .
                                '" method="post" name="webinfoForm">';
                        $vContent = $this->doc->getVersionSelector($this->id, 1);
                        if ($vContent) {
@@ -163,7 +173,7 @@ class InfoModuleController extends BaseScriptClass {
                if ($this->backendUser->mayMakeShortcut()) {
                        $buttons['shortcut'] = $this->doc->makeShortcutIcon(
                                'id, edit_record, pointer, new_unique_uid, search_field, search_levels, showLimit',
-                               implode(',', array_keys($this->MOD_MENU)), $this->MCONF['name']);
+                               implode(',', array_keys($this->MOD_MENU)), $this->moduleName);
                }
                return $buttons;
        }
index a6883ff..67d99d2 100644 (file)
@@ -6,6 +6,17 @@ if (TYPO3_MODE === 'BE') {
                'web',
                'info',
                '',
-               \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'mod1/'
+               \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'mod1/',
+               array(
+                       'script' => '_DISPATCH',
+                       'access' => 'user,group',
+                       'name' => 'web_info',
+                       'labels' => array(
+                               'tabs_images' => array(
+                                       'tab' => '../Resources/Public/Icons/module-info.png',
+                               ),
+                               'll_ref' => 'LLL:EXT:lang/locallang_mod_web_info.xlf',
+                       ),
+               )
        );
 }
diff --git a/typo3/sysext/info/mod1/conf.php b/typo3/sysext/info/mod1/conf.php
deleted file mode 100644 (file)
index cc0872d..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$MLANG['default']['tabs_images']['tab'] = '../Resources/Public/Icons/module-info.png';
-$MLANG['default']['ll_ref'] = 'LLL:EXT:lang/locallang_mod_web_info.xlf';
-$MCONF['script'] = '_DISPATCH';
-$MCONF['access'] = 'user,group';
-$MCONF['name'] = 'web_info';