Changeset 6377
- Timestamp:
- 12/12/2007 11:45:55 AM (17 years ago)
- Location:
- trunk/wp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/post.php
r6364 r6377 977 977 $full_path .= ($pathdir!=''?'/':'') . sanitize_title($pathdir); 978 978 979 $pages = $wpdb->get_results( $wpdb->prepare( "SELECT ID, post_name, post_parent FROM $wpdb->posts WHERE post_name = %s AND post_type='page'", $leaf_path ));979 $pages = $wpdb->get_results( $wpdb->prepare( "SELECT ID, post_name, post_parent FROM $wpdb->posts WHERE post_name = %s AND (post_type = 'page' OR post_type = 'attachment')", $leaf_path )); 980 980 981 981 if ( empty($pages) ) -
trunk/wp-includes/query.php
r6364 r6377 842 842 $q['name'] = $q['pagename']; 843 843 $where .= " AND (ID = '$reqpage')"; 844 $reqpage_obj = get_page($reqpage); 845 if ( 'attachment' == $reqpage_obj->post_type ) { 846 $this->is_attachment = true; 847 $this->is_page = false; 848 $q['attachment_id'] = $reqpage; 849 } 844 850 } 845 851 } elseif ('' != $q['attachment']) {
Note: See TracChangeset
for help on using the changeset viewer.