X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fpeopletaggroupnav.php;h=212a90586b096e4289c79f461c6ea72a7e6c3a5d;hb=dd61ae8fbeee64c85f8186672292335592be1ff5;hp=5c95487247f891538240418e8a33bb360798a465;hpb=5304373b0b5c9905b30c85b565c23246d377467b;p=quix0rs-gnu-social.git diff --git a/lib/peopletaggroupnav.php b/lib/peopletaggroupnav.php index 5c95487247..212a90586b 100644 --- a/lib/peopletaggroupnav.php +++ b/lib/peopletaggroupnav.php @@ -61,7 +61,7 @@ class PeopletagGroupNav extends Widget * * @param Action $action current action, used for output */ - function __construct($action=null) + function __construct(Action $action=null) { parent::__construct($action); $this->action = $action; @@ -79,11 +79,17 @@ class PeopletagGroupNav extends Widget // FIXME: we should probably pass this in $action = $this->action->trimmed('action'); - $nickname = $this->action->trimmed('tagger'); + + if (common_config('singleuser', 'enabled')) { + $nickname = User::singleUserNickname(); + } else { + $nickname = $this->action->arg('tagger'); + } + $tag = $this->action->trimmed('tag'); if ($nickname) { - $user = User::staticGet('nickname', $nickname); + $user = User::getKV('nickname', $nickname); $user_profile = $user->getProfile(); if ($tag) { @@ -103,33 +109,33 @@ class PeopletagGroupNav extends Widget // People tag timeline $this->out->menuItem(common_local_url('showprofiletag', array('tagger' => $user_profile->nickname, 'tag' => $tag->tag)), - // TRANS: Menu item in people tag navigation panel. - _m('MENU','People tag'), - // TRANS: Menu item title in people tag navigation panel. - // TRANS: %1$s is a tag, %2$s is a nickname. - sprintf(_('%1$s tag by %2$s.'), $tag->tag, + // TRANS: Menu item in list navigation panel. + _m('MENU','List'), + // TRANS: Menu item title in list navigation panel. + // TRANS: %1$s is a list, %2$s is a nickname. + sprintf(_('%1$s list by %2$s.'), $tag->tag, (($user_profile && $user_profile->fullname) ? $user_profile->fullname : $nickname)), $action == 'showprofiletag', 'nav_timeline_peopletag'); // Tagged $this->out->menuItem(common_local_url('peopletagged', array('tagger' => $user->nickname, 'tag' => $tag->tag)), - // TRANS: Menu item in people tag navigation panel. - _m('MENU','Tagged'), - // TRANS: Menu item title in people tag navigation panel. - // TRANS: %1$s is a tag, %2$s is a nickname. - sprintf(_('%1$s tag by %2$s.'), $tag->tag, + // TRANS: Menu item in list navigation panel. + _m('MENU','Listed'), + // TRANS: Menu item title in list navigation panel. + // TRANS: %1$s is a list, %2$s is a nickname. + sprintf(_('%1$s list by %2$s.'), $tag->tag, (($user_profile && $user_profile->fullname) ? $user_profile->fullname : $nickname)), $action == 'peopletagged', 'nav_peopletag_tagged'); // Subscribers $this->out->menuItem(common_local_url('peopletagsubscribers', array('tagger' => $user->nickname, 'tag' => $tag->tag)), - // TRANS: Menu item in people tag navigation panel. + // TRANS: Menu item in list navigation panel. _m('MENU','Subscribers'), - // TRANS: Menu item title in people tag navigation panel. - // TRANS: %1$s is a tag, %2$s is a nickname. - sprintf(_('Subscribers to %1$s tag by %2$s.'), $tag->tag, + // TRANS: Menu item title in list navigation panel. + // TRANS: %1$s is a list, %2$s is a nickname. + sprintf(_('Subscribers to %1$s list by %2$s.'), $tag->tag, (($user_profile && $user_profile->fullname) ? $user_profile->fullname : $nickname)), $action == 'peopletagsubscribers', 'nav_peopletag_subscribers'); @@ -138,11 +144,11 @@ class PeopletagGroupNav extends Widget // Edit $this->out->menuItem(common_local_url('editpeopletag', array('tagger' => $user->nickname, 'tag' => $tag->tag)), - // TRANS: Menu item in people tag navigation panel. + // TRANS: Menu item in list navigation panel. _m('MENU','Edit'), - // TRANS: Menu item title in people tag navigation panel. - // TRANS: %s is a tag. - sprintf(_('Edit %s tag by you.'), $tag->tag, + // TRANS: Menu item title in list navigation panel. + // TRANS: %s is a list. + sprintf(_('Edit %s list by you.'), $tag->tag, (($user_profile && $user_profile->fullname) ? $user_profile->fullname : $nickname)), $action == 'editpeopletag', 'nav_peopletag_edit'); }