mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
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:
@@ -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";
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user