mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
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:
parent
7c03f7364b
commit
dd0dbddb4b
@ -155,14 +155,15 @@ class Director {
|
|||||||
// These are needed so that calling Director::test() doesnt muck with whoever is calling it.
|
// 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
|
// Really, it's some inapproriate coupling and should be resolved by making less use of statics
|
||||||
$oldStage = Versioned::current_stage();
|
$oldStage = Versioned::current_stage();
|
||||||
|
$getVars = array();
|
||||||
|
|
||||||
if(!$httpMethod) $httpMethod = ($postVars || is_array($postVars)) ? "POST" : "GET";
|
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);
|
list($url, $getVarsEncoded) = explode('?', $url, 2);
|
||||||
parse_str($getVarsEncoded, $getVars);
|
parse_str($getVarsEncoded, $getVars);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!$session) $session = new Session(null);
|
if(!$session) $session = new Session(null);
|
||||||
|
|
||||||
// Back up the current values of the superglobals
|
// Back up the current values of the superglobals
|
||||||
|
Loading…
x
Reference in New Issue
Block a user