Fix bug displaying single prosjekt
This commit is contained in:
parent
c1def5fd7d
commit
60ef214e1b
|
@ -47,9 +47,11 @@ $projects = $projectManager->getAll();
|
||||||
<ul class="calendar-events">
|
<ul class="calendar-events">
|
||||||
<?php
|
<?php
|
||||||
$randProjects = array_rand($projects, min(3, count($projects)));
|
$randProjects = array_rand($projects, min(3, count($projects)));
|
||||||
|
if (!is_array($randProjects)) {
|
||||||
for($i = 0; $i < count($randProjects); $i++){
|
$randProjects = [$randProjects];
|
||||||
$project = $projects[$randProjects[$i]];
|
};
|
||||||
|
foreach($randProjects as $i) {
|
||||||
|
$project = $projects[$i];
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
|
@ -88,4 +90,4 @@ $projects = $projectManager->getAll();
|
||||||
echo '<a class="login" href="' . $as->getLoginURL() . '">logg inn</a>';
|
echo '<a class="login" href="' . $as->getLoginURL() . '">logg inn</a>';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
Loading…
Reference in New Issue