Added rootline cache to speed up tree renderings in the BE
authorMartin Kutschker <martin.t.kutschker@blackbox.net>
Tue, 27 Feb 2007 16:45:19 +0000 (16:45 +0000)
committerMartin Kutschker <martin.t.kutschker@blackbox.net>
Tue, 27 Feb 2007 16:45:19 +0000 (16:45 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@2161 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_befunc.php

index 52a2641..b421b8f 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,6 +7,7 @@
 2007-02-27  Martin Kutschker  <martin.t.kutschker@blackbox.net>
 
        * Fixed bug #3666: permissions of versioned pages are not changed in draft workspace (patch by Andreas Wolf)
+       * Added rootline cache to speed up tree renderings in the BE
 
 2007-02-27  Ingo Renner  <typo3@ingo-renner.com>
 
index a3d8d1c..af1ec21 100755 (executable)
@@ -542,6 +542,10 @@ class t3lib_BEfunc {
         * @return      array           Root line array, all the way to the page tree root (or as far as $clause allows!)
         */
        function BEgetRootLine($uid,$clause='',$workspaceOL=FALSE)      {
+               if (is_array($GLOBALS['T3_VAR']['BEgetRootLine_cache'][$uid][$clause][$workspaceOL?1:0]))       {
+                       return $GLOBALS['T3_VAR']['BEgetRootLine_cache'][$uid][$clause][$workspaceOL?1:0];
+               }
+               $pid = $uid;
                $loopCheck = 100;
                $theRowArray = Array();
                $output = Array();
@@ -586,6 +590,7 @@ class t3lib_BEfunc  {
                                $output[$c]['t3ver_stage'] = $val['t3ver_stage'];
                        }
                }
+               $GLOBALS['T3_VAR']['BEgetRootLine_cache'][$pid][$clause][$workspaceOL?1:0] = $output;
 
                return $output;
        }