Code

Updated terminal copy & paste
[gosa.git] / plugins / admin / systems / class_goShareServer.inc
index 18f9d747bc48228f74cc6a6888d85eda06501651..6b7f39aa382c514633f11ddc96f9bfc75fe96d00 100644 (file)
@@ -57,7 +57,7 @@ class goShareServer extends goService{
 
     if($this->is_account && !$this->view_logged){
       $this->view_logged = TRUE;
-      @log::log("view","server/".get_class($this),$this->dn);
+      new log("view","server/".get_class($this),$this->dn);
     }
 
 
@@ -193,10 +193,10 @@ class goShareServer extends goService{
     show_ldap_error($ldap->get_error(), sprintf(_("Saving of system server/shares with dn '%s' failed."),$this->dn));
     if($this->initially_was_account){
       $this->handle_post_events("modify");
-      @log::log("modify","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
+      new log("modify","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
     }else{
       $this->handle_post_events("add");
-      @log::log("create","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
+      new log("create","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
     }
   }
 
@@ -262,7 +262,7 @@ class goShareServer extends goService{
         $ldap->cd($mountsdn);
         $ldap->add($mounts);
         show_ldap_error($ldap->get_error(), sprintf(_("Creating system server/shares (mount container) with dn '%s' failed."),$this->dn)); 
-        gosa_log("Mount container '$mountsdn' has been created");
+        new log("modify","server/".get_class($this),$mountsdn,array_keys($mounts),$ldap->get_error());
     }
 
     # remove deleted mounts from the container
@@ -276,7 +276,7 @@ class goShareServer extends goService{
       if (count($attrs) != 0) {
         $ldap->rmdir($mountdn);
         show_ldap_error($ldap->get_error(), sprintf(_("Removing system server/shares (mount container) with dn '%s' failed."),$this->dn)); 
-        gosa_log("Mount object '".$mountdn."' has been removed");
+        new log("remove","server/".get_class($this),$mountdn,array_keys($mount),$ldap->get_error());
       }
     }
 
@@ -287,7 +287,7 @@ class goShareServer extends goService{
       $ldap->cd($mountdn);
       $ldap->add($mount);
       show_ldap_error($ldap->get_error(), sprintf(_("Saving system server/shares (mount container) with dn '%s' failed."),$this->dn)); 
-      gosa_log("Mount object '".$mountdn."' has been added");
+      new log("create","server/".get_class($this),$mountdn,array_keys($mount),$ldap->get_error());
     }
   }
 
@@ -362,6 +362,24 @@ class goShareServer extends goService{
   }
 
 
+  function PrepareForCopyPaste($source)
+  {
+    plugin::PrepareForCopyPaste($source);
+
+    $tmp =array();
+    if(isset($source['goExportEntry'])){
+      if(isset($source['goExportEntry']['count'])){
+        for($i= 0; $i<$source['goExportEntry']['count']; $i++){
+          $entry= $source['goExportEntry'][$i];
+          $tmp[preg_replace('/\|.*$/', '', $entry)]= $entry;
+        }
+      }
+    }
+    $this->goExportEntryList = $tmp;
+    $this->goExportEntry = $tmp;
+  }
+
+
   /* Return plugin informations for acl handling */
   function plInfo()
   {