Update webroot files to fix an issue in ServerShell.

The previous fixes done in 2918ae9c7a
caused other issues preventing actions from being dispatched properly.

Fixes #3934
This commit is contained in:
mark_story 2013-07-27 17:01:35 -04:00
parent b345a8f180
commit c28cde4e56
2 changed files with 2 additions and 4 deletions

View file

@ -79,8 +79,7 @@ if (!defined('WWW_ROOT')) {
// for built-in server
if (php_sapi_name() == 'cli-server') {
$uri = str_replace($_SERVER['SCRIPT_FILENAME'], WWW_ROOT, '');
if ($_SERVER['REQUEST_URI'] !== '/' && file_exists(WWW_ROOT . $uri)) {
if ($_SERVER['REQUEST_URI'] !== '/' && file_exists(WWW_ROOT . $_SERVER['PHP_SELF'])) {
return false;
}
$_SERVER['PHP_SELF'] = '/' . basename(__FILE__);

View file

@ -79,8 +79,7 @@ if (!defined('WWW_ROOT')) {
// for built-in server
if (php_sapi_name() === 'cli-server') {
$uri = str_replace($_SERVER['SCRIPT_FILENAME'], WWW_ROOT, '');
if ($_SERVER['REQUEST_URI'] !== '/' && file_exists(WWW_ROOT . $uri)) {
if ($_SERVER['REQUEST_URI'] !== '/' && file_exists(WWW_ROOT . $_SERVER['PHP_SELF'])) {
return false;
}
$_SERVER['PHP_SELF'] = '/' . basename(__FILE__);