From 930f68cdd5439b749720c0cb3afca5553482aa26 Mon Sep 17 00:00:00 2001 From: David Lynch Date: Mon, 22 Apr 2013 22:08:38 -0500 Subject: [PATCH] Fetch chapter descriptions as well, for archive --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.php b/index.php index 781a6d9..fbdc5b7 100755 --- a/index.php +++ b/index.php @@ -125,7 +125,7 @@ break; case 'archive': // full strip listing - $query = "SELECT c.*, ch.title AS chapter_title, ch.slug AS chapter_slug FROM comics c LEFT JOIN chapters ch ON c.chapterid = ch.chapterid WHERE c.pub_date <= UNIX_TIMESTAMP() ORDER BY "; + $query = "SELECT c.*, ch.title AS chapter_title, ch.slug AS chapter_slug, ct.description AS chapter_description FROM comics c LEFT JOIN chapters ch ON c.chapterid = ch.chapterid LEFT JOIN chapters_text ct ON c.chapterid = ct.chapterid WHERE c.pub_date <= UNIX_TIMESTAMP() ORDER BY "; switch (config('archive_order', 'date')) { case 'chapter': $query .= "ch.order ASC, ";