Merge pull request #112 from tractorcow/pulls/0.5-fix-freshness

BUG Fixes LandingPageFreshness parsing issue. fixes #13
This commit is contained in:
Sam Minnée 2014-11-03 14:11:18 +13:00
commit 2791eddbca
1 changed files with 1 additions and 1 deletions

View File

@ -238,7 +238,7 @@ class BlogTree_Controller extends Page_Controller {
// only use freshness if no action is present (might be displaying tags or rss)
if ($this->LandingPageFreshness && !$this->request->param('Action')) {
$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');
$filter = "\"BlogEntry\".\"Date\" > '$date'";