Code

Updated class tab, ensure that the selecte tab (current) is valid:
[gosa.git] / gosa-core / include / class_tabs.inc
index 3245241a2ae241e11a07ff86d3e5ebb186b64dec..c7666fddff52ffb86e498d1299977eb3bb6f2fb1 100644 (file)
@@ -96,6 +96,9 @@ class tabs
 
   function execute()
   {
+    /* Ensure that the currently selected tab is valid. */
+    if(!isset($this->by_name[$this->current])) $this->current = key($this->by_name);
+
     /* Rotate current to last */
     $this->last= $this->current;