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:
parent
b15168c614
commit
d6fb70098f
|
@ -973,7 +973,8 @@ function wp_edit_attachments_query( $q = false ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function _edit_attachments_query_helper($where) {
|
function _edit_attachments_query_helper($where) {
|
||||||
return $where .= ' AND post_parent < 1';
|
global $wpdb;
|
||||||
|
return $where .= " AND {$wpdb->posts}.post_parent < 1";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue