From: Dmitry Dulepov Date: Mon, 18 Aug 2008 15:55:40 +0000 (+0000) Subject: Fixed bug #9183: saveDocNew for all tables except the option is set to 0 X-Git-Tag: TYPO3_4-3-0alpha1~255 X-Git-Url: http://git.typo3.org/Packages/TYPO3.CMS.git/commitdiff_plain/6a14a701ab5d98f020c673b5bc81075c4dcfcbdd Fixed bug #9183: saveDocNew for all tables except the option is set to 0 git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@3994 709f56b5-9817-0410-a4d7-c38de5d9e867 --- diff --git a/ChangeLog b/ChangeLog index 9f85a985398a..a6451efc28ff 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,7 @@ * Fixed bug #7921: recursive pidInList for select in cObj CONTENT (thanks to Georg Ringer) * Fixed bug #9141: Update Wizard uses wrong scheme to write compat_version to localconf.php * Fixed bug #9152: Deprecated code into stdgraphic + * Fixed bug #9183: saveDocNew for all tables except the option is set to 0 2008-08-16 Stanislas Rolland diff --git a/typo3/alt_doc.php b/typo3/alt_doc.php index 78f93cd1d65a..9e781b6824d0 100755 --- a/typo3/alt_doc.php +++ b/typo3/alt_doc.php @@ -1362,10 +1362,12 @@ class SC_alt_doc { * @param string The option for look for. Default is checking if the saveDocNew button should be displayed. * @return string Return value fetched from USER TSconfig */ - function getNewIconMode($table,$key='saveDocNew') { - global $BE_USER; - $TSconfig = $BE_USER->getTSConfig('options.'.$key); + function getNewIconMode($table, $key = 'saveDocNew') { + $TSconfig = $GLOBALS['BE_USER']->getTSConfig('options.'.$key); $output = trim(isset($TSconfig['properties'][$table]) ? $TSconfig['properties'][$table] : $TSconfig['value']); + if ($key == 'saveDocNew' && $TSconfig['value'] != '0') { + $output = !(isset($TSconfig['properties'][$table]) && $TSconfig['properties'][$table] == '0'); + } return $output; } diff --git a/typo3/sysext/cms/ext_localconf.php b/typo3/sysext/cms/ext_localconf.php index 331a55de2cbd..11d515133c58 100755 --- a/typo3/sysext/cms/ext_localconf.php +++ b/typo3/sysext/cms/ext_localconf.php @@ -2,6 +2,11 @@ # TYPO3 SVN ID: $Id$ if (!defined ('TYPO3_MODE')) die ('Access denied.'); +t3lib_extMgm::addUserTSConfig(' + options.saveDocNew.pages = 0 + options.saveDocNew.pages_language_overlay = 0 +'); + $TYPO3_CONF_VARS['SYS']['contentTable'] = 'tt_content'; $TYPO3_CONF_VARS['FE']['eID_include']['tx_cms_showpic'] = 'EXT:cms/tslib/showpic.php';