Commit f9cc66d3 by Seldaek

git-svn-id: svn://dwoo.org/dwoo/trunk@51 0598d79b-80c4-4d41-97ba-ac86fbbd088b

parent dc02338d
......@@ -322,7 +322,7 @@ class Dwoo
// try to get cached template
$file = $_tpl->getCachedTemplate($this);
$doCache = $file === true;
$cacheLoaded = $doCache === false && is_string($file);
$cacheLoaded = is_string($file);
// cache is present, run it
if($cacheLoaded === true)
......@@ -366,7 +366,7 @@ class Dwoo
$this->template = null;
// building cache
if($doCache)
if($doCache === true)
{
$_tpl->cache($this, $out);
if($_output === true)
......@@ -777,16 +777,24 @@ class Dwoo
{
if(is_array($value) === true)
{
if($checkIsEmpty)
return count($value) > 0;
else
if($checkIsEmpty === false)
return true;
else
return count($value) > 0;
}
elseif($value instanceof Iterator)
{
if($checkIsEmpty)
if($checkIsEmpty === false)
{
return true;
}
else
{
if($allowNonCountable)
if($allowNonCountable === false)
{
return count($value) > 0;
}
else
{
if($value instanceof Countable)
return count($value) > 0;
......@@ -796,11 +804,7 @@ class Dwoo
return $value->valid();
}
}
else
return count($value) > 0;
}
else
return true;
}
return false;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment