mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
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
This commit is contained in:
parent
e50c87cc4f
commit
aaeaaa0c45
@ -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
Block a user