MINOR Code formatting improvements for Director->test()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@67300 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sean Harvey 2008-12-03 10:24:30 +00:00 committed by Sam Minnee
parent 7c03f7364b
commit dd0dbddb4b

View File

@ -155,14 +155,15 @@ class Director {
// These are needed so that calling Director::test() doesnt muck with whoever is calling it.
// Really, it's some inapproriate coupling and should be resolved by making less use of statics
$oldStage = Versioned::current_stage();
$getVars = array();
if(!$httpMethod) $httpMethod = ($postVars || is_array($postVars)) ? "POST" : "GET";
$getVars = array();
if(strpos($url,'?') !== false) {
if(strpos($url, '?') !== false) {
list($url, $getVarsEncoded) = explode('?', $url, 2);
parse_str($getVarsEncoded, $getVars);
parse_str($getVarsEncoded, $getVars);
}
if(!$session) $session = new Session(null);
// Back up the current values of the superglobals