forked from GNUsocial/gnu-social
Blacklist plugin enabled by default (bug fixes will come)
This commit is contained in:
parent
a53284fe4f
commit
5f24fc0986
@ -345,6 +345,7 @@ $default =
|
||||
'default' => array(
|
||||
'Activity' => array(),
|
||||
'AntiBrute' => array(),
|
||||
'Blacklist' => array(),
|
||||
'Bookmark' => array(),
|
||||
'ClientSideShorten' => array(),
|
||||
'DefaultLayout' => array(),
|
||||
|
@ -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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user