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

index 9af973144e6c75db71bfc8e41f3ae36cf486bb41..66d141a6fc461f407739dd3be668bdce7df24863 100644 (file)
--- 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)
index a6e22819d8ead0d44d47485f14f9d616274bc7ab..d320e2eb4d065890ae15469c0139174818cfe1ae 100644 (file)
@@ -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'])) {