mirror of
https://github.com/fenom-template/fenom.git
synced 2023-08-10 21:13:07 +03:00
Fix #128
This commit is contained in:
parent
ae592d22c7
commit
d4bfb366b8
@ -1025,7 +1025,6 @@ class Fenom
|
||||
}
|
||||
if ($store) {
|
||||
$cache = $this->_getCacheName($tpl, $options);
|
||||
dumpt($cache, $tpl);
|
||||
$tpl_tmp = tempnam($this->_compile_dir, $cache);
|
||||
$tpl_fp = fopen($tpl_tmp, "w");
|
||||
if (!$tpl_fp) {
|
||||
|
@ -176,14 +176,13 @@ class Render extends \ArrayObject
|
||||
*/
|
||||
public function isValid()
|
||||
{
|
||||
if (count($this->_depends[0]) === 1) { // if no external dependencies, only self
|
||||
$provider = $this->_fenom->getProvider($this->_scm);
|
||||
if ($provider->getLastModified($this->_name) !== $this->_time) {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
foreach ($this->_depends as $scm => $templates) {
|
||||
$provider = $this->_fenom->getProvider($scm);
|
||||
foreach ($this->_depends as $scm => $templates) {
|
||||
$provider = $this->_fenom->getProvider($scm);
|
||||
if(count($templates) === 1) {
|
||||
if ($provider->getLastModified(key($templates)) !== $this->_time) {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
if (!$provider->verify($templates)) {
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user