* 3. set the flag hidden=1 for the contact entry with the found ID
**/
$net = Probe::uri($argv[1]);
-if (in_array($net['network'], array(NETWORK_PHANTOM, NETWORK_MAIL))) {
+if (in_array($net['network'], [NETWORK_PHANTOM, NETWORK_MAIL])) {
echo "This account seems not to exist.";
echo "\r\n";
exit(1);
}
$nurl = normalise_link($net['url']);
-$r = dba::select("contact", array("id"), array("nurl" => $nurl, "uid" => 0), array("limit" => 1));
-if (DBM::is_result($r)) {
- dba::update("contact", array("hidden" => true), array("id" => $r["id"]));
+$contact = dba::selectFirst("contact", ["id"], ["nurl" => $nurl, "uid" => 0]);
+if (DBM::is_result($contact)) {
+ dba::update("contact", ["hidden" => true], ["id" => $contact["id"]]);
echo "NOTICE: The account should be silenced from the global community page\r\n";
} else {
echo "NOTICE: Could not find any entry for this URL (".$nurl.")\r\n";