BUG Fixes LandingPageFreshness parsing issue. fixes #13

This commit is contained in:
Damian Mooyman 2014-02-21 16:52:13 +13:00
parent b24ebe2e66
commit ad060cabf4
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'";