mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Allow flush=1 to be added as 2nd argument to cli-script.
Removed code that used 2nd arg as HTTP_HOST value, in favour of more robust $_FILE_TO_URL_MAPPING git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@60579 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
128e5e4a05
commit
0e0fc7a1cb
@ -15,7 +15,10 @@ if(isset($_SERVER['HTTP_HOST'])) {
|
||||
* @subpackage core
|
||||
*/
|
||||
|
||||
if(isset($_SERVER['argv'][2])) $_SERVER['HTTP_HOST'] = $_SERVER['argv'][2];
|
||||
if(isset($_SERVER['argv'][2])) {
|
||||
parse_str($_SERVER['argv'][2], $_GET);
|
||||
$_REQUEST = $_GET;
|
||||
}
|
||||
|
||||
$_SERVER['SCRIPT_FILENAME'] = __FILE__;
|
||||
chdir(dirname($_SERVER['SCRIPT_FILENAME']));
|
||||
@ -119,11 +122,6 @@ DB::connect($databaseConfig);
|
||||
$url = $_SERVER['argv'][1];
|
||||
$_SERVER['REQUEST_URI'] = "/$url";
|
||||
|
||||
if(isset($_SERVER['argv'][2])) {
|
||||
parse_str($_SERVER['argv'][2], $_GET);
|
||||
$_REQUEST = $_GET;
|
||||
}
|
||||
|
||||
// Direct away - this is the "main" function, that hands control to the apporopriate controllerx
|
||||
Director::direct($url);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user