http://www.atutor.ca/atutor/mantis/view.php?id=4314
authorCindy Li <cli@ocad.ca>
Wed, 9 Jun 2010 14:44:56 +0000 (14:44 -0000)
committerCindy Li <cli@ocad.ca>
Wed, 9 Jun 2010 14:44:56 +0000 (14:44 -0000)
docs/include/classes/Menu.class.php
docs/themes/default/include/header.tmpl.php

index c4bf091..46f6eda 100644 (file)
@@ -399,7 +399,7 @@ class Menu {
                }
                else if (isset($parent_page))
                {
-                       return $this->getRootPage($parent_page);
+                       return $this->setRootPage($parent_page);
                }
                else
                {
index cd701aa..04676ef 100644 (file)
@@ -131,7 +131,12 @@ $starttime = $mtime;
     <ul class="navigation">
 <?php 
 foreach ($this->top_level_pages as $page) {
-       if ($page['url'] == $this->current_top_level_page) { 
+       if (strpos($page['url'], '?') > 0)  {
+               $url_without_param = substr($page['url'], 0, strpos($page['url'], '?'));
+       } else {
+               $url_without_param = $page['url'];
+       }
+       if ($url_without_param == $this->current_top_level_page) { 
 ?>
       <li class="navigation"><a href="<?php echo $page['url']; ?>" title="<?php echo $page['title']; ?>" class="active"><?php echo $page['title']; ?></a></li>
 <?php } else { ?>