[TASK] Remove conf.php from ext:lowlevel 73/35073/3
authorWouter Wolters <typo3@wouterwolters.nl>
Fri, 5 Dec 2014 16:20:48 +0000 (17:20 +0100)
committerMarkus Klein <klein.t3@reelworx.at>
Mon, 8 Dec 2014 02:38:27 +0000 (03:38 +0100)
Resolves: #63609
Releases: master
Change-Id: Ife621913bfad4f909ce8351774a5d7c7211f8822
Reviewed-on: http://review.typo3.org/35073
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/lowlevel/Classes/View/ConfigurationView.php
typo3/sysext/lowlevel/Classes/View/DatabaseIntegrityView.php
typo3/sysext/lowlevel/config/conf.php [deleted file]
typo3/sysext/lowlevel/dbint/conf.php [deleted file]
typo3/sysext/lowlevel/ext_tables.php

index 3ed0ec4..b7b07e9 100644 (file)
@@ -38,6 +38,7 @@ class ConfigurationView {
 
        /**
         * @var array
+        * @deprecated since TYPO3 CMS 7, will be removed in TYPO3 CMS 8
         */
        public $MCONF = array();
 
@@ -69,10 +70,16 @@ class ConfigurationView {
        public $content;
 
        /**
+        * The name of the module
+        *
+        * @var string
+        */
+       protected $moduleName = 'system_config';
+
+       /**
         * Constructor
         */
        public function __construct() {
-               $GLOBALS['BE_USER']->modAccess($GLOBALS['MCONF'], 1);
                $this->view = GeneralUtility::makeInstance(\TYPO3\CMS\Fluid\View\StandaloneView::class);
                $this->view->getRequest()->setControllerExtensionName('lowlevel');
        }
@@ -83,7 +90,6 @@ class ConfigurationView {
         * @return void
         */
        public function init() {
-               $this->MCONF = $GLOBALS['MCONF'];
                $this->menuConfig();
                $this->doc = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Template\DocumentTemplate::class);
                $this->doc->backPath = $GLOBALS['BACK_PATH'];
@@ -119,7 +125,7 @@ class ConfigurationView {
                        'fixedLgd' => ''
                );
                // CLEANSE SETTINGS
-               $this->MOD_SETTINGS = BackendUtility::getModuleData($this->MOD_MENU, GeneralUtility::_GP('SET'), $this->MCONF['name']);
+               $this->MOD_SETTINGS = BackendUtility::getModuleData($this->MOD_MENU, GeneralUtility::_GP('SET'), $this->moduleName);
        }
 
        /**
@@ -202,7 +208,7 @@ class ConfigurationView {
                        $update = 1;
                }
                if ($update) {
-                       $GLOBALS['BE_USER']->pushModuleData($this->MCONF['name'], $this->MOD_SETTINGS);
+                       $GLOBALS['BE_USER']->pushModuleData($this->moduleName, $this->MOD_SETTINGS);
                }
                $arrayBrowser->depthKeys = $this->MOD_SETTINGS['node_' . $this->MOD_SETTINGS['function']];
                $arrayBrowser->regexMode = $this->MOD_SETTINGS['regexsearch'];
@@ -310,7 +316,7 @@ class ConfigurationView {
                );
                // Shortcut
                if ($GLOBALS['BE_USER']->mayMakeShortcut()) {
-                       $buttons['shortcut'] = $this->doc->makeShortcutIcon('', 'function', $this->MCONF['name']);
+                       $buttons['shortcut'] = $this->doc->makeShortcutIcon('', 'function', $this->moduleName);
                }
                return $buttons;
        }
index 4c54e6a..fb16c8f 100644 (file)
@@ -26,6 +26,7 @@ class DatabaseIntegrityView {
 
        /**
         * @var array
+        * @deprecated since TYPO3 CMS 7, will be removed in TYPO3 CMS 8
         */
        public $MCONF = array();
 
@@ -57,11 +58,17 @@ class DatabaseIntegrityView {
        protected $formName = 'queryform';
 
        /**
+        * The name of the module
+        *
+        * @var string
+        */
+       protected $moduleName = 'system_dbint';
+
+       /**
         * Constructor
         */
        public function __construct() {
                $GLOBALS['LANG']->includeLLFile('EXT:lowlevel/dbint/locallang.xlf');
-               $GLOBALS['BE_USER']->modAccess($GLOBALS['MCONF'], 1);
        }
 
        /**
@@ -70,7 +77,6 @@ class DatabaseIntegrityView {
         * @return void
         */
        public function init() {
-               $this->MCONF = $GLOBALS['MCONF'];
                $this->menuConfig();
                $this->doc = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Template\DocumentTemplate::class);
                $this->doc->backPath = $GLOBALS['BACK_PATH'];
@@ -147,11 +153,11 @@ class DatabaseIntegrityView {
                        'sword' => ''
                );
                // CLEAN SETTINGS
-               $OLD_MOD_SETTINGS = BackendUtility::getModuleData($this->MOD_MENU, '', $this->MCONF['name'], 'ses');
-               $this->MOD_SETTINGS = BackendUtility::getModuleData($this->MOD_MENU, GeneralUtility::_GP('SET'), $this->MCONF['name'], 'ses');
+               $OLD_MOD_SETTINGS = BackendUtility::getModuleData($this->MOD_MENU, '', $this->moduleName, 'ses');
+               $this->MOD_SETTINGS = BackendUtility::getModuleData($this->MOD_MENU, GeneralUtility::_GP('SET'), $this->moduleName, 'ses');
                if (GeneralUtility::_GP('queryConfig')) {
                        $qA = GeneralUtility::_GP('queryConfig');
-                       $this->MOD_SETTINGS = BackendUtility::getModuleData($this->MOD_MENU, array('queryConfig' => serialize($qA)), $this->MCONF['name'], 'ses');
+                       $this->MOD_SETTINGS = BackendUtility::getModuleData($this->MOD_MENU, array('queryConfig' => serialize($qA)), $this->moduleName, 'ses');
                }
                $addConditionCheck = GeneralUtility::_GP('qG_ins');
                foreach ($OLD_MOD_SETTINGS as $key => $val) {
@@ -172,7 +178,7 @@ class DatabaseIntegrityView {
                        } else {
                                $this->MOD_SETTINGS['queryLimit'] = '0';
                        }
-                       $this->MOD_SETTINGS = BackendUtility::getModuleData($this->MOD_MENU, $this->MOD_SETTINGS, $this->MCONF['name'], 'ses');
+                       $this->MOD_SETTINGS = BackendUtility::getModuleData($this->MOD_MENU, $this->MOD_SETTINGS, $this->moduleName, 'ses');
                }
        }
 
@@ -232,7 +238,7 @@ class DatabaseIntegrityView {
                );
                // Shortcut
                if ($GLOBALS['BE_USER']->mayMakeShortcut()) {
-                       $buttons['shortcut'] = $this->doc->makeShortcutIcon('', 'function,search,search_query_makeQuery', $this->MCONF['name']);
+                       $buttons['shortcut'] = $this->doc->makeShortcutIcon('', 'function,search,search_query_makeQuery', $this->moduleName);
                }
                return $buttons;
        }
diff --git a/typo3/sysext/lowlevel/config/conf.php b/typo3/sysext/lowlevel/config/conf.php
deleted file mode 100644 (file)
index 09632a4..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-<?php
-$MLANG['default']['tabs_images']['tab'] = '../Resources/Public/Icons/module-config.png';
-$MLANG['default']['ll_ref'] = 'LLL:EXT:lowlevel/config/locallang_mod.xlf';
-$MCONF['script'] = '_DISPATCH';
-$MCONF['access'] = 'admin';
-$MCONF['name'] = 'system_config';
-$MCONF['workspaces'] = 'online';
diff --git a/typo3/sysext/lowlevel/dbint/conf.php b/typo3/sysext/lowlevel/dbint/conf.php
deleted file mode 100644 (file)
index 2616ba1..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-<?php
-$MLANG['default']['tabs_images']['tab'] = '../Resources/Public/Icons/module-dbint.png';
-$MLANG['default']['ll_ref'] = 'LLL:EXT:lowlevel/dbint/locallang_mod.xlf';
-$MCONF['script'] = '_DISPATCH';
-$MCONF['access'] = 'admin';
-$MCONF['name'] = 'system_dbint';
-$MCONF['workspaces'] = 'online';
index 3c6e40f..716bc48 100644 (file)
@@ -6,12 +6,36 @@ if (TYPO3_MODE === 'BE') {
                'system',
                'dbint',
                '',
-               \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'dbint/'
+               \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'dbint/',
+               array(
+                       'script' => '_DISPATCH',
+                       'access' => 'admin',
+                       'name' => 'system_dbint',
+                       'workspaces' => 'online',
+                       'labels' => array(
+                               'tabs_images' => array(
+                                       'tab' => '../Resources/Public/Icons/module-dbint.png',
+                               ),
+                               'll_ref' => 'LLL:EXT:lowlevel/dbint/locallang_mod.xlf',
+                       ),
+               )
        );
        \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule(
                'system',
                'config',
                '',
-               \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'config/'
+               \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'config/',
+               array(
+                       'script' => '_DISPATCH',
+                       'access' => 'admin',
+                       'name' => 'system_config',
+                       'workspaces' => 'online',
+                       'labels' => array(
+                               'tabs_images' => array(
+                                       'tab' => '../Resources/Public/Icons/module-config.png',
+                               ),
+                               'll_ref' => 'LLL:EXT:lowlevel/config/locallang_mod.xlf',
+                       ),
+               )
        );
 }