mail/mai! }=V }=V lle.de/i /var/qmail/mailnames/bambule-kletterhalle.de/info/Maildir/./cur/1693835808.M737575P942943.w12,S=146543,W=148634:2,S dir/! p}=V Z P33560041 }=V }=V /var/qmail/maln0 Q8V R3Pil/mailnames/bambule-kletterhalle.de/info/Maildir/.Spam% epth 1 -mindepth 1 -type d ! -name *.Spam* -and ! -name .Drafts :Z 1 mA8V R3P}=V }=V }=V }=V p}=V P}=V }=V }=V }=V `}=V }=V P22059.w12,S=5749,W=5885:2,Sa /var/qmail/mailnames/nicolas-lang.de/uni/Maildir/./cur/1487591118.M689951P22059.w12,S=7752,W=7952:2,Sa /var/qmail/mailnames/nicolas-lang.de/uni/Maildir/./cur/1487591201.M508056P22059.w12,S=735lnames/nic :Z :Z r/.NAS/cur/1736240619.M2 :Z :Z ,W=3870:2,S 3807,W=3871: `}=V :Z /nicolas! 0}=V :Z @ 8V il/mailnames/nicolas-lang.de/mail/Maildir/.NAS/cur/1764790585.M156822P1395275.w12,S=3763,W=3826:2,S 1.M202902P131 @}=V 5}=V 2,S /var/qmail,S :Z :Z ames/nicolas-lang.de/maiQ :Z :Z 15799.M376954P766890.w12,S=3812,W=3876:2,Sa /v820 M478V R3P=37438:2,S s-lang.de/divq `}=V :Z 2021/cur! }=V :Z @ 8V il/mailnames/nicolas-lang.de/mail/Maildir/./cur/1741621146.M270601P387856.w12,S=35920,W=36416:2,S :Z ames/nic `}=V :Z ildir/.A! p}=V :Z @ 8V il/mailnames/nicolas-lang.de/mail/Maildir/./cur/1741652968.M19101P1001510.w12,S=52626,W=54057:2,Sa d}=V `}=V :Z g.de/div! 0}=V :Z @ =8V il/mailnames/nicolas-lang.de/mail/Maildir/./cur/1758177933.M412809P1084608.w12,S=223709,W=227390:2,Sa P 1 `}=V :Z ames/nic! }=V :Z @ }8V il/mailnames/nicolas-lang.de/mail/Maildir/./cur/1729110808.M375749P3485505.w12,S=5697,W=5788:2,Sa ,Sa d}=V q n}=V #-~=V m8V ! }=V :Z @ 0 8V }=V }=V B}=V /var/qmail/mailnames/bambule-kletterhalle.de/info/Maildir/./cur/1730233749.M169408P1861190.w12,S=4458,W=4538:2,RS /var! }=V Z ! }=V }=V /var/qmail/mailnames/bambule-kletterhalle.de/info/Maildir/./cur/1734074571.M445066P4120047.w12,S=43973,W=45133:2,S 6024P! p}=V Z ! }=V }=V /var/qmail/mailnames/bambule-kletterhalle.de/info/Maildir/./cur/1744898623.M416216P3832485.w12,S=42319,W=43455:2,S halle! 0}=V Z ! P}=V p}=V /var/qmail/mailnames/bambule-kletterhalle.de/info/Maildir/./cur/1730190998.M419816P130810.w12,S=30813,W=31256:2,S /var! }=V Z ! }=V 0}=V /var/qmail/mailnames/bambule-kletterhalle.de/info/Maildir/./cur/1722341118.M7647P2070647.w12,S=39533,W=40063:2,S .M9224! }=V Z ! }=V }=V /var/qmail/mailnames/bambule-kletterhalle.de/info/Maildir/./cur/1733161887.M373152P2851135.w12,S=42328,W=43460:2,S e.de/! p}=V Z ! }=V }=V /var/qmail/mailnames/bambule-kletterhalle.de/info/Maildir/./cur/1745317491.M462588P2505453.w12,S=149642,W=151657:2,S r/q! 0}=V Z ! P}=V p}=V /var/qmail/mailnames/bambule-kletterhalle.de/info/Maildir/./cur/1652003850.M140536P719196.w12,S=13673,W=13970:2,RS S 99P! }=V Z ! }=V 0}=V /var/qmail/mailnames/bambule-kletterhalle.de/info/Maildir/./cur/1743608518.M157152P2842076.w12,S=24611,W=25082:2,RS .de/! }=V Z ! }=V }=V /var/qmail/mailnames/bambule-kletterhalle.de/info/Maildir/./cur/1728964891.M645753P1532340.w12,S=63259,W=64709:2,S ar/q! p}=V Z ! }=V }=V /var/qmail/mailnges * children_pages is two dimensional array, eg. * children_pages[10][] contains all sub-pages whose parent is 10. * It only takes O( N ) to arrange this and it takes O( 1 ) for subsequent lookup operations * If searching, ignore hierarchy and treat everything as top level */ if ( empty( $_REQUEST['s'] ) ) { $top_level_pages = []; $children_pages = []; $pages_map = []; foreach ( $pages as $page ) { // Catch and repair bad pages. if ( $page->post_parent === $page->ID ) { $page->post_parent = 0; } if ( $page->post_parent === 0 ) { $top_level_pages[] = $page; } else { $children_pages[ $page->post_parent ][] = $page; } $pages_map[ $page->ID ] = $page; } $pages = &$top_level_pages; } $count = 0; $start = ( ( $pagenum - 1 ) * $per_page ); $end = ( $start + $per_page ); $to_display = []; foreach ( $pages as $page ) { if ( $count >= $end ) { break; } if ( $count >= $start ) { $to_display[] = $page->ID; } ++$count; $this->get_child_page_ids( $children_pages, $count, $page->ID, $start, $end, $to_display, $pages_map ); } // If it is the last pagenum and there are orphaned pages, display them with paging as well. if ( isset( $children_pages ) && $count < $end ) { foreach ( $children_pages as $orphans ) { foreach ( $orphans as $op ) { if ( $count >= $end ) { break; } if ( $count >= $start ) { $to_display[] = $op->ID; } ++$count; } } } return $to_display; } /** * Adds all child pages due to be shown on the current page to the $to_display array. * Copied over with some changes from WP_Posts_List_Table::_page_rows. * * @param array $children_pages The full map of child pages. * @param int $count The number of pages already processed. * @param int $parent_id The id of the parent that's currently being processed. * @param int $start The number at which the current overview starts. * @param int $end The number at which the current overview ends. * @param int $to_display The page IDs to be shown. * @param int $pages_map A map of page ID to an object with ID and post_parent. * * @return void */ private function get_child_page_ids( &$children_pages, &$count, $parent_id, $start, $end, &$to_display, &$pages_map ) { if ( ! isset( $children_pages[ $parent_id ] ) ) { return; } foreach ( $children_pages[ $parent_id ] as $page ) { if ( $count >= $end ) { break; } // If the page starts in a subtree, print the parents. if ( $count === $start && $page->post_parent > 0 ) { $my_parents = []; $my_parent = $page->post_parent; while ( $my_parent ) { // Get the ID from the list or the attribute if my_parent is an object. $parent_id = $my_parent; if ( \is_object( $my_parent ) ) { $parent_id = $my_parent->ID; } $my_parent = $pages_map[ $parent_id ]; $my_parents[] = $my_parent; if ( ! $my_parent->post_parent ) { break; } $my_parent = $my_parent->post_parent; } while ( $my_parent = \array_pop( $my_parents ) ) { $to_display[] = $my_parent->ID; } } if ( $count >= $start ) { $to_display[] = $page->ID; } ++$count; $this->get_child_page_ids( $children_pages, $count, $page->ID, $start, $end, $to_display, $pages_map ); } unset( $children_pages[ $parent_id ] ); // Required in order to keep track of orphans. } }