Index: wp-includes/query.php
===================================================================
--- wp-includes/query.php	(revision 19734)
+++ wp-includes/query.php	(working copy)
@@ -1387,6 +1387,7 @@
 			, 'tag'
 			, 'cat'
 			, 'tag_id'
+			, 'author'
 			, 'author_name'
 			, 'feed'
 			, 'tb'
@@ -1406,7 +1407,8 @@
 		}
 
 		$array_keys = array('category__in', 'category__not_in', 'category__and', 'post__in', 'post__not_in',
-			'tag__in', 'tag__not_in', 'tag__and', 'tag_slug__in', 'tag_slug__and');
+			'tag__in', 'tag__not_in', 'tag__and', 'tag_slug__in', 'tag_slug__and',
+			'author__in', 'author__not_in');
 
 		foreach ( $array_keys as $key ) {
 			if ( !isset($array[$key]) )
@@ -1447,6 +1449,7 @@
 		$qv['m'] = absint($qv['m']);
 		$qv['paged'] = absint($qv['paged']);
 		$qv['cat'] = preg_replace( '|[^0-9,-]|', '', $qv['cat'] ); // comma separated list of positive or negative integers
+		$qv['author'] = preg_replace( '|[^0-9,-]|', '', $qv['author'] ); // comma separated list of positive or negative integers
 		$qv['pagename'] = trim( $qv['pagename'] );
 		$qv['name'] = trim( $qv['name'] );
 		if ( '' !== $qv['hour'] ) $qv['hour'] = absint($qv['hour']);
@@ -2269,28 +2272,36 @@
 
 		// Author/user stuff
 
-		if ( empty($q['author']) || ($q['author'] == '0') ) {
-			$whichauthor = '';
-		} else {
-			$q['author'] = (string)urldecode($q['author']);
+		if ( !empty($q['author']) && '0' != $q['author'] ) {
+			$q['author'] = ''.urldecode($q['author']).'';
 			$q['author'] = addslashes_gpc($q['author']);
-			if ( strpos($q['author'], '-') !== false ) {
-				$eq = '!=';
-				$andor = 'AND';
-				$q['author'] = explode('-', $q['author']);
-				$q['author'] = (string)absint($q['author'][1]);
-			} else {
-				$eq = '=';
-				$andor = 'OR';
+			$author_array = preg_split('/[,\s]+/', $q['author']);
+			$q['author'] = '';
+			$req_authors = array();
+			foreach ( (array) $author_array as $author) {
+				$author = intval($author);
+				$req_authors[] = $author;
+				$in = ($author > 0);
+				$author = abs($author);
+				if ( $in ) {
+					$q['author__in'][] = $author;
+				} else {
+					$q['author__not_in'][] = $author;
+				}
 			}
-			$author_array = preg_split('/[,\s]+/', $q['author']);
-			$_author_array = array();
-			foreach ( $author_array as $key => $_author )
-				$_author_array[] = "$wpdb->posts.post_author " . $eq . ' ' . absint($_author);
-			$whichauthor .= ' AND (' . implode(" $andor ", $_author_array) . ')';
-			unset($author_array, $_author_array);
+			$q['author'] = implode(',', $req_authors);
 		}
 
+		if ( !empty($q['author__in']) ) {
+			$author__in = implode(',', array_map( 'absint', array_unique( (array) $q['author__in'] ) ));
+			$where .= " AND {$wpdb->posts}.post_author IN ($author__in)";
+		}
+
+		if ( !empty($q['author__not_in']) ) {
+			$author__not_in = implode(',', array_map( 'absint', array_unique( (array) $q['author__not_in'] ) ));
+			$where .= " AND {$wpdb->posts}.post_author NOT IN ($author__not_in)";
+		}
+
 		// Author stuff for nice URLs
 
 		if ( '' != $q['author_name'] ) {
