]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/unsilence.php
Improved type-hint for following methods:
[quix0rs-gnu-social.git] / actions / unsilence.php
index 723bf1bed5c92a1bb95c877d4c72012d1257838b..cde37201b16f66779c4879789c5e20a27f1e2963 100644 (file)
@@ -49,7 +49,7 @@ class UnsilenceAction extends ProfileFormAction
      *
      * @return boolean success flag
      */
-    function prepare($args)
+    function prepare(array $args=array())
     {
         if (!parent::prepare($args)) {
             return false;
@@ -62,7 +62,6 @@ class UnsilenceAction extends ProfileFormAction
         if (!$cur->hasRight(Right::SILENCEUSER)) {
             // TRANS: Client error on page to unsilence a user when the feature is not enabled.
             $this->clientError(_('You cannot silence users on this site.'));
-            return false;
         }
 
         assert(!empty($this->profile)); // checked by parent
@@ -70,7 +69,6 @@ class UnsilenceAction extends ProfileFormAction
         if (!$this->profile->isSilenced()) {
             // TRANS: Client error on page to unsilence a user when the to be unsilenced user has not been silenced.
             $this->clientError(_('User is not silenced.'));
-            return false;
         }
 
         return true;