From: Petr Skoda Date: Wed, 13 Jan 2010 11:25:15 +0000 (+0000) Subject: more eclipse autocompletion fixes X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=d5fac1cfd41225eaaeefddc7dd0939aea26b4420;p=moodle.git more eclipse autocompletion fixes --- diff --git a/lib/setup.php b/lib/setup.php index a7fc4e717e..1d4fdab738 100644 --- a/lib/setup.php +++ b/lib/setup.php @@ -231,11 +231,6 @@ init_performance_info(); // Put $OUTPUT in place, so errors can be displayed. $OUTPUT = new bootstrap_renderer(); -if (false) { - // this is a funny trick to make Eclipse believe that $OUTPUT contains - // aninstance of core_renderer which in turn fixes autocompletion ;-) - $OUTPUT = new core_renderer(null, null); -} // set handler for uncaught exceptions - equivalent to print_error() call set_exception_handler('default_exception_handler'); @@ -712,3 +707,13 @@ if (!empty($CFG->allowbeforeblock)) { // allowed list processed before blocked l // note: we can not block non utf-8 installations here, because empty mysql database // might be converted to utf-8 in admin/index.php during installation + + + +// this is a funny trick to make Eclipse believe that $OUTPUT and other globals +// contains an instance of core_renderer, etc. which in turn fixes autocompletion ;-) +if (false) { + $DB = new moodle_database(); + $OUTPUT = new core_renderer(null, null); + $PAGE = new moodle_page(); +}