mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 11:05:58 +02:00
Merge pull request #112 from tractorcow/pulls/0.5-fix-freshness
BUG Fixes LandingPageFreshness parsing issue. fixes #13
This commit is contained in:
commit
2791eddbca
@ -238,7 +238,7 @@ class BlogTree_Controller extends Page_Controller {
|
|||||||
// only use freshness if no action is present (might be displaying tags or rss)
|
// only use freshness if no action is present (might be displaying tags or rss)
|
||||||
if ($this->LandingPageFreshness && !$this->request->param('Action')) {
|
if ($this->LandingPageFreshness && !$this->request->param('Action')) {
|
||||||
$d = new Zend_Date(SS_Datetime::now()->getValue());
|
$d = new Zend_Date(SS_Datetime::now()->getValue());
|
||||||
$d->sub($this->LandingPageFreshness);
|
$d->sub(intval($this->LandingPageFreshness), Zend_Date::MONTH);
|
||||||
$date = $d->toString('YYYY-MM-dd');
|
$date = $d->toString('YYYY-MM-dd');
|
||||||
|
|
||||||
$filter = "\"BlogEntry\".\"Date\" > '$date'";
|
$filter = "\"BlogEntry\".\"Date\" > '$date'";
|
||||||
|
Loading…
Reference in New Issue
Block a user