]> git.mjollnir.org Git - s9y.git/commitdiff
fix multi-author view only showing first author originbackup
authorgarvinhicking <garvinhicking>
Wed, 26 Jul 2006 10:47:48 +0000 (10:47 +0000)
committergarvinhicking <garvinhicking>
Wed, 26 Jul 2006 10:47:48 +0000 (10:47 +0000)
docs/NEWS
include/functions_entries.inc.php

index 795a6a660fb20c7fd0da1507cab9b2299dc3be4b..9240551dd5b8a37720a75dc37076846da4f4cdab 100644 (file)
--- 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)
index 7ba577971d15e7624cb33e04008a803bd777fd56..1b451f6da722b4d40acc769641e5de6cf5c65f2c 100644 (file)
@@ -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'])) {