X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=actions%2Fshowprofiletag.php;h=6ba0c18f90fdb65d3ad6b6cd1b1483402b626913;hb=76c9971c31115801a1d2e8f66d6f521c28d632a4;hp=ec1837f835866a8a78d89545c4306caaf91cd9bf;hpb=f519858044a627e99244b334b7bef3f7f96fa317;p=quix0rs-gnu-social.git diff --git a/actions/showprofiletag.php b/actions/showprofiletag.php index ec1837f835..6ba0c18f90 100644 --- a/actions/showprofiletag.php +++ b/actions/showprofiletag.php @@ -61,21 +61,18 @@ class ShowprofiletagAction extends Action $args['page'] = $this->page; } common_redirect(common_local_url('showprofiletag', $args), 301); - return false; } if (!$tagger) { // TRANS: Client error displayed when a tagger is expected but not provided. $this->clientError(_('No tagger.'), 404); - return false; } - $user = User::staticGet('nickname', $tagger); + $user = User::getKV('nickname', $tagger); if (!$user) { // TRANS: Client error displayed trying to perform an action related to a non-existing user. $this->clientError(_('No such user.'), 404); - return false; } $this->tagger = $user->getProfile(); @@ -88,7 +85,6 @@ class ShowprofiletagAction extends Action if (!$can_see) { // TRANS: Client error displayed trying to reference a non-existing list. $this->clientError(_('No such list.'), 404); - return false; } $this->page = ($this->arg('page')) ? ($this->arg('page')+0) : 1; @@ -100,8 +96,8 @@ class ShowprofiletagAction extends Action NOTICES_PER_PAGE + 1); if ($this->page > 1 && $this->notice->N == 0) { - // TRANS: Server error when page not found (404). - $this->serverError(_('No such page.'), $code = 404); + // TRANS: Client error when page not found (404). + $this->clientError(_('No such page.'), 404); } return true; @@ -114,7 +110,6 @@ class ShowprofiletagAction extends Action if (!$this->peopletag) { // TRANS: Client error displayed trying to perform an action related to a non-existing user. $this->clientError(_('No such user.')); - return; } $this->showPage(); @@ -259,7 +254,7 @@ class ShowprofiletagAction extends Action function showNotices() { if (Event::handle('StartShowProfileTagContent', array($this))) { - $nl = new NoticeList($this->notice, $this); + $nl = new PrimaryNoticeList($this->notice, $this, array('show_n'=>NOTICES_PER_PAGE)); $cnt = $nl->show(); @@ -364,10 +359,12 @@ class ShowprofiletagAction extends Action class Peopletag extends PeopletagListItem { + protected $avatarSize = AVATAR_PROFILE_SIZE; + function showStart() { $mode = $this->peopletag->private ? 'private' : 'public'; - $this->out->elementStart('div', array('class' => 'hentry peopletag peopletag-profile mode-'.$mode, + $this->out->elementStart('div', array('class' => 'h-entry peopletag peopletag-profile mode-'.$mode, 'id' => 'peopletag-' . $this->peopletag->id)); } @@ -375,9 +372,4 @@ class Peopletag extends PeopletagListItem { $this->out->elementEnd('div'); } - - function showAvatar() - { - parent::showAvatar(AVATAR_PROFILE_SIZE); - } }