Revision | cef9b6740a91d30b23076e75d34760c5d5bb57c3 (tree) |
---|---|
Time | 2014-11-26 02:39:07 |
Author | henoheno <henoheno> |
Commiter | umorigu |
BugTrack2/235: Clear the sort_flag
@@ -654,7 +654,7 @@ function get_readings() | ||
654 | 654 | |
655 | 655 | if($unknownPage || $deletedPage) { |
656 | 656 | |
657 | - asort($readings); // Sort by pronouncing(alphabetical/reading) order | |
657 | + asort($readings, SORT_STRING); // Sort by pronouncing(alphabetical/reading) order | |
658 | 658 | $body = ''; |
659 | 659 | foreach ($readings as $page => $reading) |
660 | 660 | $body .= '-[[' . $page . ']] ' . $reading . "\n"; |
@@ -276,9 +276,9 @@ function make_related($page, $tag = '') | ||
276 | 276 | $links = links_get_related($page); |
277 | 277 | |
278 | 278 | if ($tag) { |
279 | - ksort($links, SORT_STRING); | |
279 | + ksort($links, SORT_STRING); // Page name, alphabetical order | |
280 | 280 | } else { |
281 | - arsort($links); | |
281 | + arsort($links, SORT_NUMERIC); // Last modified date, newer | |
282 | 282 | } |
283 | 283 | |
284 | 284 | $_links = array(); |
@@ -755,7 +755,7 @@ class AttachFiles | ||
755 | 755 | |
756 | 756 | $ret = ''; |
757 | 757 | $files = array_keys($this->files); |
758 | - sort($files); | |
758 | + sort($files, SORT_STRING); | |
759 | 759 | |
760 | 760 | foreach ($files as $file) { |
761 | 761 | $_files = array(); |
@@ -149,9 +149,9 @@ function plugin_calendar_viewer_convert() | ||
149 | 149 | closedir($dir); |
150 | 150 | |
151 | 151 | if ($mode == 'past') { |
152 | - rsort($pagelist); // New => Old | |
152 | + rsort($pagelist, SORT_STRING); // New => Old | |
153 | 153 | } else { |
154 | - sort($pagelist); // Old => New | |
154 | + sort($pagelist, SORT_STRING); // Old => New | |
155 | 155 | } |
156 | 156 | |
157 | 157 | // Include start |
@@ -1,5 +1,5 @@ | ||
1 | 1 | <?php |
2 | -// $Id: dump.inc.php,v 1.37 2006/01/12 01:01:35 teanan Exp $ | |
2 | +// $Id: dump.inc.php,v 1.38 2007/05/12 09:17:14 henoheno Exp $ | |
3 | 3 | // |
4 | 4 | // Remote dump / restore plugin |
5 | 5 | // Originated as tarfile.inc.php by teanan / Interfair Laboratory 2004. |
@@ -393,7 +393,7 @@ class tarlib | ||
393 | 393 | } |
394 | 394 | closedir($dp); |
395 | 395 | |
396 | - sort($files); | |
396 | + sort($files, SORT_STRING); | |
397 | 397 | |
398 | 398 | $matches = array(); |
399 | 399 | foreach($files as $name) |
@@ -53,7 +53,7 @@ function plugin_map_action() | ||
53 | 53 | |
54 | 54 | if ($reverse) { |
55 | 55 | $keys = array_keys($nodes); |
56 | - sort($keys); | |
56 | + sort($keys, SORT_STRING); | |
57 | 57 | $alone = array(); |
58 | 58 | $retval['body'] .= '<ul>' . "\n"; |
59 | 59 | foreach ($keys as $page) { |
@@ -78,7 +78,7 @@ function plugin_map_action() | ||
78 | 78 | $retval['body'] .= '<hr />' . "\n" . |
79 | 79 | '<p>Not related from ' . htmlsc($refer) . '</p>' . "\n"; |
80 | 80 | $keys = array_keys($nodes); |
81 | - sort($keys); | |
81 | + sort($keys, SORT_STRING); | |
82 | 82 | $retval['body'] .= '<ul>' . "\n"; |
83 | 83 | foreach ($keys as $page) { |
84 | 84 | if (! $nodes[$page]->done) { |
@@ -142,7 +142,7 @@ class MapNode | ||
142 | 142 | $refs[] = $ref[0]; |
143 | 143 | } |
144 | 144 | $this->hide($refs); |
145 | - sort($refs); | |
145 | + sort($refs, SORT_STRING); | |
146 | 146 | } |
147 | 147 | return $refs; |
148 | 148 | } |
@@ -155,7 +155,7 @@ class MapNode | ||
155 | 155 | $data = file($file); |
156 | 156 | $rels = explode("\t", trim($data[0])); |
157 | 157 | $this->hide($rels); |
158 | - sort($rels); | |
158 | + sort($rels, SORT_STRING); | |
159 | 159 | } |
160 | 160 | return $rels; |
161 | 161 | } |
@@ -166,7 +166,7 @@ $msg | ||
166 | 166 | EOD; |
167 | 167 | if (! empty($related)) { |
168 | 168 | $ret['body'] .= '<hr /><p>' . $_rename_messages['msg_related'] . '</p><ul>'; |
169 | - sort($related); | |
169 | + sort($related, SORT_STRING); | |
170 | 170 | foreach ($related as $name) |
171 | 171 | $ret['body'] .= '<li>' . make_pagelink($name) . '</li>'; |
172 | 172 | $ret['body'] .= '</ul>'; |