From aaeaaa0c459488fae220781d3d1894a6e57efec9 Mon Sep 17 00:00:00 2001 From: emc3 Date: Thu, 2 Oct 2003 13:56:14 +0000 Subject: [PATCH] Fixed logic error when selecting posts by multiple author ids git-svn-id: http://svn.automattic.com/wordpress/trunk@404 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- blog.header.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/blog.header.php b/blog.header.php index 87704b997..ce033331f 100644 --- a/blog.header.php +++ b/blog.header.php @@ -158,10 +158,11 @@ if ((empty($author)) || ($author == 'all') || ($author == '0')) { $andor = 'OR'; } $author_array = explode(' ', $author); - $whichauthor .= ' AND post_author '.$eq.' '.intval($author_array[0]); + $whichauthor .= ' AND (post_author '.$eq.' '.intval($author_array[0]); for ($i = 1; $i < (count($author_array)); $i = $i + 1) { $whichauthor .= ' '.$andor.' post_author '.$eq.' '.intval($author_array[$i]); } + $whichauthor .= ')'; } $where .= $search.$whichcat.$whichauthor;