Fixed double inclusion bug

This commit is contained in:
Marcin Kurczewski 2013-10-07 20:31:45 +02:00
parent 4aa41653be
commit c69ff872a9

View file

@ -45,14 +45,17 @@
$postNav []= ['Log out', \Chibi\UrlHelper::route('auth', 'logout')]; $postNav []= ['Log out', \Chibi\UrlHelper::route('auth', 'logout')];
} }
function printNav($nav) if (!function_exists('printNav'))
{ {
foreach ($nav as $navItem) function printNav($nav)
{ {
list ($text, $link) = $navItem; foreach ($nav as $navItem)
echo '<li>'; {
echo '<a href="' . $link . '">' . $text . '</a>'; list ($text, $link) = $navItem;
echo '</li>'; echo '<li>';
echo '<a href="' . $link . '">' . $text . '</a>';
echo '</li>';
}
} }
} }
?> ?>