From 0299eb76eb453ecd5faa8d3a9107ef14577315d2 Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 15 Jun 2007 06:16:20 +0000 Subject: [PATCH] Updated Server copy & paste git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6596 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/systems/class_goMailServer.inc | 2 +- plugins/admin/systems/class_goShareServer.inc | 18 +++++++++++++++++ .../systems/class_workstationStartup.inc | 20 +++++++++++++++++-- 3 files changed, 37 insertions(+), 3 deletions(-) diff --git a/plugins/admin/systems/class_goMailServer.inc b/plugins/admin/systems/class_goMailServer.inc index 2d1f08c50..b97c3955d 100644 --- a/plugins/admin/systems/class_goMailServer.inc +++ b/plugins/admin/systems/class_goMailServer.inc @@ -690,7 +690,7 @@ class goMailServer extends goService{ plugin::PrepareForCopyPaste($source); $source_o = new goMailServer($this->config,$source['dn']); - foreach(array("postfixMyNetworks","postfixTransportTable","postfixSenderRestrictions","postfixRecipientRestrictions","postfixMyDestinations") as $attr){ + foreach(array("postfixMyDomain","postfixMyhostname","postfixMyNetworks","postfixTransportTable","postfixSenderRestrictions","postfixRecipientRestrictions","postfixMyDestinations") as $attr){ $this->$attr = $source_o->$attr; } } diff --git a/plugins/admin/systems/class_goShareServer.inc b/plugins/admin/systems/class_goShareServer.inc index 64b694457..6b7f39aa3 100644 --- a/plugins/admin/systems/class_goShareServer.inc +++ b/plugins/admin/systems/class_goShareServer.inc @@ -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() { diff --git a/plugins/admin/systems/class_workstationStartup.inc b/plugins/admin/systems/class_workstationStartup.inc index ab20b1b9e..a0f619907 100644 --- a/plugins/admin/systems/class_workstationStartup.inc +++ b/plugins/admin/systems/class_workstationStartup.inc @@ -1161,8 +1161,12 @@ class workstartup extends plugin function PrepareForCopyPaste($source) { - /* Get arrays */ - foreach (array("gotoModules", "gotoAutoFs", "gotoFilesystem") as $val){ + plugin::PrepareForCopyPaste($source); + + + /* Get arrays */ + foreach (array("gotoModules", "gotoAutoFs", "gotoFilesystem","gotoKernelParameters") as $val){ + $this->$val = array(); if (isset($source["$val"]["count"])){ for ($i= 0; $i<$source["count"]; $i++){ if (isset($source["$val"][$i])){ @@ -1174,6 +1178,18 @@ class workstartup extends plugin $this->$val= array_unique($this->$val); } + /* Prepare Shares */ + if((isset($source['gotoShare']))&&(is_array($source['gotoShare']))){ + unset($source['gotoShare']['count']); + foreach($source['gotoShare'] as $share){ + $tmp = $tmp2 = array(); + $tmp = split("\|",$share); + $tmp2['server'] =$tmp[0]; + $tmp2['name'] =$tmp[1]; + $tmp2['mountPoint'] =$tmp[2]; + $this->gotoShares[$tmp[1]."|".$tmp[0]]=$tmp2; + } + } } /* Return plugin informations for acl handling */ -- 2.30.2