X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fprofilelist.php;h=397ea19848043521ba95d2068ad83c7fe3343bb7;hb=5304373b0b5c9905b30c85b565c23246d377467b;hp=b010fb724921028a04e36661471b8932bd7102b8;hpb=b71f276ed5420bc17262fe7981617ce6e27839c4;p=quix0rs-gnu-social.git diff --git a/lib/profilelist.php b/lib/profilelist.php index b010fb7249..397ea19848 100644 --- a/lib/profilelist.php +++ b/lib/profilelist.php @@ -1,5 +1,4 @@ showBio(); Event::handle('EndProfileListItemBio', array($this)); } + if (Event::handle('StartProfileListItemTags', array($this))) { + $this->showTags(); + Event::handle('EndProfileListItemTags', array($this)); + } Event::handle('EndProfileListItemProfileElements', array($this)); } $this->endProfile(); @@ -238,6 +241,20 @@ class ProfileListItem extends Widget } } + function showTags() + { + $user = common_current_user(); + if (!empty($user)) { + if ($user->id == $this->profile->id) { + $tags = new SelftagsWidget($this->out, $user, $this->profile); + $tags->show(); + } else if ($user->getProfile()->canTag($this->profile)) { + $tags = new PeopletagsWidget($this->out, $user, $this->profile); + $tags->show(); + } + } + } + function endProfile() { $this->out->elementEnd('div');