From bee833bf524e58ea9cf5309fb89f6f8b30005720 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sun, 7 Aug 2016 00:54:49 +0200 Subject: Problematic MySQL reserved keyword `read` and `reads` are reserved keywords --- app/Models/StatsDAO.php | 6 +++--- app/views/stats/index.phtml | 12 ++++++------ app/views/stats/repartition.phtml | 8 ++++---- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/app/Models/StatsDAO.php b/app/Models/StatsDAO.php index e18ba4748..3f5bf8515 100644 --- a/app/Models/StatsDAO.php +++ b/app/Models/StatsDAO.php @@ -38,9 +38,9 @@ class FreshRSS_StatsDAO extends Minz_ModelPdo { } $sql = <<prefix}entry AS e , {$this->prefix}feed AS f WHERE e.id_feed = f.id diff --git a/app/views/stats/index.phtml b/app/views/stats/index.phtml index 0a2fbdb10..a36f812a8 100644 --- a/app/views/stats/index.phtml +++ b/app/views/stats/index.phtml @@ -23,18 +23,18 @@ - repartition['main_stream']['read']); ?> - repartition['all_feeds']['read']); ?> + repartition['main_stream']['count_reads']); ?> + repartition['all_feeds']['count_reads']); ?> - repartition['main_stream']['unread']); ?> - repartition['all_feeds']['unread']); ?> + repartition['main_stream']['count_unreads']); ?> + repartition['all_feeds']['count_unreads']); ?> - repartition['main_stream']['favorite']); ?> - repartition['all_feeds']['favorite']); ?> + repartition['main_stream']['count_favorites']); ?> + repartition['all_feeds']['count_favorites']); ?> diff --git a/app/views/stats/repartition.phtml b/app/views/stats/repartition.phtml index ffb2c361e..5ebcdce5a 100644 --- a/app/views/stats/repartition.phtml +++ b/app/views/stats/repartition.phtml @@ -12,7 +12,7 @@ if (!empty($feeds)) { echo ''; foreach ($feeds as $feed) { - if ($this->feed && $feed->id() == $this->feed->id()){ + if ($this->feed && $feed->id() == $this->feed->id()) { echo ''; } else { echo ''; @@ -39,9 +39,9 @@ repartition['total']; ?> - repartition['read']; ?> - repartition['unread']; ?> - repartition['favorite']; ?> + repartition['count_reads']; ?> + repartition['count_unreads']; ?> + repartition['count_favorites']; ?> -- cgit v1.2.3