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) { if ($store) {
$cache = $this->_getCacheName($tpl, $options); $cache = $this->_getCacheName($tpl, $options);
dumpt($cache, $tpl);
$tpl_tmp = tempnam($this->_compile_dir, $cache); $tpl_tmp = tempnam($this->_compile_dir, $cache);
$tpl_fp = fopen($tpl_tmp, "w"); $tpl_fp = fopen($tpl_tmp, "w");
if (!$tpl_fp) { if (!$tpl_fp) {

View File

@ -176,14 +176,13 @@ class Render extends \ArrayObject
*/ */
public function isValid() public function isValid()
{ {
if (count($this->_depends[0]) === 1) { // if no external dependencies, only self foreach ($this->_depends as $scm => $templates) {
$provider = $this->_fenom->getProvider($this->_scm); $provider = $this->_fenom->getProvider($scm);
if ($provider->getLastModified($this->_name) !== $this->_time) { if(count($templates) === 1) {
return false; if ($provider->getLastModified(key($templates)) !== $this->_time) {
} return false;
} else { }
foreach ($this->_depends as $scm => $templates) { } else {
$provider = $this->_fenom->getProvider($scm);
if (!$provider->verify($templates)) { if (!$provider->verify($templates)) {
return false; return false;
} }