diff --git a/html/ops/clear_host.php b/html/ops/clear_host.php index b1b852ed12..ee9d36b7c8 100644 --- a/html/ops/clear_host.php +++ b/html/ops/clear_host.php @@ -18,14 +18,14 @@ require_once("../inc/util_ops.inc"); -db_init(); -$hostid = $_GET["hostid"]; +$hostid = get_int("hostid"); -if (!$hostid) { - error_page("no host ID\n"); +$host = BoincHost::lookup_id($hostid); +if (!$host) { + error_page("no such host\n"); } -mysql_query("update host set rpc_time=0 where id='$hostid'"); +$host->update("rpc_time=0"); echo "Host RPC time cleared for host ID: $hostid\n"; admin_page_tail(); diff --git a/html/ops/manage_special_users_action.php b/html/ops/manage_special_users_action.php index 82d1f8b3e7..569871e215 100644 --- a/html/ops/manage_special_users_action.php +++ b/html/ops/manage_special_users_action.php @@ -36,7 +36,7 @@ if ($bitset == "0000000") $bitset = ''; $userid = post_int("userid"); $query = "UPDATE forum_preferences SET special_user='$bitset' WHERE userid='$userid'"; -mysql_query($query); +_mysql_query($query); if (mysql_affected_rows() == 1) { echo "