mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 09:05:58 +00:00
BUGFIX: BlogTree always got LandingPageFreshness value from its parent
This commit is contained in:
parent
2e58553940
commit
8589682b7e
@ -69,10 +69,9 @@ class BlogTree extends Page {
|
|||||||
public function getLandingPageFreshness() {
|
public function getLandingPageFreshness() {
|
||||||
$freshness = $this->getField('LandingPageFreshness');
|
$freshness = $this->getField('LandingPageFreshness');
|
||||||
// If we want to inherit freshness, try that first
|
// 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 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;
|
return $freshness;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user