Avoid adding the onTwigTemplatePaths if it's not enabled on this page

This commit is contained in:
Flavio Copes 2016-01-10 14:59:09 +01:00
parent 87c6d7eb95
commit cdee9fa1fa
1 changed files with 5 additions and 4 deletions

View File

@ -103,12 +103,13 @@ class CommentsPlugin extends Plugin
$this->calculateEnable(); $this->calculateEnable();
$this->enable([ if ($this->enable) {
'onTwigTemplatePaths' => ['onTwigTemplatePaths', 0], $this->enable([
]); 'onTwigTemplatePaths' => ['onTwigTemplatePaths', 0],
]);
}
} else { } else {
/** @var Uri $uri */ /** @var Uri $uri */
$uri = $this->grav['uri']; $uri = $this->grav['uri'];