From: garvinhicking Date: Wed, 26 Jul 2006 10:47:48 +0000 (+0000) Subject: fix multi-author view only showing first author X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=refs%2Fheads%2Foriginbackup;p=s9y.git fix multi-author view only showing first author --- diff --git a/docs/NEWS b/docs/NEWS index 795a6a6..9240551 100644 --- a/docs/NEWS +++ b/docs/NEWS @@ -229,13 +229,11 @@ Version 1.1-alpha5() 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 7ba5779..1b451f6 100644 --- a/include/functions_entries.inc.php +++ b/include/functions_entries.inc.php @@ -263,9 +263,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'])) {