[TASK] Remove conf.php from ext:dbal 53/40053/2
authorWouter Wolters <typo3@wouterwolters.nl>
Sat, 6 Jun 2015 14:52:52 +0000 (16:52 +0200)
committerMarkus Klein <markus.klein@typo3.org>
Sat, 6 Jun 2015 22:42:14 +0000 (00:42 +0200)
Resolves: #67331
Releases: master
Change-Id: I1ffe4911f9905f3d467e8f947fe7dc8c0fdd7222
Reviewed-on: http://review.typo3.org/40053
Reviewed-by: Morton Jonuschat <m.jonuschat@mojocode.de>
Tested-by: Morton Jonuschat <m.jonuschat@mojocode.de>
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
typo3/sysext/dbal/Classes/Controller/ModuleController.php
typo3/sysext/dbal/ext_tables.php
typo3/sysext/dbal/mod1/conf.php [deleted file]

index 6a6649e..0bb081f 100644 (file)
@@ -30,11 +30,21 @@ class ModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClass {
        protected $thisScript;
 
        /**
+        * The name of the module
+        *
+        * @var string
+        */
+       protected $moduleName = 'tools_txdbalM1';
+
+       /**
         * Initializes this module.
         *
         * @return void
         */
        public function init() {
+               $this->MCONF = array(
+                       'name' => $this->moduleName,
+               );
                $this->getLanguageService()->includeLLFile('EXT:dbal/mod1/locallang.xlf');
                parent::init();
        }
@@ -97,7 +107,7 @@ class ModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClass {
        /**
         * Prints out the module HTML
         *
-        * @return      string HTML output
+        * @return string HTML output
         */
        public function printContent() {
                $this->content .= $this->doc->endPage();
index 5a636db..76a5b27 100644 (file)
@@ -2,5 +2,21 @@
 defined('TYPO3_MODE') or die();
 
 if (TYPO3_MODE === 'BE') {
-       \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule('tools', 'txdbalM1', '', \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'mod1/');
+       \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule(
+               'tools',
+               'txdbalM1',
+               '',
+               \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'mod1/',
+               array(
+                       'script' => '_DISPATCH',
+                       'access' => 'admin',
+                       'name' => 'tools_txdbalM1',
+                       'labels' => array(
+                               'tabs_images' => array(
+                                       'tab' => '../Resources/Public/Icons/module-dbal.png',
+                               ),
+                               'll_ref' => 'LLL:EXT:dbal/mod1/locallang_mod.xlf',
+                       ),
+               )
+       );
 }
diff --git a/typo3/sysext/dbal/mod1/conf.php b/typo3/sysext/dbal/mod1/conf.php
deleted file mode 100644 (file)
index 42450c2..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$MCONF['name'] = 'tools_txdbalM1';
-$MCONF['access'] = 'admin';
-$MCONF['script'] = '_DISPATCH';
-$MLANG['default']['tabs_images']['tab'] = '../Resources/Public/Icons/module-dbal.png';
-$MLANG['default']['ll_ref'] = 'LLL:EXT:dbal/mod1/locallang_mod.xlf';