We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 663bc353 authored by Evan Prodromou's avatar Evan Prodromou

GroupsNav uses new Menu class functionality

parent 0e07124a
......@@ -61,33 +61,24 @@ class GroupsNav extends Menu
return (!empty($this->groups) && ($this->groups->N > 0));
}
/**
* Show the menu
*
* @return void
*/
function show()
function tag()
{
$action = $this->actionName;
$this->out->elementStart('ul', array('class' => 'nav'));
return 'groups';
}
if (Event::handle('StartGroupsNav', array($this))) {
function getItems()
{
$items = array();
while ($this->groups->fetch()) {
$this->out->menuItem(($this->groups->mainpage) ?
$this->groups->mainpage :
common_local_url('showgroup',
array('nickname' => $this->groups->nickname)),
$this->groups->getBestName(),
'',
$action == 'showgroup' &&
$this->action->arg('nickname') == $this->groups->nickname,
'nav_timeline_group_'.$this->groups->nickname);
}
Event::handle('EndGroupsNav', array($this));
while ($this->groups->fetch()) {
$items[] = array('showgroup',
array('nickname' => $this->groups->nickname),
$this->groups->getBestName(),
$this->groups->getBestName()
);
}
$this->out->elementEnd('ul');
return $items;
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment