X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fpeopletagsubscribers.php;h=dcb3af5c9fba43f3032832931c4c472e8bde2512;hb=e8d1bb25469fe1ef0cbcb32c3022010997aca4b0;hp=e371799efb520052610de8906bcfb8e6ea8d1307;hpb=25198a8d4cee5b2182f1ecb99192a4108a01afa4;p=quix0rs-gnu-social.git diff --git a/actions/peopletagsubscribers.php b/actions/peopletagsubscribers.php index e371799efb..dcb3af5c9f 100644 --- a/actions/peopletagsubscribers.php +++ b/actions/peopletagsubscribers.php @@ -48,17 +48,22 @@ class PeopletagsubscribersAction extends Action var $peopletag = null; var $tagger = null; - function isReadOnly($args) + function isReadOnly(array $args=array()) { 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 PeopletagsubscribersAction 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 trying to perform an action related to a non-existing user. $this->clientError(_('No such user.'), 404); - return false; } $this->tagger = $user->getProfile(); @@ -94,7 +96,6 @@ class PeopletagsubscribersAction extends Action if (!$this->peopletag) { // TRANS: Client error displayed trying to reference a non-existing list. $this->clientError(_('No such list.'), 404); - return false; } return true; @@ -116,7 +117,7 @@ class PeopletagsubscribersAction extends Action } } - function handle($args) + function handle(array $args=array()) { parent::handle($args); $this->showPage(); @@ -166,7 +167,7 @@ class PeopletagSubscriberList extends ProfileList $this->peopletag = $peopletag; } - function newListItem($profile) + function newListItem(Profile $profile) { return new PeopletagSubscriberListItem($profile, $this->peopletag, $this->action); }