X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fpeopletagsbyuser.php;h=4a04ea2fbbf8c0d4e1f703e4d6d29cac96896087;hb=aac6a21c4e53ed5952d195a6d39e6dbd0537637f;hp=dc3e50b9f2075b9f193a6878c45a51bc0cfd10d2;hpb=8c710ad2c1b80544acccb515f7b601aadff2de16;p=quix0rs-gnu-social.git diff --git a/actions/peopletagsbyuser.php b/actions/peopletagsbyuser.php index dc3e50b9f2..4a04ea2fbb 100644 --- a/actions/peopletagsbyuser.php +++ b/actions/peopletagsbyuser.php @@ -76,7 +76,12 @@ class PeopletagsbyuserAction extends Action $this->args['public'] = $this->args['private'] = false; } - $nickname_arg = $this->arg('nickname'); + if (common_config('singleuser', 'enabled')) { + $nickname_arg = User::singleUserNickname(); + } else { + $nickname_arg = $this->arg('nickname'); + } + $nickname = common_canonical_nickname($nickname_arg); // Permanent redirect on non-canonical nickname @@ -87,15 +92,13 @@ class PeopletagsbyuserAction extends Action $args['page'] = $this->arg['page']; } common_redirect(common_local_url('peopletagsbyuser', $args), 301); - return false; } - $this->user = User::staticGet('nickname', $nickname); + $this->user = User::getKV('nickname', $nickname); if (!$this->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 = $this->user->getProfile(); @@ -103,7 +106,6 @@ class PeopletagsbyuserAction extends Action if (!$this->tagger) { // TRANS: Error message displayed when referring to a user without a profile. $this->serverError(_('User has no profile.')); - return false; } $this->page = ($this->arg('page')) ? ($this->arg('page')+0) : 1; @@ -114,7 +116,7 @@ class PeopletagsbyuserAction extends Action $user = common_current_user(); if ($this->arg('public')) { - $this->tags = $this->tagger->getLists(false, $offset, $limit); + $this->tags = $this->tagger->getLists(null, $offset, $limit); } else if ($this->arg('private')) { if (empty($user)) { // TRANS: Error message displayed when trying to perform an action that requires a logged in user. @@ -128,7 +130,7 @@ class PeopletagsbyuserAction extends Action $this->clientError(_('You cannot view others\' private lists'), 403); } } else { - $this->tags = $this->tagger->getLists(common_current_user(), $offset, $limit); + $this->tags = $this->tagger->getLists($this->scoped, $offset, $limit); } return true; } @@ -141,7 +143,6 @@ class PeopletagsbyuserAction extends Action if ($_SERVER['REQUEST_METHOD'] == 'POST') { common_redirect(common_local_url('peopletagsbyuser', $this->getSelfUrlArgs()), 303); - return; } $this->showPage();