*
* @param Action $action current action, used for output
*/
- function __construct($action=null)
+ function __construct(Action $action=null)
{
parent::__construct($action);
$this->action = $action;
{
$user = null;
- // FIXME: we should probably pass this in
+ // FIXME: we should probably pass this in and check when PeopletagGroupNav is actually loaded etc.
$action = $this->action->trimmed('action');
$tag = $this->action->trimmed('tag');
if ($nickname) {
- $user = User::staticGet('nickname', $nickname);
+ $user = User::getKV('nickname', $nickname);
$user_profile = $user->getProfile();
if ($tag) {
$this->out->elementStart('ul', array('class' => 'nav'));
- if (Event::handle('StartPeopletagGroupNav', array($this))) {
+ if (Event::handle('StartPeopletagGroupNav', array($this))
+ && $tag instanceof Profile_list && $user_profile instanceof Profile) {
// People tag timeline
- $this->out->menuItem(common_local_url('showprofiletag', array('tagger' => $user_profile->nickname,
+ $this->out->menuItem(common_local_url('showprofiletag', array('nickname' => $user_profile->nickname,
'tag' => $tag->tag)),
// TRANS: Menu item in list navigation panel.
_m('MENU','List'),