[BUGFIX] Replace global use of MCONF['name'] 40/43540/2
authorWouter Wolters <typo3@wouterwolters.nl>
Thu, 24 Sep 2015 19:32:50 +0000 (21:32 +0200)
committerMarkus Klein <markus.klein@typo3.org>
Thu, 24 Sep 2015 21:13:19 +0000 (23:13 +0200)
The global is not set anymore with a module name.
Replace it were needed.

Resolves: #70092
Releases: master
Change-Id: If051d70a6b4fad8550d4e070272a616e32f636cf
Reviewed-on: http://review.typo3.org/43540
Reviewed-by: Mathias Schreiber <mathias.schreiber@wmdb.de>
Tested-by: Mathias Schreiber <mathias.schreiber@wmdb.de>
Reviewed-by: Daniel Goerz <ervaude@gmail.com>
Tested-by: Daniel Goerz <ervaude@gmail.com>
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
typo3/sysext/frontend/Classes/Controller/PageInformationController.php
typo3/sysext/info_pagetsconfig/Classes/Controller/InfoPageTyposcriptConfigController.php
typo3/sysext/rtehtmlarea/Classes/Controller/ParseHtmlController.php

index c616a8c..40bff44 100644 (file)
@@ -54,7 +54,7 @@ class PageInformationController extends \TYPO3\CMS\Backend\Module\AbstractFuncti
        public function main() {
                $theOutput = $this->pObj->doc->header($this->getLanguageService()->sL('LLL:EXT:frontend/Resources/Private/Language/locallang_webinfo.xlf:page_title'));
                $dblist = GeneralUtility::makeInstance(PageLayoutView::class);
-               $dblist->descrTable = '_MOD_' . $GLOBALS['MCONF']['name'];
+               $dblist->descrTable = '_MOD_web_info';
                $dblist->thumbs = 0;
                $dblist->script = BackendUtility::getModuleUrl('web_info');
                $dblist->showIcon = 0;
index 13aa539..e3c3e20 100644 (file)
@@ -152,7 +152,7 @@ class InfoPageTyposcriptConfigController extends \TYPO3\CMS\Backend\Module\Abstr
                                } else {
                                        $editIcon = '';
                                }
-                               $theOutput .= $this->pObj->doc->section('', BackendUtility::cshItem(('_MOD_' . $GLOBALS['MCONF']['name']), 'tsconfig_edit', NULL) . $menu . '
+                               $theOutput .= $this->pObj->doc->section('', BackendUtility::cshItem('_MOD_web_info', 'tsconfig_edit', NULL) . $menu . '
                                                <!-- Edit fields: -->
                                                <table border="0" cellpadding="0" cellspacing="1">' . implode('', $lines) . '</table><br />' . $editIcon, 0, 1);
 
@@ -218,7 +218,7 @@ class InfoPageTyposcriptConfigController extends \TYPO3\CMS\Backend\Module\Abstr
                                        $modTSconfig = array();
                                }
 
-                               $csh = BackendUtility::cshItem('_MOD_' . $GLOBALS['MCONF']['name'], 'tsconfig_hierarchy', NULL);
+                               $csh = BackendUtility::cshItem('_MOD_web_info', 'tsconfig_hierarchy', NULL);
                                $tree = $tmpl->ext_getObjTree($modTSconfig, '', '', '', '', $this->pObj->MOD_SETTINGS['tsconf_alphaSort']);
 
                                $theOutput .= $this->pObj->doc->section(
index 02353e3..a2277e4 100644 (file)
@@ -51,6 +51,13 @@ class ParseHtmlController {
        public $prefixId = 'TYPO3HtmlParser';
 
        /**
+        * The name of the module
+        *
+        * @var string
+        */
+       protected $moduleName = 'rtehtmlarea_wizard_parse_html';
+
+       /**
         * Initialize
         */
        public function __construct() {
@@ -63,11 +70,11 @@ class ParseHtmlController {
        public function init() {
                $this->doc = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Template\DocumentTemplate::class);
                $this->doc->JScode = '';
-               $this->modData = $GLOBALS['BE_USER']->getModuleData($GLOBALS['MCONF']['name'], 'ses');
+               $this->modData = $GLOBALS['BE_USER']->getModuleData($this->moduleName, 'ses');
                if (GeneralUtility::_GP('OC_key')) {
                        $parts = explode('|', GeneralUtility::_GP('OC_key'));
                        $this->modData['openKeys'][$parts[1]] = $parts[0] == 'O' ? 1 : 0;
-                       $GLOBALS['BE_USER']->pushModuleData($GLOBALS['MCONF']['name'], $this->modData);
+                       $GLOBALS['BE_USER']->pushModuleData($this->moduleName, $this->modData);
                }
        }