X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FModHelper%2FModHelperPlugin.php;h=1aa9dad1007c3ec8ac2496a2126b637feb574a8f;hb=2c5cba28b6a8e13a58fe7584835340aa9779b146;hp=c2757bbeae5cb4c0a974866e140cca788e7bd773;hpb=0dbdcf2936a00282114f1368ead2f5edebc6ae61;p=quix0rs-gnu-social.git diff --git a/plugins/ModHelper/ModHelperPlugin.php b/plugins/ModHelper/ModHelperPlugin.php index c2757bbeae..1aa9dad100 100644 --- a/plugins/ModHelper/ModHelperPlugin.php +++ b/plugins/ModHelper/ModHelperPlugin.php @@ -27,12 +27,14 @@ 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', + 'homepage' => 'https://git.gnu.io/gnu/gnu-social/tree/master/plugins/ModHelper', 'rawdescription' => // TRANS: Plugin description. _m('Lets users who have been manually marked as "modhelper"s silence accounts.')); @@ -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;