X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fpeopletagsbyuser.php;h=746310877427891d827cdd3eb3d356d1173ade0f;hb=a75b1df62727ce74fdf4d8d98421558b153458e1;hp=8ef1a56ee15eed415461796751064702e61a761c;hpb=0316e279d7dece61969e3f8d37401787786af9cd;p=quix0rs-gnu-social.git diff --git a/actions/peopletagsbyuser.php b/actions/peopletagsbyuser.php index 8ef1a56ee1..7463108774 100644 --- a/actions/peopletagsbyuser.php +++ b/actions/peopletagsbyuser.php @@ -68,7 +68,7 @@ class PeopletagsbyuserAction extends Action } } - function prepare($args) + function prepare(array $args = array()) { parent::prepare($args); @@ -92,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(); @@ -108,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; @@ -119,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. @@ -133,20 +130,19 @@ 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; } - function handle($args) + function handle() { - parent::handle($args); + parent::handle(); # Post from the tag dropdown; redirect to a GET if ($_SERVER['REQUEST_METHOD'] == 'POST') { common_redirect(common_local_url('peopletagsbyuser', $this->getSelfUrlArgs()), 303); - return; } $this->showPage();