Code

Updated preg_matches
[gosa.git] / plugins / admin / fai / class_faiPackageConfiguration.inc
index 55077c67b7ad9e4497b8f9c9874028cd455a8dc7..63c2f90d5ad9d52d1a1c220e26526f718765489d 100644 (file)
@@ -24,10 +24,13 @@ class faiPackageConfiguration extends plugin
     $this->Debconf_handle->set_template_directory($path);
     $this->Debconf_handle->set_package($this->obj);
     $this->Debconf_handle->set_language(preg_replace('/_.*$/', '', get_browser_language()));
-    $this->pkg_config = $pkg_config;
 
-    foreach($this->pkg_config as $var){
-      $this->Debconf_handle->SetDefault($var['Name'],$var['Value']);
+    if( $this->Debconf_handle->load() ) {
+      $this->pkg_config = $pkg_config;
+
+      foreach($this->pkg_config as $var){
+        $this->Debconf_handle->SetDefault($var['Name'],$var['Value']);
+      }
     }
   }
 
@@ -57,7 +60,9 @@ class faiPackageConfiguration extends plugin
   /* Check supplied data */
   function check()
   {
-    $message= array();
+    /* Call common method to give check the hook */
+    $message= plugin::check();
+
     return ($message);
   }