use Friendica\Database\DBM;
use Friendica\Network\Probe;
-require_once('boot.php');
-require_once('include/dba.php');
-require_once('include/text.php');
+require_once 'boot.php';
+require_once 'include/dba.php';
+require_once 'include/text.php';
$a = get_app();
-require_once('.htconfig.php');
+require_once '.htconfig.php';
dba::connect($db_host, $db_user, $db_pass, $db_data);
unset($db_host, $db_user, $db_pass, $db_data);
**/
$net = Probe::uri($argv[1]);
if (in_array($net['network'], array(NETWORK_PHANTOM, NETWORK_MAIL))) {
- echo "This account seems not to exist.";
+ 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));
+$r = dba::select('contact', array('id'), array('nurl' => $nurl, 'uid' => 0), array('limit' => 1));
if (DBM::is_result($r)) {
- dba::update("contact", array("blocked" => true), array("id" => $r["id"]));
+ dba::update('contact', array('blocked' => true), array('id' => $r['id']));
echo "NOTICE: The account should be blocked from the node now\r\n";
} else {
echo "NOTICE: Could not find any entry for this URL (".$nurl.")\r\n";