Removing unused code, and adding a realpath() to document_root, so symlinks work a bit better.

This commit is contained in:
mark_story 2011-02-16 21:14:32 -05:00
parent 63caf566fb
commit a95d4acf09

View file

@ -359,8 +359,7 @@ class Dispatcher extends Object {
} }
$this->webroot = $base . '/'; $this->webroot = $base . '/';
$docRoot = env('DOCUMENT_ROOT'); $docRoot = realpath(env('DOCUMENT_ROOT'));
$script = realpath(env('SCRIPT_FILENAME'));
$docRootContainsWebroot = strpos($docRoot, $dir . '/' . $webroot); $docRootContainsWebroot = strpos($docRoot, $dir . '/' . $webroot);
if (!empty($base) || !$docRootContainsWebroot) { if (!empty($base) || !$docRootContainsWebroot) {