some more minor stuff
This commit is contained in:
parent
d9185540a5
commit
8a91e631cf
|
@ -33,11 +33,11 @@ if ($argc != 2 || $argv[1] == "-h" || $argv[1] == "--help" || $argv[1] == "-?")
|
||||||
use Friendica\Database\DBM;
|
use Friendica\Database\DBM;
|
||||||
use Friendica\Network\Probe;
|
use Friendica\Network\Probe;
|
||||||
|
|
||||||
require_once('boot.php');
|
require_once 'boot.php';
|
||||||
require_once('include/dba.php');
|
require_once 'include/dba.php';
|
||||||
require_once('include/text.php');
|
require_once 'include/text.php';
|
||||||
$a = get_app();
|
$a = get_app();
|
||||||
require_once('.htconfig.php');
|
require_once '.htconfig.php';
|
||||||
|
|
||||||
dba::connect($db_host, $db_user, $db_pass, $db_data);
|
dba::connect($db_host, $db_user, $db_pass, $db_data);
|
||||||
unset($db_host, $db_user, $db_pass, $db_data);
|
unset($db_host, $db_user, $db_pass, $db_data);
|
||||||
|
@ -49,14 +49,14 @@ unset($db_host, $db_user, $db_pass, $db_data);
|
||||||
**/
|
**/
|
||||||
$net = Probe::uri($argv[1]);
|
$net = Probe::uri($argv[1]);
|
||||||
if (in_array($net['network'], array(NETWORK_PHANTOM, NETWORK_MAIL))) {
|
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";
|
echo "\r\n";
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
$nurl = normalise_link($net['url']);
|
$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)) {
|
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";
|
echo "NOTICE: The account should be blocked from the node now\r\n";
|
||||||
} else {
|
} else {
|
||||||
echo "NOTICE: Could not find any entry for this URL (".$nurl.")\r\n";
|
echo "NOTICE: Could not find any entry for this URL (".$nurl.")\r\n";
|
||||||
|
|
Loading…
Reference in New Issue
Block a user