[BUGFIX] ElementInformation now shows a meaningful title-tag 81/36281/2
authorMathias Schreiber <mathias.schreiber@wmdb.de>
Mon, 26 Jan 2015 21:04:05 +0000 (22:04 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Tue, 27 Jan 2015 20:25:22 +0000 (21:25 +0100)
Resolves: #56463
Releases: master
Change-Id: I45cdd102b15aa467461eb6d84b2723675a41898c
Reviewed-on: http://review.typo3.org/36281
Reviewed-by: Michael Oehlhof <typo3@oehlhof.de>
Tested-by: Michael Oehlhof <typo3@oehlhof.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/backend/Classes/Controller/ContentElement/ElementInformationController.php

index 6bb36f3..26d7659 100644 (file)
@@ -94,6 +94,13 @@ class ElementInformationController {
         */
        protected $folderObject;
 
+       /**
+        * The HTML title tag
+        *
+        * @var string
+        */
+       protected $titleTag;
+
        /**
         * Constructor
         */
@@ -224,7 +231,8 @@ class ElementInformationController {
                        $table = $GLOBALS['LANG']->sL($GLOBALS['TCA'][$this->table]['ctrl']['title']);
                        $title = $this->doc->getHeader($this->table, $this->row, $this->pageinfo['_thePath'], 1, array(' ', ''), FALSE);
                }
-
+               // Set HTML title tag
+               $this->titleTag = $table . ': '.strip_tags(BackendUtility::getRecordTitle($this->table, $this->row));
                return '<h1>' .
                                ($table ? '<small>' . $table . '</small><br />' : '') .
                                $title .
@@ -461,7 +469,7 @@ class ElementInformationController {
         * @return void
         */
        public function printContent() {
-               echo $this->doc->startPage('') .
+               echo $this->doc->startPage($this->titleTag) .
                                $this->doc->insertStylesAndJS($this->content) .
                                $this->doc->endPage();
        }