Skip to content

Commit

Permalink
Don't use array calling for post_status in wp_edit_attachments_query(…
Browse files Browse the repository at this point in the history
…) to prevent any use of the deprecated query_string filter (as in, don't use it) from tanking the page. see #17556, #17559. for the 3.1 branch.

git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@18054 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
nacin committed May 26, 2011
1 parent fe9d2e3 commit 005d19c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions wp-admin/includes/post.php
Expand Up @@ -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' );
Expand Down

0 comments on commit 005d19c

Please sign in to comment.