X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fpeopletagsubscribers.php;h=123b168596c4698185ac8f2ba8c871b78cf3aa53;hb=cc34bb48c7243f78e198ad4d8c1806d5fe886a81;hp=1f2feeca29579513256e5fbdde0a02e48244a80c;hpb=382e4d2cdbd2dbfa211077fb9bce35441b8743cd;p=quix0rs-gnu-social.git diff --git a/actions/peopletagsubscribers.php b/actions/peopletagsubscribers.php index 1f2feeca29..123b168596 100644 --- a/actions/peopletagsubscribers.php +++ b/actions/peopletagsubscribers.php @@ -22,7 +22,7 @@ * @category Group * @package StatusNet * @author Evan Prodromou - * @copyright 2008-2009 StatusNet, Inc. + * @copyright 2008-2011 StatusNet, Inc. * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @link http://status.net/ */ @@ -42,8 +42,7 @@ require_once(INSTALLDIR.'/lib/profilelist.php'); * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @link http://status.net/ */ - -class PeopletagsubscribersAction extends OwnerDesignAction +class PeopletagsubscribersAction extends Action { var $page = null; var $peopletag = null; @@ -59,7 +58,12 @@ class PeopletagsubscribersAction extends OwnerDesignAction 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); @@ -76,13 +80,15 @@ class PeopletagsubscribersAction extends OwnerDesignAction } 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; } @@ -91,7 +97,8 @@ class PeopletagsubscribersAction extends OwnerDesignAction $this->peopletag = Profile_list::pkeyGet(array('tagger' => $user->id, 'tag' => $tag)); if (!$this->peopletag) { - $this->clientError(_('No such peopletag.'), 404); + // TRANS: Client error displayed trying to reference a non-existing list. + $this->clientError(_('No such list.'), 404); return false; } @@ -101,10 +108,14 @@ class PeopletagsubscribersAction extends OwnerDesignAction function title() { if ($this->page == 1) { - return sprintf(_('Subscribers of people tagged %s by %s'), + // TRANS: Page title for list of list subscribers. + // TRANS: %1$s is a list, %2$s is a user nickname. + return sprintf(_('Subscribers to list %1$s by %2$s'), $this->peopletag->tag, $this->tagger->nickname); } else { - return sprintf(_('Subscribers of people tagged %s by %s, page %d'), + // TRANS: Page title for list of list subscribers. + // TRANS: %1$s is a list, %2$s is a user nickname, %3$d is a page number. + return sprintf(_('Subscribers to list %1$s by %2$s, page %3$d'), $this->peopletag->tag, $this->tagger->nickname, $this->page); } @@ -182,6 +193,7 @@ class PeopletagSubscriberListItem extends ProfileListItem parent::showFullName(); if ($this->profile->id == $this->peopletag->tagger) { $this->out->text(' '); + // TRANS: Addition in tag subscribers list for creator of a tag. $this->out->element('span', 'role', _('Creator')); } } @@ -221,7 +233,7 @@ class PeopletagSubscriberListItem extends ProfileListItem /** * Fetch necessary return-to arguments for the profile forms * to return to this list when they're done. - * + * * @return array */ protected function returnToArgs()