MINOR: Fixed caching of login page for tests

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98538 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2010-02-09 05:40:19 +00:00
parent 0532bd92ae
commit 4513b0b79f

View File

@ -319,9 +319,8 @@ class Security extends Controller {
$tmpPage = new Page();
$tmpPage->Title = _t('Security.LOGIN', 'Log in');
$tmpPage->URLSegment = "Security";
// 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();
// Disable ID-based caching of the log-in page by making it a random number
$tmpPage->ID = -1 * rand(1,10000000);
$controller = new Page_Controller($tmpPage);
$controller->init();