]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Merge branch 'master' of https://git.gnu.io/gnu/gnu-social into social-master
authorRoland Haeder <roland@mxchange.org>
Sat, 4 Jul 2015 18:02:11 +0000 (20:02 +0200)
committerRoland Haeder <roland@mxchange.org>
Sat, 4 Jul 2015 18:02:17 +0000 (20:02 +0200)
Signed-off-by: Roland Haeder <roland@mxchange.org>
1  2 
lib/profileaction.php

diff --combined lib/profileaction.php
index 1cda2b509422f451db256b7d2adf97da25c8adcc,d98bcd7f7433387a45715ab706bfda5b4a1115a0..39e4375f8aa120b279104467d7e70b89136b95b2
@@@ -41,7 -41,7 +41,7 @@@ if (!defined('GNUSOCIAL')) { exit(1); 
   * @license  http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
   * @link     http://status.net/
   */
- abstract class ProfileAction extends ManagedAction implements NoticestreamAction
+ abstract class ProfileAction extends ManagedAction
  {
      var $page    = null;
      var $tag     = null;
          $this->page = ($this->arg('page')) ? ($this->arg('page')+0) : 1;
          common_set_returnto($this->selfUrl());
  
-         // fetch the actual stream stuff
-         $stream = $this->getStream();
-         $this->notice = $stream->getNotices(($this->page-1) * NOTICES_PER_PAGE, NOTICES_PER_PAGE + 1);
-         if ($this->page > 1 && $this->notice->N == 0) {
-             // TRANS: Client error when page not found (404).
-             $this->clientError(_('No such page.'), 404);
-         }
          return true;
      }
  
@@@ -88,7 -78,7 +78,7 @@@
          return $this->target;
      }
  
 -    function isReadOnly($args)
 +    function isReadOnly(array $args=array())
      {
          return true;
      }
          // TRANS: H2 text for user statistics.
          $this->element('h2', null, _('Statistics'));
  
 -        $profile = $this->target;
 -        $actionParams = array('nickname' => $profile->nickname);
 +        $actionParams = array('nickname' => $this->target->nickname);
          $stats = array(
              array(
                  'id' => 'user-id',
                  // TRANS: Label for user statistics.
                  'label' => _('User ID'),
 -                'value' => $profile->id,
 +                'value' => $this->target->id,
              ),
              array(
                  'id' => 'member-since',
                  // TRANS: Label for user statistics.
                  'label' => _('Member since'),
 -                'value' => date('j M Y', strtotime($profile->created))
 +                'value' => date('j M Y', strtotime($this->target->created))
              ),
              array(
                  'id' => 'notices',
          );
  
          // Give plugins a chance to add stats entries
 -        Event::handle('ProfileStats', array($profile, &$stats));
 +        Event::handle('ProfileStats', array($this->target, &$stats));
  
          foreach ($stats as $row) {
              $this->showStatsRow($row);
  
  class SubscribersMiniList extends ProfileMiniList
  {
 -    function newListItem($profile)
 +    function newListItem(Profile $profile)
      {
          return new SubscribersMiniListItem($profile, $this->action);
      }