From 1dadfe15f29410eeacb69c067c54753dc34dc42c Mon Sep 17 00:00:00 2001 From: Petr Skoda Date: Sat, 28 Aug 2010 12:20:09 +0000 Subject: [PATCH] MDL-23979 switching CFG->dirroot is a really bad idea, I borked this test when adding context parameter, but I am not going to fix it because moodle core functions can not work properly if you change dirroot on the fly, sorry; proper way would be to tweak the test class to use different direcotry --- .../{testfiltermanager.php => broken_testfiltermanager.php} | 3 +++ 1 file changed, 3 insertions(+) rename lib/simpletest/{testfiltermanager.php => broken_testfiltermanager.php} (95%) diff --git a/lib/simpletest/testfiltermanager.php b/lib/simpletest/broken_testfiltermanager.php similarity index 95% rename from lib/simpletest/testfiltermanager.php rename to lib/simpletest/broken_testfiltermanager.php index 3979d9ab418..c68129bddc3 100644 --- a/lib/simpletest/testfiltermanager.php +++ b/lib/simpletest/broken_testfiltermanager.php @@ -35,6 +35,9 @@ if (!defined('MOODLE_INTERNAL')) { die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page } +//TODO: messing with CFG->dirroot is a really bad idea! I am not going to fix this, sorry. (skodak) +// if anybody wants to fix this then filter manager has to be modified so that it uses different dir, sorry + require_once($CFG->libdir . '/filterlib.php'); class testable_filter_manager extends filter_manager { -- 2.43.0