X-Git-Url: https://jfr.im/git/irc/unrealircd/unrealircd-webpanel.git/blobdiff_plain/064843a8e47d8d7c7c5d3c6d110c869053da1c84..47aad98291fb8ad90cb308ba21fe73c7c7ccd843:/api/channels.php diff --git a/api/channels.php b/api/channels.php index 13c932a..b18867b 100644 --- a/api/channels.php +++ b/api/channels.php @@ -2,7 +2,6 @@ define('NO_EVENT_STREAM_HEADER',1); require_once('common_api.php'); -header("Content-type: application/json; charset=utf-8"); if (!$rpc) die(json_encode([])); @@ -32,7 +31,7 @@ foreach($channels as $channel) function custom_sort($a,$b) { - return ($b["Users"] > $a["Users"]) ? true : false; + return $b["Users"] <=> $a["Users"]; } usort($out, "custom_sort");