BUGFIX: BlogTree always got LandingPageFreshness value from its parent

This commit is contained in:
Saophalkun Ponlu 2009-07-19 21:24:45 +00:00
parent 2e58553940
commit 8589682b7e
1 changed files with 2 additions and 3 deletions

View File

@ -69,10 +69,9 @@ class BlogTree extends Page {
public function getLandingPageFreshness() {
$freshness = $this->getField('LandingPageFreshness');
// If we want to inherit freshness, try that first
if ($freshness = "INHERIT" && $this->getParent()) $freshness = $this->getParent()->LandingPageFreshness;
if ($freshness == "INHERIT" && $this->getParent()) $freshness = $this->getParent()->LandingPageFreshness;
// If we don't have a parent, or the inherited result was still inherit, use default
if ($freshness = "INHERIT") $freshness = '';
if ($freshness == "INHERIT") $freshness = '';
return $freshness;
}