From 5f24fc098617c7fe20300be79978d77b91bb6523 Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Tue, 25 Apr 2017 20:43:31 +0200 Subject: [PATCH] Blacklist plugin enabled by default (bug fixes will come) --- lib/default.php | 1 + plugins/Blacklist/BlacklistPlugin.php | 8 +++----- 2 files changed, 4 insertions(+), 5 deletions(-) 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)) {