X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FModHelper%2FModHelperPlugin.php;h=2752a2153947302d251aabf8374d381e32412f44;hb=b017675976840cb3622eb801af3dbc7caa93e605;hp=2d0ae5b029d52eab4a63e0eb5d5f82eca2113779;hpb=90e54f6cf08f74478d152c329363bcd77eea6329;p=quix0rs-gnu-social.git diff --git a/plugins/ModHelper/ModHelperPlugin.php b/plugins/ModHelper/ModHelperPlugin.php index 2d0ae5b029..2752a21539 100644 --- a/plugins/ModHelper/ModHelperPlugin.php +++ b/plugins/ModHelper/ModHelperPlugin.php @@ -27,13 +27,16 @@ 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' => + // TRANS: Plugin description. _m('Lets users who have been manually marked as "modhelper"s silence accounts.')); return true; @@ -41,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; @@ -50,5 +53,4 @@ class ModHelperPlugin extends Plugin } return true; } - }