From a57e3d3b1ff79d7080ec766d90de94be700bda1a Mon Sep 17 00:00:00 2001 From: Dan Poltawski Date: Tue, 4 Oct 2016 18:09:41 +0100 Subject: [PATCH] MDL-56011 lib: move Mustache loading to core_component autoloader --- lib/classes/component.php | 3 ++- lib/outputrenderers.php | 3 --- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/classes/component.php b/lib/classes/component.php index 2f94e480e73..226aa3b45a6 100644 --- a/lib/classes/component.php +++ b/lib/classes/component.php @@ -69,7 +69,8 @@ class core_component { protected static $filestomap = array('lib.php', 'settings.php'); /** @var array associative array of PSR-0 namespaces and corresponding paths. */ protected static $psr0namespaces = array( - 'Horde' => 'lib/horde/framework/Horde' + 'Horde' => 'lib/horde/framework/Horde', + 'Mustache' => 'lib/mustache/src/Mustache', ); /** @var array associative array of PRS-4 namespaces and corresponding paths. */ protected static $psr4namespaces = array( diff --git a/lib/outputrenderers.php b/lib/outputrenderers.php index 59e7ec8773d..fc95c5d5eb2 100644 --- a/lib/outputrenderers.php +++ b/lib/outputrenderers.php @@ -81,9 +81,6 @@ class renderer_base { global $CFG; if ($this->mustache === null) { - require_once($CFG->dirroot . '/lib/mustache/src/Mustache/Autoloader.php'); - Mustache_Autoloader::register(); - $themename = $this->page->theme->name; $themerev = theme_get_revision();