Use PLUGINS_DIR constant to load plugin templates

This commit is contained in:
Frederic Guillot
2016-04-24 14:46:18 -04:00
parent da1725c225
commit 2cd06f8795
3 changed files with 4 additions and 4 deletions

View File

@@ -73,7 +73,7 @@ class Loader extends \Kanboard\Core\Base
$instance = new $class($this->container);
Tool::buildDic($this->container, $instance->getClasses());
Tool::buildDIC($this->container, $instance->getClasses());
Tool::buildDICHelpers($this->container, $instance->getHelpers());
$instance->initialize();

View File

@@ -116,7 +116,7 @@ class Template
}
if ($plugin !== 'kanboard' && $plugin !== '') {
return implode(DIRECTORY_SEPARATOR, array(__DIR__, '..', '..', 'plugins', ucfirst($plugin), 'Template', $template.'.php'));
return implode(DIRECTORY_SEPARATOR, array(PLUGINS_DIR, ucfirst($plugin), 'Template', $template.'.php'));
}
return implode(DIRECTORY_SEPARATOR, array(__DIR__, '..', 'Template', $template.'.php'));