[TASK] Remove conf.php from ext:func 75/35075/2
authorWouter Wolters <typo3@wouterwolters.nl>
Fri, 5 Dec 2014 16:29:19 +0000 (17:29 +0100)
committerMarkus Klein <klein.t3@reelworx.at>
Mon, 8 Dec 2014 02:28:35 +0000 (03:28 +0100)
Resolves: #63611
Releases: master
Change-Id: Ie51c8aef575e6a4f9178b662ceb92152af24fee5
Reviewed-on: http://review.typo3.org/35075
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/func/Classes/Controller/PageFunctionsController.php
typo3/sysext/func/ext_tables.php
typo3/sysext/func/mod1/conf.php [deleted file]

index ac4e23f..351b6b4 100644 (file)
@@ -38,11 +38,20 @@ class PageFunctionsController extends \TYPO3\CMS\Backend\Module\BaseScriptClass
        public $doc;
 
        /**
+        * The name of the module
+        *
+        * @var string
+        */
+       protected $moduleName = 'web_func';
+
+       /**
         * Constructor
         */
        public function __construct() {
                $GLOBALS['LANG']->includeLLFile('EXT:lang/locallang_mod_web_func.xlf');
-               $GLOBALS['BE_USER']->modAccess($GLOBALS['MCONF'], TRUE);
+               $this->MCONF = array(
+                       'name' => $this->moduleName,
+               );
        }
 
        /**
@@ -136,7 +145,7 @@ class PageFunctionsController extends \TYPO3\CMS\Backend\Module\BaseScriptClass
                                . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-view') . '</a>';
                        // Shortcut
                        if ($GLOBALS['BE_USER']->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']);
+                               $buttons['shortcut'] = $this->doc->makeShortcutIcon('id, edit_record, pointer, new_unique_uid, search_field, search_levels, showLimit', implode(',', array_keys($this->MOD_MENU)), $this->moduleName);
                        }
                }
                return $buttons;
index 073fa05..5d90146 100644 (file)
@@ -6,6 +6,17 @@ if (TYPO3_MODE === 'BE') {
                'web',
                'func',
                '',
-               \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'mod1/'
+               \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'mod1/',
+               array(
+                       'script' => '_DISPATCH',
+                       'access' => 'user,group',
+                       'name' => 'web_func',
+                       'labels' => array(
+                               'tabs_images' => array(
+                                       'tab' => '../Resources/Public/Icons/module-func.png',
+                               ),
+                               'll_ref' => 'LLL:EXT:lang/locallang_mod_web_func.xlf',
+                       ),
+               )
        );
 }
diff --git a/typo3/sysext/func/mod1/conf.php b/typo3/sysext/func/mod1/conf.php
deleted file mode 100644 (file)
index 6348dde..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$MLANG['default']['tabs_images']['tab'] = '../Resources/Public/Icons/module-func.png';
-$MLANG['default']['ll_ref'] = 'LLL:EXT:lang/locallang_mod_web_func.xlf';
-$MCONF['script'] = '_DISPATCH';
-$MCONF['access'] = 'user,group';
-$MCONF['name'] = 'web_func';