Bug #21185
closedSetting default values for $BE_USER->uc doesn't work for multi-dimensional arrays
0%
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
Updated by Oliver Hader about 15 years ago
In t3lib_div there's the function removeDotsFromTS() which does this job. Could you please come up with a patch and a short description how to test it easily? Thanks in advance!
Updated by Steffen Gebert about 15 years ago
Yeah.. really cool to hear. Never imagined that a function like this could exist!
Will provide a patch tonight, I hope.
Updated by Steffen Gebert about 15 years ago
committed to trunk, rev 6172
please close