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(
|
'default' => array(
|
||||||
'Activity' => array(),
|
'Activity' => array(),
|
||||||
'AntiBrute' => array(),
|
'AntiBrute' => array(),
|
||||||
|
'Blacklist' => array(),
|
||||||
'Bookmark' => array(),
|
'Bookmark' => array(),
|
||||||
'ClientSideShorten' => array(),
|
'ClientSideShorten' => array(),
|
||||||
'DefaultLayout' => array(),
|
'DefaultLayout' => array(),
|
||||||
|
@ -27,9 +27,7 @@
|
|||||||
* @link http://status.net/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('STATUSNET')) {
|
if (!defined('GNUSOCIAL')) { exit(1); }
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Plugin to prevent use of nicknames or URLs on a blacklist
|
* 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)
|
function onStartSubscribe(Profile $subscriber, Profile $other)
|
||||||
{
|
{
|
||||||
foreach (array($other->profileurl, $other->homepage) as $url) {
|
foreach ([$other->getUrl(), $other->getHomepage()] as $url) {
|
||||||
|
|
||||||
if (empty($url)) {
|
if (empty($url)) {
|
||||||
continue;
|
continue;
|
||||||
@ -499,7 +497,7 @@ class BlacklistPlugin extends Plugin
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$nickname = $other->nickname;
|
$nickname = $other->getNickname();
|
||||||
|
|
||||||
if (!empty($nickname)) {
|
if (!empty($nickname)) {
|
||||||
if (!$this->_checkNickname($nickname)) {
|
if (!$this->_checkNickname($nickname)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user