From 2e8030d8045748ca0c33614c16c66088a84de253 Mon Sep 17 00:00:00 2001 From: garvinhicking Date: Wed, 26 Jul 2006 10:47:59 +0000 Subject: [PATCH] fix multi-author view only showing first author --- docs/NEWS | 6 ++---- include/functions_entries.inc.php | 9 +++++++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/docs/NEWS b/docs/NEWS index 9af9731..66d141a 100644 --- a/docs/NEWS +++ b/docs/NEWS @@ -3,13 +3,11 @@ Version 1.0.1 () ------------------------------------------------------------------------ + * Fix multi-authors view only showing first author (garvinhicking) + * Fix bug sending comment-notification mails to subscribed users without an email address (garvinhicking) - * Chorizo Security Checks: Fixed possible browser-dependant attribute - injection in the templatechooser-Plugin [NOT REALLY SURE YET IF THIS - INDEED WAS A BUG. NEEDS CLARITY] (garvinhicking) - * Fixed icelandic language bug preventing upgrade (garvinhicking) Version 1.0 (June 15th, 2006) diff --git a/include/functions_entries.inc.php b/include/functions_entries.inc.php index a6e2281..d320e2e 100644 --- a/include/functions_entries.inc.php +++ b/include/functions_entries.inc.php @@ -258,9 +258,14 @@ function serendipity_fetchEntries($range = null, $full = true, $limit = '', $fet } if (isset($serendipity['GET']['viewAuthor'])) { - $cond['and'] .= " AND e.authorid = ". (int)$serendipity['GET']['viewAuthor']; - } + $multiauthors = explode(';', $serendipity['GET']['viewAuthor']); + $multiauthors_sql = array(); + foreach($multiauthors AS $multiauthor) { + $multiauthors_sql[] = 'e.authorid = ' . (int)$multiauthor; + } + $cond['and'] .= ' AND (' . implode(' OR ', $multiauthors_sql) . ')'; + } $cat_sql = ''; if (isset($serendipity['GET']['category'])) { -- 2.39.5