- /**
- * Check parameters
- *
- * @param array $args action arguments (URL, GET, POST)
- *
- * @return boolean success flag
- */
-
- function prepare($args)
- {
- if (!parent::prepare($args)) {
- return false;
- }
-
- $cur = common_current_user();
-
- assert(!empty($cur)); // checked by parent
-
- if (!$cur->hasRight(Right::SILENCEUSER)) {
- $this->clientError(_("You cannot silence users on this site."));
- return false;
- }
-
- assert(!empty($this->profile)); // checked by parent
-
- if ($this->profile->isSilenced()) {
- $this->clientError(_("User is already silenced."));
- return false;
- }
-
- return true;
- }
-
- /**
- * Silence a user.
- *
- * @return void
- */
-