]> git.mjollnir.org Git - moodle.git/commitdiff
Add some robustness to the tabs so we can use tabs named '0'
authormoodler <moodler>
Thu, 1 Feb 2007 07:02:28 +0000 (07:02 +0000)
committermoodler <moodler>
Thu, 1 Feb 2007 07:02:28 +0000 (07:02 +0000)
lib/weblib.php

index abdd7934d8039914e29dd50c1c15d4879942a61a..d3b500fc1371908b07e1bf555ec0c76d65a0014a 100644 (file)
@@ -5469,9 +5469,9 @@ function convert_tabrows_to_tree($tabrows, $selected, $inactive, $activated) {
         $tree = array();
 
         foreach ($row as $tab) {
-            $tab->inactive = in_array($tab->id, $inactive);
-            $tab->active = in_array($tab->id, $activated);
-            $tab->selected = $tab->id == $selected;
+            $tab->inactive = in_array((string)$tab->id, $inactive);
+            $tab->active = in_array((string)$tab->id, $activated);
+            $tab->selected = (string)$tab->id == $selected;
 
             if ($tab->active || $tab->selected) {
                 if ($subtree) {