From 043cf8bab75d8726d4c1b339a3ff0dd2627dfc44 Mon Sep 17 00:00:00 2001 From: Sam Hemelryk Date: Mon, 7 Apr 2014 15:56:40 +1200 Subject: [PATCH] MDL-44974 admin: repositioned call to initialise renderer --- admin/index.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/admin/index.php b/admin/index.php index 4947c5e381a..aaa530a2fe3 100644 --- a/admin/index.php +++ b/admin/index.php @@ -378,9 +378,6 @@ if (!$cache and moodle_needs_upgrading()) { if (!$PAGE->headerprinted) { // means core upgrade or installation was not already done - /** @var core_admin_renderer $output */ - $output = $PAGE->get_renderer('core', 'admin'); - if (!$confirmplugins) { $strplugincheck = get_string('plugincheck'); @@ -398,6 +395,9 @@ if (!$cache and moodle_needs_upgrading()) { redirect($PAGE->url); } + /** @var core_admin_renderer $output */ + $output = $PAGE->get_renderer('core', 'admin'); + $deployer = \core\update\deployer::instance(); if ($deployer->enabled()) { $deployer->initialize($PAGE->url, $PAGE->url); @@ -421,6 +421,8 @@ if (!$cache and moodle_needs_upgrading()) { // Make sure plugin dependencies are always checked. $failed = array(); if (!core_plugin_manager::instance()->all_plugins_ok($version, $failed)) { + /** @var core_admin_renderer $output */ + $output = $PAGE->get_renderer('core', 'admin'); $reloadurl = new moodle_url('/admin/index.php', array('cache' => 0)); echo $output->unsatisfied_dependencies_page($version, $failed, $reloadurl); die();