MDL-56011 lib: move Mustache loading to core_component autoloader

This commit is contained in:
Dan Poltawski 2016-10-04 18:09:41 +01:00
parent 38c1cbceb7
commit a57e3d3b1f
2 changed files with 2 additions and 4 deletions

View file

@ -69,7 +69,8 @@ class core_component {
protected static $filestomap = array('lib.php', 'settings.php'); protected static $filestomap = array('lib.php', 'settings.php');
/** @var array associative array of PSR-0 namespaces and corresponding paths. */ /** @var array associative array of PSR-0 namespaces and corresponding paths. */
protected static $psr0namespaces = array( 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. */ /** @var array associative array of PRS-4 namespaces and corresponding paths. */
protected static $psr4namespaces = array( protected static $psr4namespaces = array(

View file

@ -81,9 +81,6 @@ class renderer_base {
global $CFG; global $CFG;
if ($this->mustache === null) { if ($this->mustache === null) {
require_once($CFG->dirroot . '/lib/mustache/src/Mustache/Autoloader.php');
Mustache_Autoloader::register();
$themename = $this->page->theme->name; $themename = $this->page->theme->name;
$themerev = theme_get_revision(); $themerev = theme_get_revision();