]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Merge branch 'master' of git@gitorious.org:statusnet/mainline into testing
authorBrion Vibber <brion@pobox.com>
Fri, 9 Apr 2010 19:01:53 +0000 (12:01 -0700)
committerBrion Vibber <brion@pobox.com>
Fri, 9 Apr 2010 19:01:53 +0000 (12:01 -0700)
1  2 
actions/groupmembers.php
actions/subscribers.php

diff --combined actions/groupmembers.php
index 6d0701239ffd26a56318b3fbc2353e837fbc6da8,e72ef371acad7fe36fc67e1d9c96eb2c1d3b16fd..54f1d8dcda748e8fb112c6042e9d4a14ac1f0ca7
@@@ -205,7 -205,8 +205,7 @@@ class GroupMemberListItem extends Profi
              !$this->profile->isAdmin($this->group)) {
              $this->out->elementStart('li', 'entity_make_admin');
              $maf = new MakeAdminForm($this->out, $this->profile, $this->group,
 -                                     array('action' => 'groupmembers',
 -                                           'nickname' => $this->group->nickname));
 +                                     $this->returnToArgs());
              $maf->show();
              $this->out->elementEnd('li');
          }
          if (!empty($user) && $user->id != $this->profile->id && $user->isAdmin($this->group)) {
              $this->out->elementStart('li', 'entity_block');
              $bf = new GroupBlockForm($this->out, $this->profile, $this->group,
 -                                array('action' => 'groupmembers',
 -                                      'nickname' => $this->group->nickname));
 +                                     $this->returnToArgs());
              $bf->show();
              $this->out->elementEnd('li');
          }
  
      function homepageAttributes()
      {
+         $aAttrs = parent::linkAttributes();
          if (common_config('nofollow', 'members')) {
              $aAttrs['rel'] = 'nofollow';
          }
+         return $aAttrs;
      }
 +
 +    /**
 +     * Fetch necessary return-to arguments for the profile forms
 +     * to return to this list when they're done.
 +     * 
 +     * @return array
 +     */
 +    protected function returnToArgs()
 +    {
 +        $args = array('action' => 'groupmembers',
 +                      'nickname' => $this->group->nickname);
 +        $page = $this->out->arg('page');
 +        if ($page) {
 +            $args['param-page'] = $page;
 +        }
 +        return $args;
 +    }
  }
  
  /**
diff --combined actions/subscribers.php
index 6fdf43e2ccdd548855985172773f10e6e7b6a880,6f1520b3f48024959f9bfcecf66050a98ec1c86c..2845a498e991a0c7033f83fe002f09fd58e5376a
@@@ -157,13 -157,9 +157,13 @@@ class SubscribersListItem extends Subsc
          $user = common_current_user();
  
          if (!empty($user) && $this->owner->id == $user->id) {
 -            $bf = new BlockForm($this->out, $this->profile,
 -                                array('action' => 'subscribers',
 -                                      'nickname' => $this->owner->nickname));
 +            $returnto = array('action' => 'subscribers',
 +                              'nickname' => $this->owner->nickname);
 +            $page = $this->out->arg('page');
 +            if ($page) {
 +                $returnto['param-page'] = $page;
 +            }
 +            $bf = new BlockForm($this->out, $this->profile, $returnto);
              $bf->show();
          }
      }
  
      function homepageAttributes()
      {
+         $aAttrs = parent::linkAttributes();
          if (common_config('nofollow', 'subscribers')) {
              $aAttrs['rel'] = 'nofollow';
          }
+         return $aAttrs;
      }
  }