From: Mikael Nordfeldth Date: Tue, 25 Apr 2017 18:43:31 +0000 (+0200) Subject: Blacklist plugin enabled by default (bug fixes will come) X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=5f24fc098617c7fe20300be79978d77b91bb6523;p=quix0rs-gnu-social.git Blacklist plugin enabled by default (bug fixes will come) --- diff --git a/lib/default.php b/lib/default.php index 74ab982958..83dc58f898 100644 --- a/lib/default.php +++ b/lib/default.php @@ -345,6 +345,7 @@ $default = 'default' => array( 'Activity' => array(), 'AntiBrute' => array(), + 'Blacklist' => array(), 'Bookmark' => array(), 'ClientSideShorten' => array(), 'DefaultLayout' => array(), diff --git a/plugins/Blacklist/BlacklistPlugin.php b/plugins/Blacklist/BlacklistPlugin.php index 31929fcadc..66ea408165 100644 --- a/plugins/Blacklist/BlacklistPlugin.php +++ b/plugins/Blacklist/BlacklistPlugin.php @@ -27,9 +27,7 @@ * @link http://status.net/ */ -if (!defined('STATUSNET')) { - exit(1); -} +if (!defined('GNUSOCIAL')) { exit(1); } /** * Plugin to prevent use of nicknames or URLs on a blacklist @@ -483,7 +481,7 @@ class BlacklistPlugin extends Plugin */ function onStartSubscribe(Profile $subscriber, Profile $other) { - foreach (array($other->profileurl, $other->homepage) as $url) { + foreach ([$other->getUrl(), $other->getHomepage()] as $url) { if (empty($url)) { continue; @@ -499,7 +497,7 @@ class BlacklistPlugin extends Plugin } } - $nickname = $other->nickname; + $nickname = $other->getNickname(); if (!empty($nickname)) { if (!$this->_checkNickname($nickname)) {