Fixed bug #14217: options.pageTree.showPageIdWithTitle doesn't work in record picker...
authorBenni Mack <benni.mack@typo3.org>
Thu, 6 May 2010 16:37:09 +0000 (16:37 +0000)
committerBenni Mack <benni.mack@typo3.org>
Thu, 6 May 2010 16:37:09 +0000 (16:37 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@7545 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/class.browse_links.php
typo3/sysext/rtehtmlarea/mod3/class.tx_rtehtmlarea_browse_links.php

index 489d2c0..c577d63 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-05-06  Benjamin Mack  <benni@typo3.org>
+
+       * Fixed bug #14217: options.pageTree.showPageIdWithTitle doesn't work in record picker and RTE (Thanks to Reinhard Fuehricht)
+
 2010-05-06  Susanne Moog  <typo3@susanne-moog.de>
 
        * Fixed bug #14185: The tt_content.fe_groups field is not placed under the Access Tab (Thanks to Peter Klein & Lars Houmark)
index cfa95a6..5584435 100644 (file)
@@ -238,6 +238,12 @@ class TBE_browser_recordList extends localRecordList {
 class localPageTree extends t3lib_browseTree {
 
        /**
+        * whether the page ID should be shown next to the title, activate through userTSconfig (options.pageTree.showPageIdWithTitle)
+        * @boolean
+        */
+       public $ext_showPageId = FALSE;
+
+       /**
         * Constructor. Just calling init()
         *
         * @return      void
@@ -355,8 +361,12 @@ class localPageTree extends t3lib_browseTree {
         * @param       array           The row for the current element
         * @return      string          The processed icon input value.
         */
-       function wrapIcon($icon,$row)   {
-               return $this->addTagAttributes($icon,' title="id='.$row['uid'].'"');
+       function wrapIcon($icon, $row) {
+               $content = $this->addTagAttributes($icon, ' title="id=' . $row['uid'] . '"');
+               if ($this->ext_showPageId) {
+                       $content .= '[' . $row['uid'] . ']&nbsp;';
+               }
+               return $content;
        }
 }
 
@@ -1411,6 +1421,7 @@ class browse_links {
                        case 'page':
                                $pagetree = t3lib_div::makeInstance('rtePageTree');
                                $pagetree->thisScript = $this->thisScript;
+                               $pagetree->ext_showPageId = $GLOBALS['BE_USER']->getTSConfigVal('options.pageTree.showPageIdWithTitle');
                                $tree=$pagetree->getBrowsableTree();
                                $cElements = $this->expandPage();
 
@@ -1573,6 +1584,7 @@ class browse_links {
                $pagetree->thisScript=$this->thisScript;
                $pagetree->ext_pArrPages = !strcmp($pArr[3],'pages')?1:0;
                $pagetree->ext_showNavTitle = $GLOBALS['BE_USER']->getTSConfigVal('options.pageTree.showNavTitle');
+               $pagetree->ext_showPageId = $GLOBALS['BE_USER']->getTSConfigVal('options.pageTree.showPageIdWithTitle');
                $pagetree->addField('nav_title');
                $tree=$pagetree->getBrowsableTree();
 
index 0c1e7c8..e92e73f 100644 (file)
@@ -813,6 +813,7 @@ class tx_rtehtmlarea_browse_links extends browse_links {
 
                                $pagetree = t3lib_div::makeInstance('tx_rtehtmlarea_pageTree');
                                $pagetree->ext_showNavTitle = $GLOBALS['BE_USER']->getTSConfigVal('options.pageTree.showNavTitle');
+                               $pagetree->ext_showPageId = $GLOBALS['BE_USER']->getTSConfigVal('options.pageTree.showPageIdWithTitle');
                                $pagetree->addField('nav_title');
                                $tree=$pagetree->getBrowsableTree();
                                $cElements = $this->expandPage();