Orphaned page fix from hailin. fixes #5498

git-svn-id: http://svn.automattic.com/wordpress/trunk@6427 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2007-12-20 05:29:52 +00:00
parent de5340b9f3
commit 8273b56d60

View File

@ -260,14 +260,14 @@ function display_page_row( $page, &$children_pages, $level = 0 ) {
if ( ! $children_pages )
return true;
for ( $i=0; $i < count($children_pages); $i++ ) {
for ( $i = 0; $i < count($children_pages); $i++ ) {
$child = $children_pages[$i];
if ( $child->post_parent == $id ) {
array_splice($children_pages, $i, 1);
array_splice($children_pages, $i, 1);
display_page_row($child, $children_pages, $level+1);
$i--;
$i = -1; //as numeric keys in $children_pages are not preserved after splice
}
}
}