Ticket #8592: post.php.diff
File post.php.diff, 713 bytes (added by , 14 years ago) |
---|
-
post.php
2239 2239 if ( $parent >= 0 ) 2240 2240 $where .= $wpdb->prepare(' AND post_parent = %d ', $parent); 2241 2241 2242 $query = "SELECT * FROM $wpdb->posts $join WHERE (post_type = 'page' AND post_status = 'publish') $where "; 2243 $query .= $author_query; 2242 $query = "SELECT * FROM $wpdb->posts $join WHERE (post_type = 'page' AND (post_status = 'publish'"; 2243 2244 if ( is_admin() ) 2245 $query .= " OR post_status = 'private'"; 2246 2247 $query .= ")) $where " . $author_query; 2244 2248 $query .= " ORDER BY " . $sort_column . " " . $sort_order ; 2245 2249 2246 2250 $pages = $wpdb->get_results($query);