• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Frequently used words (click to add to your profile)

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

Commit MetaInfo

Revisãoa33db83e25f27a1b862e87da1133dbf9240b5815 (tree)
Hora2016-11-08 03:03:28
Autorumorigu <umorigu@gmai...>
Commiterumorigu

Mensagem de Log

BugTrack/2108 Use case insensitive index chars for page list

Mudança Sumário

Diff

--- a/lib/func.php
+++ b/lib/func.php
@@ -1,8 +1,8 @@
11 <?php
22 // PukiWiki - Yet another WikiWikiWeb clone.
3-// $Id: func.php,v 1.104 2011/01/25 15:01:01 henoheno Exp $
4-// Copyright (C)
5-// 2002-2006 PukiWiki Developers Team
3+// func.php
4+// Copyright
5+// 2002-2016 PukiWiki Development Team
66 // 2001-2002 Originally written by yu-ji
77 // License: GPL v2 or (at your option) any later version
88 //
@@ -383,7 +383,7 @@ function page_list($pages, $cmd = 'read', $withfilename = FALSE)
383383 // WARNING: Japanese code hard-wired
384384 if($pagereading_enable) {
385385 if(mb_ereg('^([A-Za-z])', mb_convert_kana($page, 'a'), $matches)) {
386- $head = $matches[1];
386+ $head = strtoupper($matches[1]);
387387 } elseif (isset($readings[$page]) && mb_ereg('^([ァ-ヶ])', $readings[$page], $matches)) { // here
388388 $head = $matches[1];
389389 } elseif (mb_ereg('^[ -~]|[^ぁ-ん亜-熙]', $page)) { // and here
@@ -392,13 +392,13 @@ function page_list($pages, $cmd = 'read', $withfilename = FALSE)
392392 $head = $other;
393393 }
394394 } else {
395- $head = (preg_match('/^([A-Za-z])/', $page, $matches)) ? $matches[1] :
395+ $head = (preg_match('/^([A-Za-z])/', $page, $matches)) ? strtoupper($matches[1]) :
396396 (preg_match('/^([ -~])/', $page) ? $symbol : $other);
397397 }
398398
399399 $list[$head][$page] = $str;
400400 }
401- ksort($list, SORT_STRING);
401+ uksort($pages, 'strnatcmp');
402402
403403 $cnt = 0;
404404 $arr_index = array();
@@ -788,4 +788,3 @@ if (! function_exists('sha1')) {
788788 }
789789 }
790790 }
791-