fix global environment during test requests

This commit is contained in:
Andreas Gohr 2014-12-17 13:14:02 +01:00
parent 59cf47bd6e
commit 90394abd2d
2 changed files with 5 additions and 2 deletions

View File

@ -45,8 +45,6 @@ class TestRequest {
*/
public function execute($uri='/doku.php') {
global $INPUT;
global $ID;
global $INFO;
// save old environment
$server = $_SERVER;

View File

@ -15,6 +15,11 @@ $updateVersion = 47;
if(!defined('DOKU_INC')) define('DOKU_INC', dirname(__FILE__).'/');
// define all DokuWiki globals here (needed within test requests but also helps to keep track)
global $ACT, $INPUT, $QUERY, $ID, $REV, $DATE_AT, $IDX,
$DATE, $RANGE, $HIGH, $TEXT, $PRE, $SUF, $SUM, $INFO, $JSINFO;
if(isset($_SERVER['HTTP_X_DOKUWIKI_DO'])) {
$ACT = trim(strtolower($_SERVER['HTTP_X_DOKUWIKI_DO']));
} elseif(!empty($_REQUEST['idx'])) {