Ticket #15665: 15665.patch
File 15665.patch, 1013 bytes (added by , 12 years ago) |
---|
-
wp-includes/post.php
3210 3210 $in_string = "'". implode( "','", $parts ) . "'"; 3211 3211 $post_type_sql = $post_type; 3212 3212 $wpdb->escape_by_ref( $post_type_sql ); 3213 $pages = $wpdb->get_results( "SELECT ID, post_name, post_parent FROM $wpdb->posts WHERE post_name IN ($in_string) AND (post_type = '$post_type_sql' OR post_type = 'attachment')", OBJECT_K );3213 $pages = $wpdb->get_results( "SELECT ID, post_name, post_parent, post_type FROM $wpdb->posts WHERE post_name IN ($in_string) AND (post_type = '$post_type_sql' OR post_type = 'attachment')", OBJECT_K ); 3214 3214 3215 3215 $revparts = array_reverse( $parts ); 3216 3216 … … 3229 3229 3230 3230 if ( $p->post_parent == 0 && $count+1 == count( $revparts ) && $p->post_name == $revparts[ $count ] ) { 3231 3231 $foundid = $page->ID; 3232 break; 3232 if ( $page->post_type == $post_type ) 3233 break; 3233 3234 } 3234 3235 } 3235 3236 }