From 39b885033ec3614bf0b6c98ee8722eb30d13907b Mon Sep 17 00:00:00 2001 From: Alex Cabal Date: Tue, 8 Aug 2023 12:58:11 -0500 Subject: [PATCH] Fix ordering of past polls --- www/polls/index.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/www/polls/index.php b/www/polls/index.php index 2076e977..d8b0d376 100644 --- a/www/polls/index.php +++ b/www/polls/index.php @@ -3,18 +3,18 @@ $pastPolls = Db::Query(' SELECT * from Polls where utc_timestamp() >= end - order by Created desc + order by Start desc ', [], 'Poll'); $openPolls = Db::Query(' SELECT * from Polls - where (end is null - or utc_timestamp() <= end) + where (End is null + or utc_timestamp() <= End) and - (start is null - or start <= utc_timestamp()) - order by Created desc + (Start is null + or Start <= utc_timestamp()) + order by Start desc ', [], 'Poll'); ?> 'Polls', 'highlight' => '', 'description' => 'The various polls active at Standard Ebooks.']) ?>