From a7f0071c610e56e718c83028631fa3b44a72ffc4 Mon Sep 17 00:00:00 2001 From: mark_story Date: Wed, 13 May 2009 23:35:41 -0400 Subject: [PATCH] Forcing templatePaths to exist. --- cake/console/libs/tasks/template.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/cake/console/libs/tasks/template.php b/cake/console/libs/tasks/template.php index 6fe7ddfed..d68ba61fe 100644 --- a/cake/console/libs/tasks/template.php +++ b/cake/console/libs/tasks/template.php @@ -26,6 +26,13 @@ class TemplateTask extends Shell { * @var array **/ var $templateVars = array(); + +/** + * Paths to look for templates on. + * + * @var array + **/ + var $templatePaths = array(); /** * Initialize callback * @@ -96,6 +103,9 @@ class TemplateTask extends Shell { if ($vars !== null) { $this->set($vars); } + if (empty($this->templatePaths)) { + $this->initialize(); + } $templateFile = $this->_findTemplate($directory, $filename); if ($templateFile) { extract($this->templateVars);