Fixed bug #9183: saveDocNew for all tables except the option is set to 0
authorDmitry Dulepov <dmitry.dulepov@gmail.com>
Mon, 18 Aug 2008 15:55:40 +0000 (15:55 +0000)
committerDmitry Dulepov <dmitry.dulepov@gmail.com>
Mon, 18 Aug 2008 15:55:40 +0000 (15:55 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@3994 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/alt_doc.php
typo3/sysext/cms/ext_localconf.php

index 9f85a98..a6451ef 100755 (executable)
--- 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  <typo3@sjbr.ca>
 
index 78f93cd..9e781b6 100755 (executable)
@@ -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;
        }
 
index 331a55d..11d5151 100755 (executable)
@@ -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';