limit to 5 submenuitems
All checks were successful
Build and push / Pulling repo on server (push) Successful in 2s
All checks were successful
Build and push / Pulling repo on server (push) Successful in 2s
This commit is contained in:
parent
000c964317
commit
5879a462de
@ -16,11 +16,16 @@ class Tournaments extends Page {
|
||||
if($_SESSION['user']->data['tournaments'] && count($_SESSION['user']->data['tournaments']) > 0)
|
||||
{
|
||||
$this->addSubmenuItem('divider');
|
||||
$counter = 0;
|
||||
foreach($_SESSION['user']->data['tournaments'] as $tid)
|
||||
{
|
||||
$t = new Tournament();
|
||||
$t->load($tid);
|
||||
$this->addSubmenuItem($t->data['name'],'/tournaments/event/'.$tid,'fas fa-calendar-star');
|
||||
$counter++;
|
||||
if ($counter === 5) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user