Code

Fixed service plugin initializations. Parent wasn't correct initialized
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 25 Apr 2008 12:27:38 +0000 (12:27 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 25 Apr 2008 12:27:38 +0000 (12:27 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10692 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/goto/admin/systems/services/repository/class_servRepository.inc
gosa-plugins/systems/admin/systems/class_serverService.inc

index f7817858bbe40a280c32467e0bef0431f79c4aa3..4f2a6adb22364fe67fba2a420748a6f525dd9be4 100644 (file)
@@ -21,7 +21,7 @@ class servrepository extends goService
 
   function servrepository (&$config, $dn= NULL, $parent= NULL)
   {
-    plugin::plugin ($config, $dn,$parent->parent);
+    plugin::plugin ($config, $dn,$parent);
 
     $this->DisplayName = _("Repository service");
 
index 6508592770ddacdbd4491a595776e2641f61405d..80f521c90e0f4c53a738e04bba75449b242e9687 100644 (file)
@@ -53,6 +53,12 @@ class ServerService extends plugin
     plugin::plugin($config);
     $this->parent = $parent;
     $this->dn= $dn;
+
+    /* Adapt parent attributes */
+    if(isset($this->parent->attrs)){
+      $this->attrs = $this->parent->attrs;
+    }
+
     foreach ($config->data['TABS']['SERVERSERVICE'] as $plug){
 
       if(class_available($plug['CLASS'])){
@@ -157,7 +163,7 @@ class ServerService extends plugin
     if($s_action == "RemoveSingleService"){
 
       /* Create resetted obj */
-      $new_obj = new $s_entry($this->config,$this->dn);
+      $new_obj = new $s_entry($this->config,$this->dn,&$this);
       $new_obj -> set_acl_base($this->acl_base);
       $new_obj -> set_acl_category(preg_replace("/\/$/","",$this->acl_category));
       $tmp     = $new_obj->getListEntry();