|
@@ 3122-3127 (lines=6) @@
|
| 3119 |
|
if ( !empty($e_status) ) { |
| 3120 |
|
$statuswheres[] = "(" . join( ' AND ', $e_status ) . ")"; |
| 3121 |
|
} |
| 3122 |
|
if ( !empty($r_status) ) { |
| 3123 |
|
if ( !empty($q['perm'] ) && 'editable' == $q['perm'] && !current_user_can($edit_others_cap) ) |
| 3124 |
|
$statuswheres[] = "($wpdb->posts.post_author = $user_id " . "AND (" . join( ' OR ', $r_status ) . "))"; |
| 3125 |
|
else |
| 3126 |
|
$statuswheres[] = "(" . join( ' OR ', $r_status ) . ")"; |
| 3127 |
|
} |
| 3128 |
|
if ( !empty($p_status) ) { |
| 3129 |
|
if ( !empty($q['perm'] ) && 'readable' == $q['perm'] && !current_user_can($read_private_cap) ) |
| 3130 |
|
$statuswheres[] = "($wpdb->posts.post_author = $user_id " . "AND (" . join( ' OR ', $p_status ) . "))"; |
|
@@ 3128-3133 (lines=6) @@
|
| 3125 |
|
else |
| 3126 |
|
$statuswheres[] = "(" . join( ' OR ', $r_status ) . ")"; |
| 3127 |
|
} |
| 3128 |
|
if ( !empty($p_status) ) { |
| 3129 |
|
if ( !empty($q['perm'] ) && 'readable' == $q['perm'] && !current_user_can($read_private_cap) ) |
| 3130 |
|
$statuswheres[] = "($wpdb->posts.post_author = $user_id " . "AND (" . join( ' OR ', $p_status ) . "))"; |
| 3131 |
|
else |
| 3132 |
|
$statuswheres[] = "(" . join( ' OR ', $p_status ) . ")"; |
| 3133 |
|
} |
| 3134 |
|
if ( $post_status_join ) { |
| 3135 |
|
$join .= " LEFT JOIN $wpdb->posts AS p2 ON ($wpdb->posts.post_parent = p2.ID) "; |
| 3136 |
|
foreach ( $statuswheres as $index => $statuswhere ) |