public static function gen_json($settings) { ob_start(); Bans::stream_json(false, true, true, array()); $out = ob_get_contents(); ob_end_clean(); return $out; }
function mod_bans_json() { global $config, $mod; if (!hasPermission($config['mod']['ban'])) { error($config['error']['noaccess']); } // Compress the json for faster loads if (isset($_SERVER['HTTP_ACCEPT_ENCODING']) && substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')) { ob_start("ob_gzhandler"); } Bans::stream_json(false, !hasPermission($config['mod']['show_ip']), !hasPermission($config['mod']['view_banstaff']), $mod['boards']); }