From ec326f752eec4fc22d12d9210b89be86de178b39 Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Tue, 9 Feb 2010 04:43:14 +0000 Subject: [PATCH] BUGFIX: Make Security/login page's ID give a different number for loggedin vs loggedout, to help with partial caching git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98534 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- security/Security.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/security/Security.php b/security/Security.php index 10e6bc129..3845404ec 100644 --- a/security/Security.php +++ b/security/Security.php @@ -319,7 +319,9 @@ class Security extends Controller { $tmpPage = new Page(); $tmpPage->Title = _t('Security.LOGIN', 'Log in'); $tmpPage->URLSegment = "Security"; - $tmpPage->ID = -1; // Set the page ID to -1 so we dont get the top level pages as its children + // Set the page ID to -1 so we dont get the top level pages as its children + // Set to -2 for logged in people, to help the partial cacher + $tmpPage->ID = -1 - (bool)Member::currentUserID(); $controller = new Page_Controller($tmpPage); $controller->init();