コード例 #1
0
ファイル: groupunblock.php プロジェクト: Grasia/bolotweet
 /**
  * Unblock a user.
  *
  * @return void
  */
 function unblockProfile()
 {
     $result = Group_block::unblockProfile($this->group, $this->profile);
     if (!$result) {
         // TRANS: Server error displayed when unblocking a user from a group fails because of an unknown error.
         $this->serverError(_('Error removing the block.'));
         return;
     }
     foreach ($this->args as $k => $v) {
         if ($k == 'returnto-action') {
             $action = $v;
         } else {
             if (substr($k, 0, 9) == 'returnto-') {
                 $args[substr($k, 9)] = $v;
             }
         }
     }
     if ($action) {
         common_redirect(common_local_url($action, $args), 303);
     } else {
         common_redirect(common_local_url('blockedfromgroup', array('nickname' => $this->group->nickname)), 303);
     }
 }