mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
Forcing templatePaths to exist.
This commit is contained in:
parent
333713e978
commit
a7f0071c61
1 changed files with 10 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue