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

git-svn-id: http://svn.automattic.com/wordpress/trunk@19720 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2012-01-09 15:55:30 +00:00
parent b15168c614
commit d6fb70098f
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";
}
/**