lists are now sorted correctly at first view
This commit is contained in:
parent
0506e97446
commit
c7a97314df
|
@ -137,8 +137,9 @@ echo "</body></html>\n";
|
||||||
function cmp_array($a, $b) {
|
function cmp_array($a, $b) {
|
||||||
// list specifies the sort column
|
// list specifies the sort column
|
||||||
global $list;
|
global $list;
|
||||||
|
global $attr_array;
|
||||||
// sort by first attribute with name $list
|
// sort by first attribute with name $list
|
||||||
if (!$list) $list = 0;
|
if (!$list) $list = strtolower($attr_array[0]);
|
||||||
if ($a[$list][0] == $b[$list][0]) return 0;
|
if ($a[$list][0] == $b[$list][0]) return 0;
|
||||||
else if ($a[$list][0] == max($a[$list][0], $b[$list][0])) return 1;
|
else if ($a[$list][0] == max($a[$list][0], $b[$list][0])) return 1;
|
||||||
else return -1;
|
else return -1;
|
||||||
|
|
|
@ -119,8 +119,9 @@ echo "</body></html>\n";
|
||||||
function cmp_array($a, $b) {
|
function cmp_array($a, $b) {
|
||||||
// list specifies the sort column
|
// list specifies the sort column
|
||||||
global $list;
|
global $list;
|
||||||
|
global $attr_array;
|
||||||
// sort by first attribute with name $list
|
// sort by first attribute with name $list
|
||||||
if (!$list) $list = 0;
|
if (!$list) $list = strtolower($attr_array[0]);
|
||||||
if ($a[$list][0] == $b[$list][0]) return 0;
|
if ($a[$list][0] == $b[$list][0]) return 0;
|
||||||
else if ($a[$list][0] == max($a[$list][0], $b[$list][0])) return 1;
|
else if ($a[$list][0] == max($a[$list][0], $b[$list][0])) return 1;
|
||||||
else return -1;
|
else return -1;
|
||||||
|
|
Loading…
Reference in New Issue