Don't use array calling for post_status in wp_edit_attachments_query() to prevent any use of the deprecated query_string filter (as in, don't use it) from tanking the page. see #17556, #17559. for 3.1.

git-svn-id: https://develop.svn.wordpress.org/trunk@18053 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2011-05-26 05:41:34 +00:00
parent 2ac4a87b89
commit cec199aa57

View File

@ -997,9 +997,9 @@ function wp_edit_attachments_query( $q = false ) {
$q['cat'] = isset( $q['cat'] ) ? (int) $q['cat'] : 0;
$q['post_type'] = 'attachment';
$post_type = get_post_type_object( 'attachment' );
$states = array( 'inherit' );
$states = 'inherit';
if ( current_user_can( $post_type->cap->read_private_posts ) )
$states[] = 'private';
$states .= ',private';
$q['post_status'] = isset( $q['status'] ) && 'trash' == $q['status'] ? 'trash' : $states;
$media_per_page = (int) get_user_option( 'upload_per_page' );