Ticket #16438: 16438.diff
File 16438.diff, 743 bytes (added by , 14 years ago) |
---|
-
wp-includes/post.php
a b 3133 3133 foreach ( (array) $page_paths as $pathdir ) 3134 3134 $full_path .= ( $pathdir != '' ? '/' : '' ) . sanitize_title($pathdir); 3135 3135 3136 $pages = $wpdb->get_results( $wpdb->prepare( "SELECT ID, post_name, post_parent FROM $wpdb->posts WHERE post_name = %s AND (post_type = %s OR post_type = 'attachment')", $leaf_path, $post_type ));3136 $pages = $wpdb->get_results( $wpdb->prepare( "SELECT ID, post_name, post_parent FROM $wpdb->posts WHERE post_name = %s AND post_type = %s", $leaf_path, $post_type )); 3137 3137 3138 3138 if ( empty($pages) ) 3139 3139 return $null;