mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +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 array
|
||||||
**/
|
**/
|
||||||
var $templateVars = array();
|
var $templateVars = array();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Paths to look for templates on.
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
**/
|
||||||
|
var $templatePaths = array();
|
||||||
/**
|
/**
|
||||||
* Initialize callback
|
* Initialize callback
|
||||||
*
|
*
|
||||||
|
@ -96,6 +103,9 @@ class TemplateTask extends Shell {
|
||||||
if ($vars !== null) {
|
if ($vars !== null) {
|
||||||
$this->set($vars);
|
$this->set($vars);
|
||||||
}
|
}
|
||||||
|
if (empty($this->templatePaths)) {
|
||||||
|
$this->initialize();
|
||||||
|
}
|
||||||
$templateFile = $this->_findTemplate($directory, $filename);
|
$templateFile = $this->_findTemplate($directory, $filename);
|
||||||
if ($templateFile) {
|
if ($templateFile) {
|
||||||
extract($this->templateVars);
|
extract($this->templateVars);
|
||||||
|
|
Loading…
Add table
Reference in a new issue