* Fixed bug where DB mounts for a user which has been deleted would still show up...
authorKasper Skårhøj <kasper@typo3.org>
Mon, 26 Apr 2004 15:10:13 +0000 (15:10 +0000)
committerKasper Skårhøj <kasper@typo3.org>
Mon, 26 Apr 2004 15:10:13 +0000 (15:10 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@239 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_treeview.php
t3lib/class.t3lib_userauthgroup.php
typo3/init.php

index c5014f1..69dfbb6 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2004-04-26  Kasper Skårhøj,,,  <kasper@typo3.com>
 
+       * Fixed bug where DB mounts for a user which has been deleted would still show up in the page tree.
+
+2004-04-26  Kasper Skårhøj,,,  <kasper@typo3.com>
+
        * Fixed bug with pageNotFound handling.
 
 2004-04-26  Kasper Skårhøj,,,  <kasper@typo3.com>
index a47c762..702fae2 100755 (executable)
@@ -371,27 +371,29 @@ class t3lib_treeView {
 
                                // Preparing rootRec for the mount
                        if ($uid)       {
-                               $rootRec=$this->getRecord($uid);
+                               $rootRec = $this->getRecord($uid);
                                $firstHtml.=$this->getIcon($rootRec);
                        } else {
                                        // Artificial record for the tree root, id=0
-                               $rootRec=$this->getRootRecord($uid);
+                               $rootRec = $this->getRootRecord($uid);
                                $firstHtml.=$this->getRootIcon($rootRec);
                        }
 
-                               // Add the root of the mount to ->tree
-                       $this->tree[]=array('HTML'=>$firstHtml,'row'=>$rootRec,'bank'=>$this->bank);
+                       if (is_array($rootRec)) {
+                                       // Add the root of the mount to ->tree
+                               $this->tree[]=array('HTML'=>$firstHtml,'row'=>$rootRec,'bank'=>$this->bank);
 
-                               // If the mount is expanded, go down:
-                       if ($isOpen)    {
-                                       // Set depth:
-                               $depthD='<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/ol/blank.gif','width="18" height="16"').' alt="" />';
-                               if ($this->addSelfId)   $this->ids[] = $uid;
-                               $this->getTree($uid,999,$depthD);
-                       }
+                                       // If the mount is expanded, go down:
+                               if ($isOpen)    {
+                                               // Set depth:
+                                       $depthD='<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/ol/blank.gif','width="18" height="16"').' alt="" />';
+                                       if ($this->addSelfId)   $this->ids[] = $uid;
+                                       $this->getTree($uid,999,$depthD);
+                               }
 
-                               // Add tree:
-                       $treeArr=array_merge($treeArr,$this->tree);
+                                       // Add tree:
+                               $treeArr=array_merge($treeArr,$this->tree);
+                       }
                }
                return $this->printTree($treeArr);
        }
index 7f6277d..5c763da 100755 (executable)
@@ -483,6 +483,7 @@ class t3lib_userAuthGroup extends t3lib_userAuth {
        /**
         * Returns an array with the webmounts.
         * If no webmounts, and empty array is returned.
+        * NOTICE: Deleted pages WILL NOT be filtered out! So if a mounted page has been deleted it is STILL coming out as a webmount. This is not checked due to performance.
         *
         * @return      array
         */
index 628467b..f0ba660 100755 (executable)
@@ -275,7 +275,7 @@ $BE_USER->backendCheckLogin();      // Checking if there's a user logged in
 $BE_USER->trackBeUser($TYPO3_CONF_VARS['BE']['trackBeUser']);  // Tracking backend user script hits
 
        // Setting the web- and filemount global vars:
-$WEBMOUNTS = $BE_USER->returnWebmounts();
+$WEBMOUNTS = $BE_USER->returnWebmounts();              // ! WILL INCLUDE deleted mount pages as well!
 $FILEMOUNTS = $BE_USER->returnFilemounts();
 
 // ****************