WordPress.org

Make WordPress Core

Changeset 19720


Ignore:
Timestamp:
01/09/12 15:55:30 (3 years ago)
Author:
nacin
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/post.php

    r19687 r19720  
    974974 
    975975function _edit_attachments_query_helper($where) { 
    976     return $where .= ' AND post_parent < 1'; 
     976    global $wpdb; 
     977    return $where .= " AND {$wpdb->posts}.post_parent < 1"; 
    977978} 
    978979 
Note: See TracChangeset for help on using the changeset viewer.