Forcing templatePaths to exist.

This commit is contained in:
mark_story 2009-05-13 23:35:41 -04:00
parent 333713e978
commit a7f0071c61

View file

@ -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);