]> git.mxchange.org Git - friendica.git/commitdiff
Remove util/global_community_silence
authorHypolite Petovan <mrpetovan@gmail.com>
Mon, 19 Mar 2018 03:40:06 +0000 (23:40 -0400)
committerHypolite Petovan <mrpetovan@gmail.com>
Mon, 19 Mar 2018 03:40:06 +0000 (23:40 -0400)
- Update wrong comment block for Console\Maintenance

src/Core/Console/Maintenance.php
util/global_community_silence.php [deleted file]

index f9a4f9d2d2d3ffc85b22b7fbbf2b696388e19e07..19067940d178175d6f5c05e35a4ed1b12674487b 100644 (file)
@@ -8,24 +8,8 @@ require_once 'boot.php';
 require_once 'include/dba.php';\r
 \r
 /**\r
- * @brief tool to silence accounts on the global community page\r
+ * @brief Sets maintenance mode for this node\r
  *\r
- * With this tool, you can silence an account on the global community page.\r
- * Postings from silenced accounts will not be displayed on the community\r
- * page. This silencing does only affect the display on the community page,\r
- * accounts following the silenced accounts will still get their postings.\r
- *\r
- * Usage: pass the URL of the profile to be silenced account as only parameter\r
- *        at the command line when running this tool. E.g.\r
- *\r
- *        $> util/global_community_silence.php http://example.com/profile/bob\r
- *\r
- *        will silence bob@example.com so that his postings won't appear at\r
- *        the global community page.\r
- *\r
- * License: AGPLv3 or later, same as Friendica\r
- *\r
- * @author Tobias Diekershoff\r
  * @author Hypolite Petovan <mrpetovan@gmail.com>\r
  */\r
 class Maintenance extends \Asika\SimpleConsole\Console\r
diff --git a/util/global_community_silence.php b/util/global_community_silence.php
deleted file mode 100755 (executable)
index 2eb76a4..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-#!/usr/bin/env php
-<?php
-
-/**
- * @brief tool to silence accounts on the global community page
- *
- * With this tool, you can silence an account on the global community page.
- * Postings from silenced accounts will not be displayed on the community
- * page. This silencing does only affect the display on the community page,
- * accounts following the silenced accounts will still get their postings.
- *
- * Usage: pass the URL of the profile to be silenced account as only parameter
- *        at the command line when running this tool. E.g.
- *
- *        $> util/global_community_silence.php http://example.com/profile/bob
- *
- *        will silence bob@example.com so that his postings won't appear at
- *        the global community page.
- *
- * 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: Silence bob@example.com\r\n";
-       echo "$> ".$argv[0]." https://example.com/profiles/bob\r\n";
-       echo "\r\n";
-       exit(0);
-}
-
-use Friendica\Database\DBM;
-use Friendica\Network\Probe;
-
-require_once 'boot.php';
-require_once 'include/dba.php';
-require_once 'include/text.php';
-$a = get_app();
-require_once '.htconfig.php';
-
-dba::connect($db_host, $db_user, $db_pass, $db_data);
-unset($db_host, $db_user, $db_pass, $db_data);
-
-/**
- * 1. make nurl from last parameter
- * 2. check DB (contact) if there is a contact with uid=0 and that nurl, get the ID
- * 3. set the flag hidden=1 for the contact entry with the found ID
- **/
-$net = Probe::uri($argv[1]);
-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']);
-$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";
-}
-
-?>