]> git.mxchange.org Git - friendica.git/commitdiff
Remove util/global_community_block
authorHypolite Petovan <mrpetovan@gmail.com>
Mon, 19 Mar 2018 03:39:26 +0000 (23:39 -0400)
committerHypolite Petovan <mrpetovan@gmail.com>
Mon, 19 Mar 2018 03:39:26 +0000 (23:39 -0400)
util/global_community_block.php [deleted file]

diff --git a/util/global_community_block.php b/util/global_community_block.php
deleted file mode 100755 (executable)
index 02f0c53..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-#!/usr/bin/env php
-<?php
-/**
- * @brief tool to block an account from the node
- *
- * With this tool, you can block an account in such a way, that no postings
- * or comments this account writes are accepted to the node.
- *
- * Usage: pass the URL of the to be blocked account as only parameter
- *        at the command line when running this tool. E.g.
- *
- *        $> util/global_community_block.php http://example.com/profile/bob
- *
- *        will block bob@example.com.
- *
- * Author: Tobias Diekershoff
- *
- * License: AGPLv3 or later, same as Friendica
- */
-if ($argc != 2 || $argv[1] == "-h" || $argv[1] == "--help" || $argv[1] == "-?") {
-       echo "Usage: " . $argv[0] . " [-h|profile_url]\r\n";
-       echo "    -h, -?, --help ... show this help\r\n";
-       echo "    profile_url ...... The URL of the profile you want to silence\r\n";
-       echo "\r\n";
-       echo "Example: block bob@example.com\r\n";
-       echo "$> " . $argv[0] . " https://example.com/profiles/bob\r\n";
-       echo "\r\n";
-       exit(0);
-}
-
-use Friendica\BaseObject;
-use Friendica\Core\L10n;
-use Friendica\Model\Contact;
-
-require_once 'boot.php';
-require_once 'include/dba.php';
-require_once 'include/text.php';
-
-$a = get_app();
-BaseObject::setApp($a);
-
-require_once '.htconfig.php';
-dba::connect($db_host, $db_user, $db_pass, $db_data);
-unset($db_host, $db_user, $db_pass, $db_data);
-
-$contact_id = Contact::getIdForURL($argv[1]);
-if (!$contact_id) {
-       echo L10n::t('Could not find any contact entry for this URL (%s)', $nurl);
-       echo "\r\n";
-       exit(1);
-}
-Contact::block($contact_id);
-echo L10n::t('The contact has been blocked from the node');
-echo "\r\n";
-exit(0);