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:
parent
e2674bd615
commit
51053ed274
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue