X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fshowprofiletag.php;h=4524e4aa8c23a8e71482bbf826b7977fe21e0336;hb=7c7426b473742e056e601b8095b758db433dca4a;hp=a101e4bafab74a053b9bbbdab10f7ac67150f833;hpb=d594c83a5a9a9d42fce917b544c28591fcadb1aa;p=quix0rs-gnu-social.git diff --git a/actions/showprofiletag.php b/actions/showprofiletag.php index a101e4bafa..4524e4aa8c 100644 --- a/actions/showprofiletag.php +++ b/actions/showprofiletag.php @@ -44,7 +44,11 @@ class ShowprofiletagAction extends Action { parent::prepare($args); - $tagger_arg = $this->arg('tagger'); + if (common_config('singleuser', 'enabled')) { + $tagger_arg = User::singleUserNickname(); + } else { + $tagger_arg = $this->arg('tagger'); + } $tag_arg = $this->arg('tag'); $tagger = common_canonical_nickname($tagger_arg); $tag = common_canonical_tag($tag_arg); @@ -57,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(); @@ -84,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; @@ -110,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(); @@ -350,17 +349,7 @@ class ShowprofiletagAction extends Action } } - if ($cnt > PROFILES_PER_MINILIST) { - $this->elementStart('p'); - $this->element('a', array('href' => common_local_url('profiletagsubscribers', - array('nickname' => $this->tagger->nickname, - 'profiletag' => $this->peopletag->tag)), - 'class' => 'more'), - // TRANS: Link for more "People following tag x" - // TRANS: if there are more than the mini list's maximum. - _('All subscribers')); - $this->elementEnd('p'); - } + // FIXME: link to full list Event::handle('EndShowProfileTagSubscribersMiniList', array($this)); }