some more minor stuff
This commit is contained in:
parent
d9185540a5
commit
8a91e631cf
1 changed files with 7 additions and 7 deletions
|
@ -33,11 +33,11 @@ if ($argc != 2 || $argv[1] == "-h" || $argv[1] == "--help" || $argv[1] == "-?")
|
|||
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);
|
||||
|
@ -49,14 +49,14 @@ 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";
|
||||
|
|
Loading…
Reference in a new issue