X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FModHelper%2FModHelperPlugin.php;h=2752a2153947302d251aabf8374d381e32412f44;hb=b017675976840cb3622eb801af3dbc7caa93e605;hp=c2757bbeae5cb4c0a974866e140cca788e7bd773;hpb=12588b1cf73fad7d0a76a29a46ec355150eaa54e;p=quix0rs-gnu-social.git diff --git a/plugins/ModHelper/ModHelperPlugin.php b/plugins/ModHelper/ModHelperPlugin.php index c2757bbeae..2752a21539 100644 --- a/plugins/ModHelper/ModHelperPlugin.php +++ b/plugins/ModHelper/ModHelperPlugin.php @@ -27,10 +27,12 @@ if (!defined('STATUSNET')) { */ class ModHelperPlugin extends Plugin { - function onPluginVersion(&$versions) + static $rights = array(Right::SILENCEUSER, Right::TRAINSPAM, Right::REVIEWSPAM); + + function onPluginVersion(array &$versions) { $versions[] = array('name' => 'ModHelper', - 'version' => STATUSNET_VERSION, + 'version' => GNUSOCIAL_VERSION, 'author' => 'Brion Vibber', 'homepage' => 'http://status.net/wiki/Plugin:ModHelper', 'rawdescription' => @@ -42,7 +44,7 @@ class ModHelperPlugin extends Plugin function onUserRightsCheck($profile, $right, &$result) { - if ($right == Right::SILENCEUSER) { + if (in_array($right, self::$rights)) { // Hrm.... really we should confirm that the *other* user isn't privleged. :) if ($profile->hasRole('modhelper')) { $result = true;