From 7b4f3a4e8db0fc894a67da23a328d39239c06cb6 Mon Sep 17 00:00:00 2001 From: Flavio Copes Date: Fri, 16 Sep 2016 09:51:01 +0200 Subject: [PATCH 1/2] Fix showing comments older than one week in the "latest comments" view --- CHANGELOG.md | 6 ++++++ comments.php | 5 ----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 02466e2..a5fa7d0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +# v1.2.x +## 09/16/2016 + +1. [](#bugfix) + * Fix [#37](https://github.com/getgrav/grav-plugin-comments/issues/37) showing comments older than one week in the "latest comments" view + # v1.2.4 ## 09/15/2016 diff --git a/comments.php b/comments.php index 0629771..1363a8b 100644 --- a/comments.php +++ b/comments.php @@ -312,11 +312,6 @@ class CommentsPlugin extends Plugin for ($i = 0; $i < count($data['comments']); $i++) { $commentTimestamp = \DateTime::createFromFormat('D, d M Y H:i:s', $data['comments'][$i]['date'])->getTimestamp(); - $sevenDaysAgo = time() - (7 * 24 * 60 * 60); - - if ($commentTimestamp < $sevenDaysAgo) { - continue; - } $data['comments'][$i]['pageTitle'] = $data['title']; $data['comments'][$i]['filePath'] = $file->filePath; From 201ffedd18f16c7b8131a83dd9601dd4524c2770 Mon Sep 17 00:00:00 2001 From: Flavio Copes Date: Fri, 16 Sep 2016 09:51:44 +0200 Subject: [PATCH 2/2] Prepare release --- CHANGELOG.md | 2 +- blueprints.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a5fa7d0..58f5603 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -# v1.2.x +# v1.2.5 ## 09/16/2016 1. [](#bugfix) diff --git a/blueprints.yaml b/blueprints.yaml index 41ce93a..08a112b 100644 --- a/blueprints.yaml +++ b/blueprints.yaml @@ -1,5 +1,5 @@ name: Comments -version: 1.2.4 +version: 1.2.5 description: Adds a commenting functionality to your site icon: comment author: