Fixed bug #17457: Pagetree - User Mount Points are always expanded
authorsgalinsk <sgalinsk@709f56b5-9817-0410-a4d7-c38de5d9e867>
Tue, 22 Feb 2011 22:46:43 +0000 (22:46 +0000)
committersgalinsk <sgalinsk@709f56b5-9817-0410-a4d7-c38de5d9e867>
Tue, 22 Feb 2011 22:46:43 +0000 (22:46 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@10565 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/tree/pagetree/class.t3lib_tree_pagetree_dataprovider.php

index f24f6d6..189a23c 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,6 +7,7 @@
        * Fixed bug #17483: GifBuilder - meaningfulTempFilePrefix can cause invalid image urls
        * Fixed bug #17531: htmlMail - Can't send mails on port based systems with Swiftmailer substitution
        * Fixed bug #17452: options.hideRecords.pages is ignored in page tree (Thanks to Andreas Kiessling)
+       * Fixed bug #17457: Pagetree - User Mount Points are always expanded
 
 2011-02-22  Christian Kuhn  <lolli@schwarzbu.ch>
 
index b88f4c7..670fb41 100644 (file)
@@ -253,7 +253,6 @@ class t3lib_tree_pagetree_DataProvider extends t3lib_tree_AbstractDataProvider {
                }
 
                $showRootlineAboveMounts = $GLOBALS['BE_USER']->getTSConfigVal('options.pageTree.showPathAboveMounts');
-               $class = (count($mountPoints) <= 1 ? 'typo3-pagetree-node-notExpandable' : '');
                foreach ($mountPoints as $mountPoint) {
                        if ($mountPoint === 0) {
                                $sitename = 'TYPO3';
@@ -285,11 +284,14 @@ class t3lib_tree_pagetree_DataProvider extends t3lib_tree_AbstractDataProvider {
                                }
                        }
 
+                       if (count($mountPoints) <= 1) {
+                               $subNode->setExpanded(TRUE);
+                               $subNode->setCls('typo3-pagetree-node-notExpandable');
+                       }
+
                        $subNode->setIsMountPoint(TRUE);
-                       $subNode->setExpanded(TRUE);
                        $subNode->setDraggable(FALSE);
                        $subNode->setIsDropTarget(FALSE);
-                       $subNode->setCls($class);
 
                        if ($searchFilter === '') {
                                $childNodes = $this->getNodes($subNode, $mountPoint);