diff options
author | Michael Hamann <michael@content-space.de> | 2012-12-20 17:47:39 +0100 |
---|---|---|
committer | Michael Hamann <michael@content-space.de> | 2012-12-20 17:47:39 +0100 |
commit | 4f7083212993bf72f0b8969e6d57f587faaa5dfc (patch) | |
tree | b5542aba2a59a24319cbaeea3854506b4f50ed7f | |
parent | 3cf3c7d60c81d562c8331a377a76e86d41f8f528 (diff) | |
download | dokuwiki-4f7083212993bf72f0b8969e6d57f587faaa5dfc.tar.gz dokuwiki-4f7083212993bf72f0b8969e6d57f587faaa5dfc.zip |
Remove global $Indexer, clear index in the testing system instead
-rw-r--r-- | _test/core/DokuWikiTest.php | 2 | ||||
-rw-r--r-- | inc/indexer.php | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/_test/core/DokuWikiTest.php b/_test/core/DokuWikiTest.php index b9e151456..91eb5293b 100644 --- a/_test/core/DokuWikiTest.php +++ b/_test/core/DokuWikiTest.php @@ -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); } diff --git a/inc/indexer.php b/inc/indexer.php index b9eaf31d9..7a62345bf 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -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(); } |