Add secondary date sort for Status
This commit is contained in:
@@ -81,9 +81,16 @@ function csort($array, $column, $ascdec=SORT_ASC){
|
|||||||
if ($column == 'issued') $column = "issuedSort";
|
if ($column == 'issued') $column = "issuedSort";
|
||||||
if ($column == 'expires') $column = 'expiresSort';
|
if ($column == 'expires') $column = 'expiresSort';
|
||||||
|
|
||||||
foreach($array as $x) $sortarr[]=$x[$column];
|
if ($column == 'status') {
|
||||||
array_multisort($sortarr, $ascdec, $array);
|
foreach($array as $x) {
|
||||||
|
$sortarr[]=$x[$column];
|
||||||
|
$sortdate[] = $x['expiresSort'];
|
||||||
|
}
|
||||||
|
array_multisort($sortarr, $ascdec, $sortdate, SORT_ASC, $array);
|
||||||
|
} else {
|
||||||
|
foreach($array as $x) $sortarr[]=$x[$column];
|
||||||
|
array_multisort($sortarr, $ascdec, $array);
|
||||||
|
}
|
||||||
return $array;
|
return $array;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user