X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fgroupsnav.php;h=738604583ca3f07c35391ea6e35b3dd00987a4b9;hb=3d334451c45bd93b222d58155404786ee0667a0e;hp=8439ab63992616d466de2c3ff8fca8be59efd1bb;hpb=d594c83a5a9a9d42fce917b544c28591fcadb1aa;p=quix0rs-gnu-social.git diff --git a/lib/groupsnav.php b/lib/groupsnav.php index 8439ab6399..738604583c 100644 --- a/lib/groupsnav.php +++ b/lib/groupsnav.php @@ -58,7 +58,7 @@ class GroupsNav extends MoreMenu function haveGroups() { - return (!empty($this->groups) && ($this->groups->N > 0)); + return ($this->groups instanceof User_group && $this->groups->N > 0); } function tag() @@ -70,11 +70,11 @@ class GroupsNav extends MoreMenu { $items = array(); - while ($this->groups->fetch()) { + while ($this->groups instanceof User_group && $this->groups->fetch()) { $items[] = array('placeholder', - array('nickname' => $this->groups->nickname, + array('nickname' => $this->groups->getNickname(), 'mainpage' => $this->groups->homeUrl()), - $this->groups->getBestName(), + $this->groups->getNickname(), $this->groups->getBestName() ); } @@ -91,7 +91,7 @@ class GroupsNav extends MoreMenu _('See all groups you belong to.')); } - function item($actionName, $args, $label, $description, $id=null, $cls=null) + function item($actionName, array $args, $label, $description, $id=null, $cls=null) { if ($actionName != 'placeholder') { return parent::item($actionName, $args, $label, $description, $id, $cls);