]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/cancelgroup.php
Merge branch 'master' of gitorious.org:social/mainline
[quix0rs-gnu-social.git] / actions / cancelgroup.php
index 4196eb3ffc5e01356f79d948bbd7adae191e350f..93f630e0609123a59757bc96fc880279b1bdcffe 100644 (file)
@@ -57,7 +57,6 @@ class CancelgroupAction extends Action
         if (!common_logged_in()) {
             // TRANS: Client error displayed when trying to leave a group while not logged in.
             $this->clientError(_('You must be logged in to leave a group.'));
-            return false;
         }
 
         $nickname_arg = $this->trimmed('nickname');
@@ -71,7 +70,6 @@ class CancelgroupAction extends Action
             if ($nickname_arg != $nickname) {
                 $args = array('nickname' => $nickname);
                 common_redirect(common_local_url('leavegroup', $args), 301);
-                return false;
             }
 
             $local = Local_group::getKV('nickname', $nickname);
@@ -79,27 +77,23 @@ class CancelgroupAction extends Action
             if (!$local) {
                 // TRANS: Client error displayed when trying to leave a non-local group.
                 $this->clientError(_('No such group.'), 404);
-                return false;
             }
 
             $this->group = User_group::getKV('id', $local->group_id);
         } else {
             // TRANS: Client error displayed when trying to leave a group without providing a group name or group ID.
             $this->clientError(_('No nickname or ID.'), 404);
-            return false;
         }
 
         if (!$this->group) {
             // TRANS: Client error displayed when trying to leave a non-existing group.
             $this->clientError(_('No such group.'), 404);
-            return false;
         }
 
         $cur = common_current_user();
         if (empty($cur)) {
             // TRANS: Client error displayed when trying to leave a group while not logged in.
             $this->clientError(_('Must be logged in.'), 403);
-            return false;
         }
         if ($this->arg('profile_id')) {
             if ($cur->isAdmin($this->group)) {
@@ -108,7 +102,6 @@ class CancelgroupAction extends Action
                 // TRANS: Client error displayed when trying to approve or cancel a group join request without
                 // TRANS: being a group administrator.
                 $this->clientError(_('Only group admin can approve or cancel join requests.'), 403);
-                return false;
             }
         } else {
             $this->profile = $cur->getProfile();
@@ -164,9 +157,7 @@ class CancelgroupAction extends Action
             $this->elementEnd('body');
             $this->endHTML();
         } else {
-            common_redirect(common_local_url('groupmembers', array('nickname' =>
-                                                                   $this->group->nickname)),
-                            303);
+            common_redirect(common_local_url('groupmembers', array('nickname' => $this->group->nickname)), 303);
         }
     }
 }