X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FUserLimit%2FUserLimitPlugin.php;h=412f8604a55d7b4e9295e3490f07f88aceeefd0b;hb=8c710ad2c1b80544acccb515f7b601aadff2de16;hp=ab3187299ed8ef2eec4f99e561f3a012c7ad996a;hpb=99194e03fa50b61f99164674afc949b4bbefd44a;p=quix0rs-gnu-social.git diff --git a/plugins/UserLimit/UserLimitPlugin.php b/plugins/UserLimit/UserLimitPlugin.php index ab3187299e..412f8604a5 100644 --- a/plugins/UserLimit/UserLimitPlugin.php +++ b/plugins/UserLimit/UserLimitPlugin.php @@ -45,7 +45,6 @@ if (!defined('STATUSNET')) { * * @seeAlso Location */ - class UserLimitPlugin extends Plugin { public $maxUsers = null; @@ -65,13 +64,16 @@ class UserLimitPlugin extends Plugin function _checkMaxUsers() { if (!is_null($this->maxUsers)) { - $cls = new User(); $cnt = $cls->count(); if ($cnt >= $this->maxUsers) { - $msg = sprintf(_('Cannot register; maximum number of users (%d) reached.'), + // TRANS: Error message given if creating a new user is not possible because a limit has been reached. + // TRANS: %d is the user limit (also available for plural). + $msg = sprintf(_m('Cannot register because the maximum number of users (%d) for this site was reached.', + 'Cannot register because the maximum number of users (%d) for this site was reached.', + $this->maxUsers), $this->maxUsers); throw new ClientException($msg); @@ -86,6 +88,7 @@ class UserLimitPlugin extends Plugin 'author' => 'Evan Prodromou', 'homepage' => 'http://status.net/wiki/Plugin:UserLimit', 'description' => + // TRANS: Plugin description. _m('Limit the number of users who can register.')); return true; }