X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fpeopletagged.php;h=db2420a8a3263a2866f247b66a8bfc819717fdb9;hb=dc7c64592b60db75f0e1762532e53554b894ff90;hp=424bf2dcbe3fc59eec5afc3835f10f1c75d42aef;hpb=59043dca7fb6f974b11797c4d0f20e5b78b0611d;p=quix0rs-gnu-social.git diff --git a/actions/peopletagged.php b/actions/peopletagged.php index 424bf2dcbe..db2420a8a3 100644 --- a/actions/peopletagged.php +++ b/actions/peopletagged.php @@ -53,12 +53,17 @@ class PeopletaggedAction extends Action return true; } - function prepare($args) + function prepare(array $args = array()) { parent::prepare($args); $this->page = ($this->arg('page')) ? ($this->arg('page')+0) : 1; - $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); @@ -71,21 +76,18 @@ class PeopletaggedAction extends Action $args['page'] = $this->page; } common_redirect(common_local_url('peopletagged', $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 when referring to non-existing user. $this->clientError(_('No such user.'), 404); - return false; } $this->tagger = $user->getProfile(); @@ -94,7 +96,6 @@ class PeopletaggedAction extends Action if (!$this->peopletag) { // TRANS: Client error displayed when referring to a non-existing list. $this->clientError(_('No such list.'), 404); - return false; } return true; @@ -116,9 +117,9 @@ class PeopletaggedAction extends Action } } - function handle($args) + function handle() { - parent::handle($args); + parent::handle(); $this->showPage(); } @@ -166,7 +167,7 @@ class PeopletagMemberList extends ProfileList $this->peopletag = $peopletag; } - function newListItem($profile) + function newListItem(Profile $profile) { return new PeopletagMemberListItem($profile, $this->peopletag, $this->action); }