From 358027a8e0efa6f643db824c296b766a4bb17186 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Kv=C3=A1=C4=8Dek?= Date: Mon, 26 Sep 2016 16:31:49 +0200 Subject: [PATCH] FIX: fix duplicate :: in template names --- app/Handlers/Registrators/TemplateRegistrator.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/Handlers/Registrators/TemplateRegistrator.php b/app/Handlers/Registrators/TemplateRegistrator.php index 5a8a74f1..b64c8730 100644 --- a/app/Handlers/Registrators/TemplateRegistrator.php +++ b/app/Handlers/Registrators/TemplateRegistrator.php @@ -68,7 +68,7 @@ class TemplateRegistrator */ public function setNamespace($namespace) { - $this->namespace = $namespace . '::'; + $this->namespace = $namespace; } /** @@ -102,6 +102,9 @@ class TemplateRegistrator $this->unsetNamespace(); } + /** + * Save templates into database + */ public function saveTemplates() { if (!is_array($this->paths) || empty($this->paths)) { @@ -109,7 +112,7 @@ class TemplateRegistrator } foreach ($this->paths as $path) { - $this->setNamespace($path['namespace']); + $this->setNamespace($path['namespace'] . '::'); $this->setModuleId($path['moduleId']); $this->setBaseDirectory($path['baseDirectory']);