Commit 0074a9d0 authored by Wouter Wolters's avatar Wouter Wolters Committed by Christian Kuhn
Browse files

[TASK] Remove conf.php from ext:setup

Resolves: #63585
Releases: master
Change-Id: Id2f94cc304841a9fbe2e9422ca6519b4a7d9afab
Reviewed-on: http://review.typo3.org/35062


Reviewed-by: Anja Leichsenring's avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring's avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
parent 74d1fb24
......@@ -24,11 +24,6 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
*/
class SetupModuleController {
/**
* @var array
*/
public $MCONF = array();
/**
* @var array
*/
......@@ -128,6 +123,13 @@ class SetupModuleController {
*/
protected $simUser = '';
/**
* The name of the module
*
* @var string
*/
protected $moduleName = 'user_setup';
/**
* Instantiate the form protection before a simulated user is initialized.
*/
......@@ -277,11 +279,10 @@ class SetupModuleController {
*/
public function init() {
$GLOBALS['LANG']->includeLLFile('EXT:setup/mod/locallang.xlf');
$this->MCONF = $GLOBALS['MCONF'];
// Returns the script user - that is the REAL logged in user! ($GLOBALS[BE_USER] might be another user due to simulation!)
$scriptUser = $this->getRealScriptUserObj();
// ... and checking module access for the logged in user.
$scriptUser->modAccess($this->MCONF, 1);
$this->isAdmin = $scriptUser->isAdmin();
// Getting the 'override' values as set might be set in User TSconfig
$this->overrideConf = $GLOBALS['BE_USER']->getTSConfigProp('setup.override');
......@@ -420,7 +421,7 @@ class SetupModuleController {
$buttons['csh'] = BackendUtility::cshItem('_MOD_user_setup', '');
$buttons['save'] = \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-save', array('html' => '<input type="image" name="data[save]" class="c-inputButton" src="clear.gif" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:rm.saveDoc', TRUE) . '" />'));
if ($GLOBALS['BE_USER']->mayMakeShortcut()) {
$buttons['shortcut'] = $this->doc->makeShortcutIcon('', '', $this->MCONF['name']);
$buttons['shortcut'] = $this->doc->makeShortcutIcon('', '', $this->moduleName);
}
return $buttons;
}
......
......@@ -6,7 +6,18 @@ if (TYPO3_MODE === 'BE') {
'user',
'setup',
'after:task',
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'mod/'
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'mod/',
array(
'script' => '_DISPATCH',
'access' => 'group,user',
'name' => 'user_setup',
'labels' => array(
'tabs_images' => array(
'tab' => '../Resources/Public/Icons/module-setup.png',
),
'll_ref' => 'LLL:EXT:setup/mod/locallang_mod.xlf',
),
)
);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr(
'_MOD_user_setup',
......
<?php
$MCONF['script'] = '_DISPATCH';
$MLANG['default']['tabs_images']['tab'] = '../Resources/Public/Icons/module-setup.png';
$MLANG['default']['ll_ref'] = 'LLL:EXT:setup/mod/locallang_mod.xlf';
$MCONF['access'] = 'group,user';
$MCONF['name'] = 'user_setup';
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment