Reintroducing the possibility to declare a second row of tabs
authorstronk7 <stronk7>
Wed, 12 Dec 2007 00:58:09 +0000 (00:58 +0000)
committerstronk7 <stronk7>
Wed, 12 Dec 2007 00:58:09 +0000 (00:58 +0000)
via extratabs. MDL-12551

Merged from MOODLE_19_STABLE

admin/roles/tabs.php

index 5d753c2127fc03abf0d169849e4ef0a70a7d8082..91eac25ddb89ac5e65586e43ab044b0104156625 100755 (executable)
@@ -210,10 +210,15 @@ if ($context->contextlevel != CONTEXT_SYSTEM) {    // Print tabs for anything ex
         }
     }
 
-    $inactive = array($currenttab);
+    $inactive[] = $currenttab;
 
     $tabs = array($toprow);
 
+/// If there are any secondrow defined, let's introduce it
+    if (isset($secondrow) && is_array($secondrow) && !empty($secondrow)) {
+        $tabs[] = $secondrow;
+    }
+
     print_tabs($tabs, $currenttab, $inactive, $activetwo);