diff options
author | Andreas Gohr <gohr@cosmocode.de> | 2014-12-17 13:14:02 +0100 |
---|---|---|
committer | Andreas Gohr <gohr@cosmocode.de> | 2014-12-17 13:14:02 +0100 |
commit | 90394abd2d0fc66a994a3f81c76e265d0707b351 (patch) | |
tree | 6567a5f6bfce47bfed8e64c15a4ddb04e40d4f24 | |
parent | 59cf47bd6e911707e894a1700828278bc8a6239a (diff) | |
download | rpg-90394abd2d0fc66a994a3f81c76e265d0707b351.tar.gz rpg-90394abd2d0fc66a994a3f81c76e265d0707b351.tar.bz2 |
fix global environment during test requests
-rw-r--r-- | _test/core/TestRequest.php | 2 | ||||
-rw-r--r-- | doku.php | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/_test/core/TestRequest.php b/_test/core/TestRequest.php index 060e37d28..dad2060e5 100644 --- a/_test/core/TestRequest.php +++ b/_test/core/TestRequest.php @@ -45,8 +45,6 @@ class TestRequest { */ public function execute($uri='/doku.php') { global $INPUT; - global $ID; - global $INFO; // save old environment $server = $_SERVER; @@ -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'])) { |