Changeset 6552
- Timestamp:
- 01/04/2008 07:55:17 PM (17 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/template.php
r6551 r6552 284 284 285 285 foreach ( $pages as $page ) { 286 287 // catch and repair bad pages 288 if ( $page->post_parent == $page->ID ) { 289 $page->post_parent = 0; 290 $wpdb->query( $wpdb->prepare("UPDATE $wpdb->posts SET post_parent = '0' WHERE ID = %d", $page->ID) ); 291 clean_page_cache( $page->ID ); 292 } 293 286 294 if ( 0 == $page->post_parent ) 287 295 $top_level_pages[] = $page; -
trunk/wp-includes/classes.php
r6551 r6552 435 435 array_splice( $children_elements, $i, 1 ); 436 436 $output = $this->display_element( $child, $children_elements, $max_depth, $depth + 1, $args, $output ); 437 $i --;437 $i = -1; 438 438 } 439 439 }
Note: See TracChangeset
for help on using the changeset viewer.