From c69ff872a95d994fad1fd513b994f03309848471 Mon Sep 17 00:00:00 2001 From: Marcin Kurczewski Date: Mon, 7 Oct 2013 20:31:45 +0200 Subject: [PATCH] Fixed double inclusion bug --- src/Views/layout-normal.phtml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/Views/layout-normal.phtml b/src/Views/layout-normal.phtml index 463bf30a..5bab8d1c 100644 --- a/src/Views/layout-normal.phtml +++ b/src/Views/layout-normal.phtml @@ -45,14 +45,17 @@ $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; - echo '
  • '; - echo '' . $text . ''; - echo '
  • '; + foreach ($nav as $navItem) + { + list ($text, $link) = $navItem; + echo '
  • '; + echo '' . $text . ''; + echo '
  • '; + } } } ?>