Code Duplication    Length = 7-7 lines in 2 locations

src/wp-includes/class-wp-query.php 2 locations

@@ 2334-2340 (lines=7) @@
2331
			if ( !empty($e_status) ) {
2332
				$statuswheres[] = "(" . join( ' AND ', $e_status ) . ")";
2333
			}
2334
			if ( !empty($r_status) ) {
2335
				if ( !empty($q['perm'] ) && 'editable' == $q['perm'] && !current_user_can($edit_others_cap) ) {
2336
					$statuswheres[] = "({$wpdb->posts}.post_author = $user_id " . "AND (" . join( ' OR ', $r_status ) . "))";
2337
				} else {
2338
					$statuswheres[] = "(" . join( ' OR ', $r_status ) . ")";
2339
				}
2340
			}
2341
			if ( !empty($p_status) ) {
2342
				if ( !empty($q['perm'] ) && 'readable' == $q['perm'] && !current_user_can($read_private_cap) ) {
2343
					$statuswheres[] = "({$wpdb->posts}.post_author = $user_id " . "AND (" . join( ' OR ', $p_status ) . "))";
@@ 2341-2347 (lines=7) @@
2338
					$statuswheres[] = "(" . join( ' OR ', $r_status ) . ")";
2339
				}
2340
			}
2341
			if ( !empty($p_status) ) {
2342
				if ( !empty($q['perm'] ) && 'readable' == $q['perm'] && !current_user_can($read_private_cap) ) {
2343
					$statuswheres[] = "({$wpdb->posts}.post_author = $user_id " . "AND (" . join( ' OR ', $p_status ) . "))";
2344
				} else {
2345
					$statuswheres[] = "(" . join( ' OR ', $p_status ) . ")";
2346
				}
2347
			}
2348
			if ( $post_status_join ) {
2349
				$join .= " LEFT JOIN {$wpdb->posts} AS p2 ON ({$wpdb->posts}.post_parent = p2.ID) ";
2350
				foreach ( $statuswheres as $index => $statuswhere ) {