mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-09-30 13:19:11 +02:00
Merge pull request #4428 from Firesphere/3.2
Declare the global mapping
This commit is contained in:
commit
c895797ccf
@ -122,6 +122,7 @@ if(!defined('TRUSTED_PROXY')) {
|
|||||||
*/
|
*/
|
||||||
if(!isset($_SERVER['HTTP_HOST'])) {
|
if(!isset($_SERVER['HTTP_HOST'])) {
|
||||||
// HTTP_HOST, REQUEST_PORT, SCRIPT_NAME, and PHP_SELF
|
// HTTP_HOST, REQUEST_PORT, SCRIPT_NAME, and PHP_SELF
|
||||||
|
global $_FILE_TO_URL_MAPPING;
|
||||||
if(isset($_FILE_TO_URL_MAPPING)) {
|
if(isset($_FILE_TO_URL_MAPPING)) {
|
||||||
$fullPath = $testPath = realpath($_SERVER['SCRIPT_FILENAME']);
|
$fullPath = $testPath = realpath($_SERVER['SCRIPT_FILENAME']);
|
||||||
while($testPath && $testPath != '/' && !preg_match('/^[A-Z]:\\\\$/', $testPath)) {
|
while($testPath && $testPath != '/' && !preg_match('/^[A-Z]:\\\\$/', $testPath)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user