Skip to content
Snippets Groups Projects
Commit 4f708321 authored by Michael Hamann's avatar Michael Hamann
Browse files

Remove global $Indexer, clear index in the testing system instead

parent 3cf3c7d6
No related branches found
No related tags found
No related merge requests found
......@@ -30,6 +30,8 @@ abstract class DokuWikiTest extends PHPUnit_Framework_TestCase {
// remove any leftovers from the last run
if(is_dir(DOKU_TMP_DATA)){
// clear indexer data and cache
idx_get_indexer()->clear();
TestUtils::rdelete(DOKU_TMP_DATA);
}
......
......@@ -1228,7 +1228,7 @@ class Doku_Indexer {
* @author Tom N Harris <tnharris@whoopdedo.org>
*/
function idx_get_indexer() {
global $Indexer;
static $Indexer;
if (!isset($Indexer)) {
$Indexer = new Doku_Indexer();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment