Code

Added check to avoid php breaks if opsi tabs are not defined.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 1 Sep 2008 12:15:09 +0000 (12:15 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 1 Sep 2008 12:15:09 +0000 (12:15 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12329 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/fai/admin/fai/class_faiManagement.inc

index 6f99ab6de56efe05ff0a00e3934949d5d088310c..2a4eb0b42ba34b6ec916301cb6f60bfd6bdca9ff 100644 (file)
@@ -268,8 +268,12 @@ class faiManagement extends plugin
         $name = $this->objects[$s_entry]['cn'];
         $cfg = $this->opsi->get_product_properties($name);
         $this->dialog = new tabs_opsiProdConfig($this->config, $this->config->data['TABS']['OPSIPRODCONFIG'],"","opsi");
-        $this->dialog->by_object['opsiProperties']->set_cfg($cfg);
-        $this->dialog->by_object['opsiProperties']->set_product($name);
+        if(isset($this->dialog->by_object['opsiProperties'])){
+          $this->dialog->by_object['opsiProperties']->set_cfg($cfg);
+          $this->dialog->by_object['opsiProperties']->set_product($name);
+        }else{
+          trigger_error("Unknown tab, please check config.");
+        }
       }
       if($this->dialog instanceof tabs_opsiProdConfig && isset($_POST['cancel_properties'])){
         $this->dialog = NULL;