Fixed bug #10827: Hide "Save and View"-button when editing a content-element
authorSteffen Kamper <info@sk-typo3.de>
Fri, 17 Apr 2009 09:38:13 +0000 (09:38 +0000)
committerSteffen Kamper <info@sk-typo3.de>
Fri, 17 Apr 2009 09:38:13 +0000 (09:38 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@5327 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/alt_doc.php

index 2bc05b4..ae763d6 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2009-04-16  Steffen Kamper  <info@sk-typo3.de>
+
+       * Fixed bug #10827: Hide "Save and View"-button when editing a content-element
+
 2009-04-17  Christian Kuhn  <lolli@schwarzbu.ch>
 
        * Fixed bug #2178: template::getTabMenu doubles ampersands (thanks to Stefano Kowalke)
index bceed0f..fefb767 100644 (file)
@@ -828,7 +828,7 @@ class SC_alt_doc {
                        $buttons['save'] = '<input type="image" class="c-inputButton" name="_savedok"'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/savedok.gif','').' title="'.$LANG->sL('LLL:EXT:lang/locallang_core.php:rm.saveDoc',1).'" />';
 
                                // SAVE / VIEW button:
-                       if ($this->viewId && !$this->noView && t3lib_extMgm::isLoaded('cms')) {
+                       if ($this->viewId && !$this->noView && t3lib_extMgm::isLoaded('cms') && $this->getNewIconMode($this->firstEl['table'], 'saveDocView')) {
                                $buttons['save_view'] = '<input type="image" class="c-inputButton" name="_savedokview"'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/savedokshow.gif','').' title="'.$LANG->sL('LLL:EXT:lang/locallang_core.php:rm.saveDocShow',1).'" />';
                        }
 
@@ -1366,7 +1366,7 @@ class SC_alt_doc {
        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') {
+               if (($key == 'saveDocNew' || $key == 'saveDocView') && $TSconfig['value'] != '0') {
                        $output = !(isset($TSconfig['properties'][$table]) && $TSconfig['properties'][$table] == '0');
                }
                return $output;