dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "rdbms: inject reserved word table name rewrite logic into DatabaseOracle"
[lhc/web/wiklou.git]
/
includes
/
TemplateParser.php
diff --git
a/includes/TemplateParser.php
b/includes/TemplateParser.php
index
4210a96
..
fd856be
100644
(file)
--- a/
includes/TemplateParser.php
+++ b/
includes/TemplateParser.php
@@
-41,9
+41,7
@@
class TemplateParser {
/**
* @var int Compilation flags passed to LightnCandy
*/
/**
* @var int Compilation flags passed to LightnCandy
*/
- // Do not add more flags here without discussion.
- // If you do add more flags, be sure to update unit tests as well.
- protected $compileFlags = LightnCandy::FLAG_ERROR_EXCEPTION;
+ protected $compileFlags;
/**
* @param string|null $templateDir
/**
* @param string|null $templateDir
@@
-52,6
+50,10
@@
class TemplateParser {
public function __construct( $templateDir = null, $forceRecompile = false ) {
$this->templateDir = $templateDir ?: __DIR__ . '/templates';
$this->forceRecompile = $forceRecompile;
public function __construct( $templateDir = null, $forceRecompile = false ) {
$this->templateDir = $templateDir ?: __DIR__ . '/templates';
$this->forceRecompile = $forceRecompile;
+
+ // Do not add more flags here without discussion.
+ // If you do add more flags, be sure to update unit tests as well.
+ $this->compileFlags = LightnCandy::FLAG_ERROR_EXCEPTION | LightnCandy::FLAG_MUSTACHELOOKUP;
}
/**
}
/**
@@
-60,9
+62,9
@@
class TemplateParser {
*/
public function enableRecursivePartials( $enable ) {
if ( $enable ) {
*/
public function enableRecursivePartials( $enable ) {
if ( $enable ) {
- $this->compileFlags
= $this->compileFlags |
LightnCandy::FLAG_RUNTIMEPARTIAL;
+ $this->compileFlags
|=
LightnCandy::FLAG_RUNTIMEPARTIAL;
} else {
} else {
- $this->compileFlags
= $this->compileFlags &
~LightnCandy::FLAG_RUNTIMEPARTIAL;
+ $this->compileFlags
&=
~LightnCandy::FLAG_RUNTIMEPARTIAL;
}
}
}
}
@@
-218,6
+220,6
@@
class TemplateParser {
*/
public function processTemplate( $templateName, $args, array $scopes = [] ) {
$template = $this->getTemplate( $templateName );
*/
public function processTemplate( $templateName, $args, array $scopes = [] ) {
$template = $this->getTemplate( $templateName );
- return
call_user_func( $template,
$args, $scopes );
+ return
$template(
$args, $scopes );
}
}
}
}