OSDN Git Service

BugTrack2/235: Clear the sort_flag
authorhenoheno <henoheno>
Sat, 12 May 2007 09:17:14 +0000 (18:17 +0900)
committerumorigu <umorigu@gmail.com>
Tue, 25 Nov 2014 17:39:07 +0000 (02:39 +0900)
lib/file.php
lib/html.php
plugin/attach.inc.php
plugin/calendar_viewer.inc.php
plugin/dump.inc.php
plugin/map.inc.php
plugin/rename.inc.php

index 8cfc357..86baffe 100644 (file)
@@ -654,7 +654,7 @@ function get_readings()
 
                if($unknownPage || $deletedPage) {
 
-                       asort($readings); // Sort by pronouncing(alphabetical/reading) order
+                       asort($readings, SORT_STRING); // Sort by pronouncing(alphabetical/reading) order
                        $body = '';
                        foreach ($readings as $page => $reading)
                                $body .= '-[[' . $page . ']] ' . $reading . "\n";
index c0a1ee1..0f6f43a 100644 (file)
@@ -276,9 +276,9 @@ function make_related($page, $tag = '')
        $links = links_get_related($page);
 
        if ($tag) {
-               ksort($links, SORT_STRING);
+               ksort($links, SORT_STRING);             // Page name, alphabetical order
        } else {
-               arsort($links);
+               arsort($links, SORT_NUMERIC);   // Last modified date, newer
        }
 
        $_links = array();
index 72f70c6..5679b21 100644 (file)
@@ -755,7 +755,7 @@ class AttachFiles
 
                $ret = '';
                $files = array_keys($this->files);
-               sort($files);
+               sort($files, SORT_STRING);
 
                foreach ($files as $file) {
                        $_files = array();
index 422059f..0184185 100644 (file)
@@ -149,9 +149,9 @@ function plugin_calendar_viewer_convert()
        closedir($dir);
 
        if ($mode == 'past') {
-               rsort($pagelist);       // New => Old
+               rsort($pagelist, SORT_STRING);  // New => Old
        } else {
-               sort($pagelist);        // Old => New
+               sort($pagelist, SORT_STRING);   // Old => New
        }
 
        // Include start
index c5c683a..c8a54f7 100644 (file)
@@ -1,5 +1,5 @@
 <?php
-// $Id: dump.inc.php,v 1.37 2006/01/12 01:01:35 teanan Exp $
+// $Id: dump.inc.php,v 1.38 2007/05/12 09:17:14 henoheno Exp $
 //
 // Remote dump / restore plugin
 // Originated as tarfile.inc.php by teanan / Interfair Laboratory 2004.
@@ -393,7 +393,7 @@ class tarlib
                }
                closedir($dp);
                
-               sort($files);
+               sort($files, SORT_STRING);
 
                $matches = array();
                foreach($files as $name)
index f3ab427..df80913 100644 (file)
@@ -53,7 +53,7 @@ function plugin_map_action()
 
        if ($reverse) {
                $keys = array_keys($nodes);
-               sort($keys);
+               sort($keys, SORT_STRING);
                $alone = array();
                $retval['body'] .= '<ul>' . "\n";
                foreach ($keys as $page) {
@@ -78,7 +78,7 @@ function plugin_map_action()
                $retval['body'] .= '<hr />' . "\n" .
                        '<p>Not related from ' . htmlsc($refer) . '</p>' . "\n";
                $keys = array_keys($nodes);
-               sort($keys);
+               sort($keys, SORT_STRING);
                $retval['body'] .= '<ul>' . "\n";
                foreach ($keys as $page) {
                        if (! $nodes[$page]->done) {
@@ -142,7 +142,7 @@ class MapNode
                                $refs[] = $ref[0];
                        }
                        $this->hide($refs);
-                       sort($refs);
+                       sort($refs, SORT_STRING);
                }
                return $refs;
        }
@@ -155,7 +155,7 @@ class MapNode
                        $data = file($file);
                        $rels = explode("\t", trim($data[0]));
                        $this->hide($rels);
-                       sort($rels);
+                       sort($rels, SORT_STRING);
                }
                return $rels;
        }
index 1f7c350..7c8b36f 100644 (file)
@@ -166,7 +166,7 @@ $msg
 EOD;
        if (! empty($related)) {
                $ret['body'] .= '<hr /><p>' . $_rename_messages['msg_related'] . '</p><ul>';
-               sort($related);
+               sort($related, SORT_STRING);
                foreach ($related as $name)
                        $ret['body'] .= '<li>' . make_pagelink($name) . '</li>';
                $ret['body'] .= '</ul>';