[TASK] Remove conf.php from ext:tstemplate 59/35059/4
authorWouter Wolters <typo3@wouterwolters.nl>
Thu, 4 Dec 2014 22:26:15 +0000 (23:26 +0100)
committerStefan Neufeind <typo3.neufeind@speedpartner.de>
Sun, 7 Dec 2014 22:22:48 +0000 (23:22 +0100)
Resolves: #63583
Releases: master
Change-Id: I6fe07e16a836aa39dc33ac7cffc42ea0824fa34d
Reviewed-on: http://review.typo3.org/35059
Reviewed-by: Frank Nägler <typo3@naegler.net>
Tested-by: Frank Nägler <typo3@naegler.net>
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Tested-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
typo3/sysext/tstemplate/Classes/Controller/TypoScriptTemplateConstantEditorModuleFunctionController.php
typo3/sysext/tstemplate/Classes/Controller/TypoScriptTemplateModuleController.php
typo3/sysext/tstemplate/Classes/Controller/TypoScriptTemplateObjectBrowserModuleFunctionController.php
typo3/sysext/tstemplate/ext_tables.php
typo3/sysext/tstemplate/ts/conf.php [deleted file]

index 67094b1..52a6b96 100644 (file)
@@ -121,7 +121,7 @@ class TypoScriptTemplateConstantEditorModuleFunctionController extends \TYPO3\CM
                        }
                        // Resetting the menu (start). I wonder if this in any way is a violation of the menu-system. Haven't checked. But need to do it here, because the menu is dependent on the categories available.
                        $this->pObj->MOD_MENU['constant_editor_cat'] = $tmpl->ext_getCategoryLabelArray();
-                       $this->pObj->MOD_SETTINGS = \TYPO3\CMS\Backend\Utility\BackendUtility::getModuleData($this->pObj->MOD_MENU, \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('SET'), $this->pObj->MCONF['name']);
+                       $this->pObj->MOD_SETTINGS = \TYPO3\CMS\Backend\Utility\BackendUtility::getModuleData($this->pObj->MOD_MENU, \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('SET'), $this->pObj->moduleName);
                        // Resetting the menu (stop)
                        $content = \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconForRecord('sys_template', $tplRow) . '<strong>' . $this->pObj->linkWrapTemplateTitle($tplRow['title'], 'constants') . '</strong>' . htmlspecialchars((trim($tplRow['sitetitle']) ? ' (' . $tplRow['sitetitle'] . ')' : ''));
                        $theOutput .= $this->pObj->doc->section($GLOBALS['LANG']->getLL('editConstants', TRUE), $content, FALSE, TRUE);
index 94daefb..d5eafe5 100644 (file)
@@ -78,11 +78,20 @@ class TypoScriptTemplateModuleController extends \TYPO3\CMS\Backend\Module\BaseS
        public $access = FALSE;
 
        /**
+        * The name of the module
+        *
+        * @var string
+        */
+       public $moduleName = 'web_ts';
+
+       /**
         * Constructor
         */
        public function __construct() {
                $GLOBALS['LANG']->includeLLFile('EXT:tstemplate/ts/locallang.xlf');
-               $GLOBALS['BE_USER']->modAccess($GLOBALS['MCONF'], TRUE);
+               $this->MCONF = array(
+                       'name' => $this->moduleName
+               );
        }
 
        /**
index 748a0ff..58d6e53 100644 (file)
@@ -75,7 +75,7 @@ class TypoScriptTemplateObjectBrowserModuleFunctionController extends \TYPO3\CMS
                                } else {
                                        unset($this->pObj->MOD_SETTINGS['ts_browser_TLKeys_' . $bType][key($addKey)]);
                                }
-                               $GLOBALS['BE_USER']->pushModuleData($this->pObj->MCONF['name'], $this->pObj->MOD_SETTINGS);
+                               $GLOBALS['BE_USER']->pushModuleData($this->pObj->moduleName, $this->pObj->MOD_SETTINGS);
                        }
                        if (count($this->pObj->MOD_SETTINGS['ts_browser_TLKeys_' . $bType])) {
                                $modMenu['ts_browser_toplevel_' . $bType]['-'] = '---';
@@ -272,7 +272,7 @@ class TypoScriptTemplateObjectBrowserModuleFunctionController extends \TYPO3\CMS
                        $update = 1;
                }
                if ($update) {
-                       $GLOBALS['BE_USER']->pushModuleData($this->pObj->MCONF['name'], $this->pObj->MOD_SETTINGS);
+                       $GLOBALS['BE_USER']->pushModuleData($this->pObj->moduleName, $this->pObj->MOD_SETTINGS);
                }
                $tmpl->matchAlternative = $this->pObj->MOD_SETTINGS['tsbrowser_conditions'];
                $tmpl->matchAlternative[] = 'dummydummydummydummydummydummydummydummydummydummydummy';
index ffe75e5..a393401 100644 (file)
@@ -8,7 +8,18 @@ if (TYPO3_MODE === 'BE') {
                'web',
                'ts',
                '',
-               $extensionPath . 'ts/'
+               $extensionPath . 'ts/',
+               array(
+                       'script' => '_DISPATCH',
+                       'access' => 'admin',
+                       'name' => 'web_ts',
+                       'labels' => array(
+                               'tabs_images' => array(
+                                       'tab' => '../Resources/Public/Icons/module-tstemplate.png',
+                               ),
+                               'll_ref' => 'LLL:EXT:tstemplate/ts/locallang_mod.xlf',
+                       ),
+               )
        );
 
        \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::insertModuleFunction(
diff --git a/typo3/sysext/tstemplate/ts/conf.php b/typo3/sysext/tstemplate/ts/conf.php
deleted file mode 100644 (file)
index 35da775..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$MCONF['script'] = '_DISPATCH';
-$MCONF['access'] = 'admin';
-$MCONF['name'] = 'web_ts';
-$MLANG['default']['tabs_images']['tab'] = '../Resources/Public/Icons/module-tstemplate.png';
-$MLANG['default']['ll_ref'] = 'LLL:EXT:tstemplate/ts/locallang_mod.xlf';