From f71326f496a201c85b00d5c146e8d3243b2abf72 Mon Sep 17 00:00:00 2001 From: FramaJosephK Date: Wed, 3 Dec 2014 18:39:01 +0100 Subject: [PATCH] Keep polls with bad expiration date in database (cherry picked from commit c15ce049ad12d8aeb08623c1936fa17e6f81941f) Conflicts: app/classes/Framadate/Utils.php --- app/classes/Framadate/FramaDB.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/classes/Framadate/FramaDB.php b/app/classes/Framadate/FramaDB.php index 54e186d..8c15772 100644 --- a/app/classes/Framadate/FramaDB.php +++ b/app/classes/Framadate/FramaDB.php @@ -268,7 +268,7 @@ class FramaDB { * @return array Array of old polls */ public function findOldPolls() { - $prepared = $this->prepare('SELECT * FROM ' . Utils::table('poll') . ' WHERE end_date < NOW() LIMIT 20'); + $prepared = $this->prepare('SELECT * FROM ' . Utils::table('poll') . ' WHERE end_date < NOW() AND date_fin != 0 LIMIT 20'); $prepared->execute([]); return $prepared->fetchAll();