X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fpeopletaggroupnav.php;h=44e4756b810a8bf0c462db9adeeaf94179c41264;hb=586fb5a5175d7a10f5f78dd026434e48202e5451;hp=70f7f5a425baf1926f154fd37e714b46e5382973;hpb=0316e279d7dece61969e3f8d37401787786af9cd;p=quix0rs-gnu-social.git diff --git a/lib/peopletaggroupnav.php b/lib/peopletaggroupnav.php index 70f7f5a425..44e4756b81 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; @@ -76,7 +76,7 @@ class PeopletagGroupNav extends Widget { $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'); @@ -89,7 +89,7 @@ class PeopletagGroupNav extends Widget $tag = $this->action->trimmed('tag'); if ($nickname) { - $user = User::staticGet('nickname', $nickname); + $user = User::getKV('nickname', $nickname); $user_profile = $user->getProfile(); if ($tag) { @@ -105,9 +105,10 @@ class PeopletagGroupNav extends Widget $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'),