]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/blockedfromgroup.php
Merge remote-tracking branch 'upstream/master' into social-master
[quix0rs-gnu-social.git] / actions / blockedfromgroup.php
index 6ff572c05d9dea64a4723b059f9d756fe1c6a1eb..60f108dee383a333a35dbcec167655cd1c10512d 100644 (file)
@@ -40,16 +40,16 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
  * @license  http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
  * @link     http://status.net/
  */
-class BlockedfromgroupAction extends GroupDesignAction
+class BlockedfromgroupAction extends GroupAction
 {
     var $page = null;
 
-    function isReadOnly($args)
+    function isReadOnly(array $args=array())
     {
         return true;
     }
 
-    function prepare($args)
+    protected function prepare(array $args=array())
     {
         parent::prepare($args);
         $this->page = ($this->arg('page')) ? ($this->arg('page')+0) : 1;
@@ -65,29 +65,25 @@ class BlockedfromgroupAction extends GroupDesignAction
                 $args['page'] = $this->page;
             }
             common_redirect(common_local_url('blockedfromgroup', $args), 301);
-            return false;
         }
 
         if (!$nickname) {
             // TRANS: Client error displayed when requesting a list of blocked users for a group without providing a group nickname.
             $this->clientError(_('No nickname.'), 404);
-            return false;
         }
 
-        $local = Local_group::staticGet('nickname', $nickname);
+        $local = Local_group::getKV('nickname', $nickname);
 
         if (!$local) {
             // TRANS: Client error displayed when requesting a list of blocked users for a non-local group.
             $this->clientError(_('No such group.'), 404);
-            return false;
         }
 
-        $this->group = User_group::staticGet('id', $local->group_id);
+        $this->group = User_group::getKV('id', $local->group_id);
 
         if (!$this->group) {
             // TRANS: Client error displayed when requesting a list of blocked users for a non-existing group.
             $this->clientError(_('No such group.'), 404);
-            return false;
         }
 
         return true;
@@ -109,9 +105,9 @@ class BlockedfromgroupAction extends GroupDesignAction
         }
     }
 
-    function handle($args)
+    protected function handle()
     {
-        parent::handle($args);
+        parent::handle();
         $this->showPage();
     }
 
@@ -122,12 +118,6 @@ class BlockedfromgroupAction extends GroupDesignAction
                        _('A list of the users blocked from joining this group.'));
     }
 
-    function showLocalNav()
-    {
-        $nav = new GroupNav($this, $this->group);
-        $nav->show();
-    }
-
     function showContent()
     {
         $offset = ($this->page-1) * PROFILES_PER_PAGE;
@@ -161,7 +151,7 @@ class GroupBlockList extends ProfileList
         $this->group = $group;
     }
 
-    function newListItem($profile)
+    function newListItem(Profile $profile)
     {
         return new GroupBlockListItem($profile, $this->group, $this->action);
     }