Project

General

Profile

Actions

Bug #21185

closed

Setting default values for $BE_USER->uc doesn't work for multi-dimensional arrays

Added by Steffen Gebert about 15 years ago. Updated over 14 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2009-10-04
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.3
PHP Version:
5.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

You can set default values for $BE_USER->uc using
a) $TYPO3_CONF_VARS['BE']['defaultUC']
b) setup.default in UserTS

(merged in t3lib_beUserAuth: $this->uc = array_merge($this->uc_default, (array)$TYPO3_CONF_VARS['BE']['defaultUC'], (array)$this->getTSConfigProp('setup.default')))

Using TS has one major problem:
Imagine, you want to enable "Extended view" (a.k.a. bigControlPanel setting of web_list module) by default. So you set the following:
setup.default.moduleData.web_list.bigControlPanel = 1

In good old TS manner, this results in
array(moduleData. => array(web_list. => array(bigControlPanel => 1)))
instead of
array(moduleData => array(web_list => array(bigControlPanel => 1)))
which would be expected to merge into the other arrays (mind the dots!).

So before merging, the array $this->getTSConfigProp('setup.default') has to be cleaned up (remove all trailing dots).

(issue imported from #M12113)


Files

12113.diff (755 Bytes) 12113.diff Administrator Admin, 2009-10-09 21:44
Actions

Also available in: Atom PDF