リビジョン | a9a1ed42b14f4ce01c6cc9e666c4b740d1262bd4 (tree) |
---|---|
日時 | 2018-06-01 05:28:27 |
作者 | umorigu <umorigu@gmai...> |
コミッター | umorigu |
BugTrack/2473 list plugin: Sort sub pages in natural order
@@ -533,7 +533,7 @@ function page_list($pages, $cmd = 'read', $withfilename = FALSE) | ||
533 | 533 | } else { |
534 | 534 | $href = $script . '?cmd=' . $cmd . '&page='; |
535 | 535 | } |
536 | - | |
536 | + usort($pages, 'strnatcmp'); | |
537 | 537 | foreach($pages as $file=>$page) { |
538 | 538 | $r_page = pagename_urlencode($page); |
539 | 539 | $s_page = htmlsc($page, ENT_QUOTES); |
@@ -568,7 +568,7 @@ function page_list($pages, $cmd = 'read', $withfilename = FALSE) | ||
568 | 568 | $cnt = 0; |
569 | 569 | $arr_index = array(); |
570 | 570 | $retval .= '<ul>' . "\n"; |
571 | - foreach ($list as $head=>$pages) { | |
571 | + foreach ($list as $head=>$sub_pages) { | |
572 | 572 | if ($head === $symbol) { |
573 | 573 | $head = $_msg_symbol; |
574 | 574 | } else if ($head === $other) { |
@@ -584,8 +584,7 @@ function page_list($pages, $cmd = 'read', $withfilename = FALSE) | ||
584 | 584 | '"><strong>' . $head . '</strong></a>' . "\n" . |
585 | 585 | ' <ul>' . "\n"; |
586 | 586 | } |
587 | - ksort($pages, SORT_STRING); | |
588 | - $retval .= join("\n", $pages); | |
587 | + $retval .= join("\n", $sub_pages); | |
589 | 588 | if ($list_index) |
590 | 589 | $retval .= "\n </ul>\n </li>\n"; |
591 | 590 | } |