Declare global usage in common.php so setup works right when called from phpunit tests

We end up running the tests through a function in PHPUnit, so we don't have automatic global scope at the top level of files all the time...
This commit is contained in:
Brion Vibber 2009-11-17 16:24:48 -08:00
parent 2c2861b867
commit 63ebb033bf
1 changed files with 3 additions and 0 deletions

View File

@ -83,6 +83,9 @@ function _sn_to_path($sn)
return $p;
}
// Save our sanity when code gets loaded through subroutines such as PHPUnit tests
global $default, $config, $_server, $_path;
// try to figure out where we are. $server and $path
// can be set by including module, else we guess based
// on HTTP info.