Prefix table name against the post_parent field in _edit_attachments_query_helper() to avoid ambiguous queries. props benbalter. fixes #19779.

git-svn-id: https://develop.svn.wordpress.org/trunk@19720 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2012-01-09 15:55:30 +00:00
parent 9a6f2ac850
commit ba219cf998
1 changed files with 2 additions and 1 deletions

View File

@ -973,7 +973,8 @@ function wp_edit_attachments_query( $q = false ) {
}
function _edit_attachments_query_helper($where) {
return $where .= ' AND post_parent < 1';
global $wpdb;
return $where .= " AND {$wpdb->posts}.post_parent < 1";
}
/**