diff options
| author | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-05-01 15:32:59 -0400 |
|---|---|---|
| committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-05-01 15:32:59 -0400 |
| commit | 6dc1997577fab2c366781fd7048144935afa0012 (patch) | |
| tree | 8918d28c7ab4342f0738985e37af1dfc42d0e93a /includes/TemplateParser.php | |
| parent | 150f94f051128f367bc89f6b7e5f57eb2a69fc62 (diff) | |
| parent | fa89acd685cb09cdbe1c64cbb721ec64975bbbc1 (diff) | |
Merge commit 'fa89acd'
# Conflicts:
# .gitignore
# extensions/ArchInterWiki.sql
Diffstat (limited to 'includes/TemplateParser.php')
| -rw-r--r-- | includes/TemplateParser.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/includes/TemplateParser.php b/includes/TemplateParser.php index 3de70fa2..d6b101b2 100644 --- a/includes/TemplateParser.php +++ b/includes/TemplateParser.php @@ -103,7 +103,7 @@ class TemplateParser { // See if the compiled PHP code is stored in cache. // CACHE_ACCEL throws an exception if no suitable object cache is present, so fall // back to CACHE_ANYTHING. - $cache = ObjectCache::newAccelerator( array(), CACHE_ANYTHING ); + $cache = ObjectCache::newAccelerator( CACHE_ANYTHING ); $key = wfMemcKey( 'template', $templateName, $fastHash ); $code = $this->forceRecompile ? null : $cache->get( $key ); @@ -130,7 +130,8 @@ class TemplateParser { if ( !is_callable( $renderer ) ) { throw new RuntimeException( "Requested template, {$templateName}, is not callable" ); } - return $this->renderers[$templateName] = $renderer; + $this->renderers[$templateName] = $renderer; + return $renderer; } /** @@ -172,7 +173,9 @@ class TemplateParser { array( // Do not add more flags here without discussion. // If you do add more flags, be sure to update unit tests as well. - 'flags' => LightnCandy::FLAG_ERROR_EXCEPTION + 'flags' => LightnCandy::FLAG_ERROR_EXCEPTION, + 'basedir' => $this->templateDir, + 'fileext' => '.mustache', ) ); } |
