Fixed bug #12700: pageInfo shows wrong info on root page
authorSteffen Kamper <info@sk-typo3.de>
Tue, 24 Nov 2009 08:59:16 +0000 (08:59 +0000)
committerSteffen Kamper <info@sk-typo3.de>
Tue, 24 Nov 2009 08:59:16 +0000 (08:59 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@6504 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/template.php

index 1a015d1..d7a2c72 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2009-11-24  Steffen Kamper  <info@sk-typo3.de>
+
+       * Fixed bug #12700: pageInfo shows wrong info on root page
+
 2009-11-24  Francois Suter  <francois@typo3.org>
 
        * Fixed bug #12695: Added some space between sections of the "Installed services" report
index 06b2605..80fa059 100644 (file)
@@ -2019,6 +2019,7 @@ $str.=$this->docBodyTagBegin().
                        $iconImg = t3lib_iconWorks::getIconImage('pages', $pageRecord, $this->backPath, 'class="absmiddle" title="'. htmlspecialchars($alttext) . '"');
                                // Make Icon:
                        $theIcon = $GLOBALS['SOBE']->doc->wrapClickMenuOnIcon($iconImg, 'pages', $pageRecord['uid']);
+                       $pid = $pageRecord['uid'];
                } else {        // On root-level of page tree
                                // Make Icon
                        $iconImg = '<img' . t3lib_iconWorks::skinImg($this->backPath, 'gfx/i/_icon_website.gif') . ' alt="' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'] . '" />';
@@ -2027,10 +2028,11 @@ $str.=$this->docBodyTagBegin().
                        } else {
                                $theIcon = $iconImg;
                        }
+                       $pid = '0 (root)';
                }
 
                        // Setting icon with clickmenu + uid
-               $pageInfo = $theIcon . '<em>[pid: ' . $pageRecord['uid'] . ']</em>';
+               $pageInfo = $theIcon . '<em>[pid: ' . $pid . ']</em>';
                return $pageInfo;
        }