OSDN Git Service

BugTrack2/235: Clear the sort_flag: ksort()
authorhenoheno <henoheno>
Sat, 12 May 2007 08:37:38 +0000 (17:37 +0900)
committerumorigu <umorigu@gmail.com>
Tue, 25 Nov 2014 17:27:34 +0000 (02:27 +0900)
lib/func.php
lib/html.php
plugin/attach.inc.php
plugin/related.inc.php
plugin/rename.inc.php
plugin/versionlist.inc.php

index f4f13b7..f38692c 100644 (file)
@@ -388,7 +388,7 @@ function page_list($pages, $cmd = 'read', $withfilename = FALSE)
 
                $list[$head][$page] = $str;
        }
-       ksort($list);
+       ksort($list, SORT_STRING);
 
        $cnt = 0;
        $arr_index = array();
@@ -409,7 +409,7 @@ function page_list($pages, $cmd = 'read', $withfilename = FALSE)
                                '"><strong>' . $head . '</strong></a>' . "\n" .
                                '  <ul>' . "\n";
                }
-               ksort($pages);
+               ksort($pages, SORT_STRING);
                $retval .= join("\n", $pages);
                if ($list_index)
                        $retval .= "\n  </ul>\n </li>\n";
index ec2171f..c0a1ee1 100644 (file)
@@ -187,7 +187,7 @@ function edit_form($page, $postdata, $digest = FALSE, $b_template = TRUE)
                        $pages[$_page] = '   <option value="' . $s_page . '">' .
                                $s_page . '</option>';
                }
-               ksort($pages);
+               ksort($pages, SORT_STRING);
                $s_pages  = join("\n", $pages);
                $template = <<<EOD
   <select name="template_page">
@@ -276,7 +276,7 @@ function make_related($page, $tag = '')
        $links = links_get_related($page);
 
        if ($tag) {
-               ksort($links);
+               ksort($links, SORT_STRING);
        } else {
                arsort($links);
        }
index 355a428..72f70c6 100644 (file)
@@ -27,7 +27,7 @@ define('PLUGIN_ATTACH_DELETE_ADMIN_ONLY', TRUE); // FALSE or TRUE
 
 // ´ÉÍý¼Ô¤¬ÅºÉÕ¥Õ¥¡¥¤¥ë¤òºï½ü¤¹¤ë¤È¤­¤Ï¡¢¥Ð¥Ã¥¯¥¢¥Ã¥×¤òºî¤é¤Ê¤¤
 // PLUGIN_ATTACH_DELETE_ADMIN_ONLY=TRUE¤Î¤È¤­Í­¸ú
-define('PLUGIN_ATTACH_DELETE_ADMIN_NOBACKUP', TRUE); // FALSE or TRUE
+define('PLUGIN_ATTACH_DELETE_ADMIN_NOBACKUP', FALSE); // FALSE or TRUE
 
 // ¥¢¥Ã¥×¥í¡¼¥É/ºï½ü»þ¤Ë¥Ñ¥¹¥ï¡¼¥É¤òÍ׵᤹¤ë(ADMIN_ONLY¤¬Í¥Àè)
 define('PLUGIN_ATTACH_PASSWORD_REQUIRE', FALSE); // FALSE or TRUE
@@ -765,7 +765,7 @@ class AttachFiles
                        if (! isset($_files[0])) {
                                $_files[0] = htmlsc($file);
                        }
-                       ksort($_files);
+                       ksort($_files, SORT_NUMERIC);
                        $_file = $_files[0];
                        unset($_files[0]);
                        $ret .= " <li>$_file\n";
@@ -840,7 +840,7 @@ class AttachPages
                $ret = '';
 
                $pages = array_keys($this->pages);
-               sort($pages);
+               sort($pages, SORT_STRING);
 
                foreach ($pages as $page) {
                        if (check_non_list($page)) continue;
index 82ac11e..66cd03d 100644 (file)
@@ -42,7 +42,7 @@ function plugin_related_action()
                $retval .= '<ul><li>No related pages found.</li></ul>' . "\n";  
        } else {
                // Show count($data)?
-               ksort($data);
+               ksort($data, SORT_STRING);
                $retval .= '<ul>' . "\n";
                foreach ($data as $page=>$time) {
                        $r_page  = rawurlencode($page);
index 604fa7e..1f7c350 100644 (file)
@@ -286,7 +286,7 @@ function plugin_rename_phase3($pages)
 <p>{$_rename_messages['msg_confirm']}</p>
 EOD;
 
-       ksort($pages);
+       ksort($pages, SORT_STRING);
        $ret['body'] .= '<ul>' . "\n";
        foreach ($pages as $old=>$new)
                $ret['body'] .= '<li>' .  make_pagelink(decode($old)) .
@@ -413,7 +413,7 @@ function plugin_rename_getselecttag($page)
                $pages[$_page] = '<option value="' . $s_page . '"' . $selected . '>' .
                        $s_page . '</option>';
        }
-       ksort($pages);
+       ksort($pages, SORT_STRING);
        $list = join("\n" . ' ', $pages);
 
        return <<<EOD
index a8cd838..6af78d6 100644 (file)
@@ -1,11 +1,12 @@
 <?php
-// $Id: versionlist.inc.php,v 1.15 2005/01/29 02:12:52 henoheno Exp $
-/*
- * PukiWiki versionlist plugin
- *
- * CopyRight 2002 S.YOSHIMURA GPL2
- * http://masui.net/pukiwiki/ yosimura@excellence.ac.jp
- */
+// PukiWiki - Yet another WikiWikiWeb clone
+// $Id: versionlist.inc.php,v 1.17 2007/05/12 08:37:38 henoheno Exp $
+// Copyright (C)
+//      2002-2006 PukiWiki Developers Team
+//      2002      S.YOSHIMURA GPL2 yosimura@excellence.ac.jp
+// License: GPL v2
+//
+// Listing cvs revisions of files
 
 function plugin_versionlist_action()
 {
@@ -59,7 +60,7 @@ function plugin_versionlist_convert()
        {
                return '';
        }
-       ksort($comments);
+       ksort($comments, SORT_STRING);
        $retval = '';
        foreach ($comments as $comment)
        {