From 037e73a8cbaf1dffa942e23ef30f53b77487bb83 Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Fri, 31 Jul 2009 05:43:47 +0000 Subject: [PATCH] ENHANCEMENT: Dramatically improved performance of large-scale canEdit() and canDelete() checks, so that big sites can be supported in the CMS. git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@83443 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- code/LeftAndMain.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/code/LeftAndMain.php b/code/LeftAndMain.php index e9d057fd..33b30ecd 100644 --- a/code/LeftAndMain.php +++ b/code/LeftAndMain.php @@ -506,6 +506,10 @@ class LeftAndMain extends Controller { // Ensure current page is exposed if($p = $this->currentPage()) $obj->markToExpose($p); + + // NOTE: SiteTree/CMSMain coupling :-( + SiteTree::prepopuplate_permission_cache('edit', $obj->markedNodeIDs()); + SiteTree::prepopuplate_permission_cache('delete', $obj->markedNodeIDs()); // getChildrenAsUL is a flexible and complex way of traversing the tree $titleEval = '