This commit is contained in:
bzick 2015-01-06 23:42:54 +03:00
parent ae592d22c7
commit d4bfb366b8
2 changed files with 7 additions and 9 deletions

View File

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

View File

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