From ad3d836ae7f6719a73e4fabc3885f7137c488f3e Mon Sep 17 00:00:00 2001 From: flashwave Date: Wed, 11 Jul 2018 23:59:01 +0200 Subject: [PATCH] Fixed changelog date fetching. --- public/index.php | 1 + src/Database.php | 2 +- views/mio/home/index.twig | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/public/index.php b/public/index.php index 30c33541..25341b2d 100644 --- a/public/index.php +++ b/public/index.php @@ -60,6 +60,7 @@ $featuredChangelog = $db->query(' WHERE DATE(c.`change_created`) >= ( SELECT DATE(`change_created`) FROM `msz_changelog_changes` + GROUP BY DATE(`change_created`) ORDER BY `change_created` DESC LIMIT 2, 1 ) diff --git a/src/Database.php b/src/Database.php index c44d972a..702ee4dc 100644 --- a/src/Database.php +++ b/src/Database.php @@ -143,7 +143,7 @@ final class Database $options[PDO::MYSQL_ATTR_INIT_COMMAND] = " SET SESSION - sql_mode='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION', + sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION', time_zone = '+00:00'; "; break; diff --git a/views/mio/home/index.twig b/views/mio/home/index.twig index c0d35a20..74903809 100644 --- a/views/mio/home/index.twig +++ b/views/mio/home/index.twig @@ -13,7 +13,7 @@
We have {{ users_count|number_format }} users and the last person to join was {{ last_user.username }}, - ! + !