X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=functions%2Farray.php3;fp=functions%2Farray.php3;h=0000000000000000000000000000000000000000;hb=76619d881ea6ed0dc111b8f968c2c8d6629b30a7;hp=18d0e83baba4389ba3836d6ded1cac3d72d55a14;hpb=5ca9330c3ade39386ed3646390d3fa704eefd3d3;p=squirrelmail.git diff --git a/functions/array.php3 b/functions/array.php3 deleted file mode 100644 index 18d0e83b..00000000 --- a/functions/array.php3 +++ /dev/null @@ -1,33 +0,0 @@ -col and $this->dir in a class - // Would beat using globals - if(!is_array($col)){ - $col = array("$col"); - } - $GLOBALS["col"] = $col; // Column or Columns as an array - $GLOBALS["dir"] = $dir; // Direction, a positive number for ascending a negative for descending - - function comp2($a,$b,$i = 0) { - global $col; - global $dir; - $c = count($col) -1; - if ($a["$col[$i]"] == $b["$col[$i]"]){ - $r = 0; - while($i < $c && $r == 0){ - $i++; - $r = comp2($a,$b,$i); - } - } elseif($a["$col[$i]"] < $b["$col[$i]"]){ - $r = -1 * $dir; // Im not sure why you must * dir here, but it wont work just before the return... - } else { - $r = 1 * $dir; - } - return $r; - } - - usort($ary,comp2); - return $ary; - } -?>