@@ 3144-3150 (lines=7) @@ | ||
3141 | if ( !empty($e_status) ) { |
|
3142 | $statuswheres[] = "(" . join( ' AND ', $e_status ) . ")"; |
|
3143 | } |
|
3144 | if ( !empty($r_status) ) { |
|
3145 | if ( !empty($q['perm'] ) && 'editable' == $q['perm'] && !current_user_can($edit_others_cap) ) { |
|
3146 | $statuswheres[] = "({$this->db->posts}.post_author = $user_id " . "AND (" . join( ' OR ', $r_status ) . "))"; |
|
3147 | } else { |
|
3148 | $statuswheres[] = "(" . join( ' OR ', $r_status ) . ")"; |
|
3149 | } |
|
3150 | } |
|
3151 | if ( !empty($p_status) ) { |
|
3152 | if ( !empty($q['perm'] ) && 'readable' == $q['perm'] && !current_user_can($read_private_cap) ) { |
|
3153 | $statuswheres[] = "({$this->db->posts}.post_author = $user_id " . "AND (" . join( ' OR ', $p_status ) . "))"; |
|
@@ 3151-3157 (lines=7) @@ | ||
3148 | $statuswheres[] = "(" . join( ' OR ', $r_status ) . ")"; |
|
3149 | } |
|
3150 | } |
|
3151 | if ( !empty($p_status) ) { |
|
3152 | if ( !empty($q['perm'] ) && 'readable' == $q['perm'] && !current_user_can($read_private_cap) ) { |
|
3153 | $statuswheres[] = "({$this->db->posts}.post_author = $user_id " . "AND (" . join( ' OR ', $p_status ) . "))"; |
|
3154 | } else { |
|
3155 | $statuswheres[] = "(" . join( ' OR ', $p_status ) . ")"; |
|
3156 | } |
|
3157 | } |
|
3158 | if ( $post_status_join ) { |
|
3159 | $join .= " LEFT JOIN {$this->db->posts} AS p2 ON ({$this->db->posts}.post_parent = p2.ID) "; |
|
3160 | foreach ( $statuswheres as $index => $statuswhere ) { |