Fixed bug #10947: It's not possible to add buttons to docheader (added hook in templa...
authorSteffen Kamper <info@sk-typo3.de>
Wed, 22 Apr 2009 20:29:07 +0000 (20:29 +0000)
committerSteffen Kamper <info@sk-typo3.de>
Wed, 22 Apr 2009 20:29:07 +0000 (20:29 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@5344 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/template.php

index 53345b9..858bf54 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2009-04-22  Steffen Kamper  <info@sk-typo3.de>
+
+       * Fixed bug #10947: It's not possible to add buttons to docheader (added hook in template.php)
+
 2009-04-22  Patrick Broens  <patrick@patrickbroens.nl>
 
        * Fixed bug #10948: Validation issues in typo3/alt_db_navframe.php
 2009-04-22  Patrick Broens  <patrick@patrickbroens.nl>
 
        * Fixed bug #10948: Validation issues in typo3/alt_db_navframe.php
index 1d3f5f8..c00502a 100644 (file)
@@ -1903,6 +1903,19 @@ $str.=$this->docBodyTagBegin().
                                // replace the marker with the template and remove all line breaks (for IE compat)
                        $markers['BUTTONLIST_' . strtoupper($key)] = str_replace("\n", '', $buttonTemplate);
                }
                                // replace the marker with the template and remove all line breaks (for IE compat)
                        $markers['BUTTONLIST_' . strtoupper($key)] = str_replace("\n", '', $buttonTemplate);
                }
+               
+                       // Hook for manipulating docHeaderButtons
+               if (isset($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/template.php']['docHeaderButtonsHook'])) {
+                       $params = array(
+                               'buttons'       => $buttons,
+                               'markers'       => &$markers,
+                               'pObj'          => &$this
+                       );
+                       foreach($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/template.php']['docHeaderButtonsHook'] as $funcRef)    {
+                               t3lib_div::callUserFunction($funcRef, $params, $this);
+                       }
+               }
+
                return $markers;
        }
 
                return $markers;
        }