Project

General

Profile

Actions

Bug #58339

closed

Wrong returning from ->extGetFeAdminValue

Added by Gerrit Mohrmann over 10 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
Start date:
2014-04-29
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
no-brainer
Is Regression:
No
Sprint Focus:

Description

$GLOBALS['BE_USER']->adminPanel->extGetFeAdminValue('preview', 'simulateUserGroup');
or
$GLOBALS['BE_USER']->adminPanel->extGetFeAdminValue('preview', 'simulateDate');

returns 1 if they set to 0

In ->extGetFeAdminValue it will return the value from override.preview = 1 if e.g. 'override.preview.simulateUserGroup' is not set, empty or 0

I think asking for 'override.preview.simulateUserGroup' and returning 'override.preview' is a wrong behavior.

admPanel {
    ...
    override.preview = 1
    override.preview.simulateUserGroup = 0
    override.preview.simulateDate = 0
    ...
}

My Reasons for that:
With EXT:simulatebe i have an FE User and BE User online. The Adminpanel is hidden. To Respect the Usergroups from the FE User I have to set simulateUserGroup to False but will have the preview = 1 at the same time.

The same with simulateDate. I show content that depends on $GLOBALS['SIM_EXEC_TIME'] but this is always '1' when I logged in and have editing rights.

Fix: Change

if ($val && $GLOBALS['BE_USER']->extAdminConfig['override.'][$sectionName . '.'][$val]) {

in /typo3/sysext/frontend/Classes/View/AdminPanelView.php to
if ($val && isset($GLOBALS['BE_USER']->extAdminConfig['override.'][$sectionName . '.'][$val])) {

If nothing is set the behavior is like before (so i assume nothing will break), but it returns not '1' if '= ' or '= 0' is set.

This is a bug in older t3cms versions too.


Files

extGetFeAdminValue_Bug.diff (861 Bytes) extGetFeAdminValue_Bug.diff Gerrit Mohrmann, 2014-04-29 18:34
Actions #1

Updated by Gerrit Code Review over 10 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/29730

Actions #2

Updated by Markus Klein over 10 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #3

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF