Skip to content
Permalink
Browse files

Forcing templatePaths to exist.

  • Loading branch information...
markstory committed May 14, 2009
1 parent 333713e commit a7f0071c610e56e718c83028631fa3b44a72ffc4
Showing with 10 additions and 0 deletions.
  1. +10 −0 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 @@ function generate($directory, $filename, $vars = null) {
if ($vars !== null) {
$this->set($vars);
}
if (empty($this->templatePaths)) {
$this->initialize();
}
$templateFile = $this->_findTemplate($directory, $filename);
if ($templateFile) {
extract($this->templateVars);

0 comments on commit a7f0071

Please sign in to comment.
You can’t perform that action at this time.