• R/O
  • HTTP
  • SSH
  • HTTPS

提交

标签
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

修订版a9a1ed42b14f4ce01c6cc9e666c4b740d1262bd4 (tree)
时间2018-06-01 05:28:27
作者umorigu <umorigu@gmai...>
Commiterumorigu

Log Message

BugTrack/2473 list plugin: Sort sub pages in natural order

更改概述

差异

--- a/lib/func.php
+++ b/lib/func.php
@@ -533,7 +533,7 @@ function page_list($pages, $cmd = 'read', $withfilename = FALSE)
533533 } else {
534534 $href = $script . '?cmd=' . $cmd . '&amp;page=';
535535 }
536-
536+ usort($pages, 'strnatcmp');
537537 foreach($pages as $file=>$page) {
538538 $r_page = pagename_urlencode($page);
539539 $s_page = htmlsc($page, ENT_QUOTES);
@@ -568,7 +568,7 @@ function page_list($pages, $cmd = 'read', $withfilename = FALSE)
568568 $cnt = 0;
569569 $arr_index = array();
570570 $retval .= '<ul>' . "\n";
571- foreach ($list as $head=>$pages) {
571+ foreach ($list as $head=>$sub_pages) {
572572 if ($head === $symbol) {
573573 $head = $_msg_symbol;
574574 } else if ($head === $other) {
@@ -584,8 +584,7 @@ function page_list($pages, $cmd = 'read', $withfilename = FALSE)
584584 '"><strong>' . $head . '</strong></a>' . "\n" .
585585 ' <ul>' . "\n";
586586 }
587- ksort($pages, SORT_STRING);
588- $retval .= join("\n", $pages);
587+ $retval .= join("\n", $sub_pages);
589588 if ($list_index)
590589 $retval .= "\n </ul>\n </li>\n";
591590 }