Fixed logic error when selecting posts by multiple author ids

git-svn-id: https://develop.svn.wordpress.org/trunk@404 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dougal Campbell 2003-10-02 13:56:14 +00:00
parent e2674bd615
commit 51053ed274
1 changed files with 2 additions and 1 deletions

View File

@ -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;