X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fpeopletagsbyuser.php;h=9a5f9106f41086885f271459874b0448632b3af8;hb=8ffecae9c63d8d5a533f3d1610d36f93ba21c2fc;hp=0d9bd50faa28533902d3d9f7c145fb25a540f588;hpb=cb183359e23ae7a5cfb483fa06c6c4b7a8b05fff;p=quix0rs-gnu-social.git diff --git a/actions/peopletagsbyuser.php b/actions/peopletagsbyuser.php index 0d9bd50faa..9a5f9106f4 100644 --- a/actions/peopletagsbyuser.php +++ b/actions/peopletagsbyuser.php @@ -39,7 +39,7 @@ class PeopletagsbyuserAction extends Action var $tagger = null; var $tags = null; - function isReadOnly($args) + function isReadOnly(array $args=array()) { return true; } @@ -68,7 +68,7 @@ class PeopletagsbyuserAction extends Action } } - function prepare($args) + function prepare(array $args=array()) { parent::prepare($args); @@ -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; @@ -133,16 +135,15 @@ class PeopletagsbyuserAction extends Action return true; } - function handle($args) + function handle(array $args=array()) { parent::handle($args); - # Post from the tag dropdown; redirect to a GET + // Post from the tag dropdown; redirect to a GET - if ($_SERVER['REQUEST_METHOD'] == 'POST') { - common_redirect(common_local_url('peopletagsbyuser', $this->getSelfUrlArgs()), 303); - return; - } + if ($_SERVER['REQUEST_METHOD'] == 'POST') { + common_redirect(common_local_url('peopletagsbyuser', $this->getSelfUrlArgs()), 303); + } $this->showPage(); } @@ -213,7 +214,7 @@ class PeopletagsbyuserAction extends Action '(http://en.wikipedia.org/wiki/Micro-blogging) service ' . 'based on the Free Software [StatusNet](http://status.net/) tool. ' . 'You can easily keep track of what they ' . - 'are doing by subscribing to the tag\'s timeline.' ), $this->tagger->nickname); + 'are doing by subscribing to the list\'s timeline.' ), $this->tagger->nickname); $this->elementStart('div', array('id' => 'anon_notice')); $this->raw(common_markup_to_html($notice)); $this->elementEnd('div');