limit to 5 submenuitems
All checks were successful
Build and push / Pulling repo on server (push) Successful in 2s

This commit is contained in:
piapassecker 2023-11-20 20:24:04 +01:00
parent 000c964317
commit 5879a462de

View File

@ -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;
}
}
}
}