Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormattab <matthieu.aubry@gmail.com>2013-07-01 06:08:36 +0400
committermattab <matthieu.aubry@gmail.com>2013-07-01 06:08:36 +0400
commit916848085adcc6504c9cb1757e8fc9cba3eee468 (patch)
treebe48f87a4ebbcb93277059ff6640292061f99900 /core/Twig.php
parent84bf3a5eab6ae6529690460e044fd7c908305b71 (diff)
* Enabling Twig 'strict_variables' so that we write best code possible, and learn early if some tpl code is not valid. Fixing few bugs that this uncovered
* refactoring the percent column label in getPercentVisitColumn() * removing indexBeforeMenu and putting directly in parent template Refs #4019
Diffstat (limited to 'core/Twig.php')
-rw-r--r--core/Twig.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/Twig.php b/core/Twig.php
index 27f2e54fdb..167f94d568 100644
--- a/core/Twig.php
+++ b/core/Twig.php
@@ -41,6 +41,7 @@ class Piwik_Twig
$this->twig = new Twig_Environment($chainLoader,
array(
'debug' => true, // to use {{ dump(var) }} in twig templates
+ 'strict_variables' => true, // throw an exception if variables are invalid
//'cache' => PIWIK_DOCUMENT_ROOT . '/tmp/templates_c',
)
);
@@ -52,9 +53,9 @@ class Piwik_Twig
$this->addFilter_sumTime();
$this->addFilter_money();
$this->addFilter_truncate();
+
$this->twig->addFilter( new Twig_SimpleFilter('implode', 'implode'));
/*
- $this->load_filter('output', 'cachebuster');
$this->load_filter('output', 'trimwhitespace');*/