X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fshowprofiletag.php;h=7674f25e54b009b3d2832308a31c590bf5df6aa9;hb=f2bfcdc2c1d7bc4634bb06285380884a57075759;hp=ec1837f835866a8a78d89545c4306caaf91cd9bf;hpb=32845a1051356b56053a768ca3e9df68d7d5523a;p=quix0rs-gnu-social.git diff --git a/actions/showprofiletag.php b/actions/showprofiletag.php index ec1837f835..7674f25e54 100644 --- a/actions/showprofiletag.php +++ b/actions/showprofiletag.php @@ -35,12 +35,12 @@ class ShowprofiletagAction extends Action { var $notice, $tagger, $peopletag, $userProfile; - function isReadOnly($args) + function isReadOnly(array $args=array()) { return true; } - function prepare($args) + function prepare(array $args=array()) { parent::prepare($args); @@ -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; @@ -107,14 +103,13 @@ class ShowprofiletagAction extends Action return true; } - function handle($args) + function handle(array $args=array()) { parent::handle($args); 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(); @@ -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); - } }