From: hickert Date: Thu, 1 Oct 2009 14:41:11 +0000 (+0000) Subject: Updated copy & paste handling for terminals X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=32194df07390032672c663e90e73fc8d66c21d5e;p=gosa.git Updated copy & paste handling for terminals -Moved tftpd fix git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14450 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/goto/admin/systems/goto/class_terminalGeneric.inc b/gosa-plugins/goto/admin/systems/goto/class_terminalGeneric.inc index ab2207e83..ad651b856 100644 --- a/gosa-plugins/goto/admin/systems/goto/class_terminalGeneric.inc +++ b/gosa-plugins/goto/admin/systems/goto/class_terminalGeneric.inc @@ -500,6 +500,37 @@ class termgeneric extends plugin $this->gotoMode != $this->saved_attributes['gotoMode'] && $this->gotoMode == "active" && tests::is_ip($this->netConfigDNS->ipHostNumber)) || $this->auto_activate; + + /* Find proper terminal path for tftp configuration + FIXME: This is suboptimal when the default has changed to + another location! */ + if ($this->gotoTerminalPath == "default"){ + $ldap= $this->config->get_ldap_link(); + + /* Strip relevant part from dn, keep trailing ',' */ + $tmp= preg_replace("/^cn=[^,]+,".get_ou('terminalRDN')."/i", "", $this->dn); + $tmp= preg_replace("/".$this->config->current['BASE']."$/i", "", $tmp); + + /* Walk from top to base and try to load default values for + 'gotoTerminalPath'. Abort when an entry is found. */ + while (TRUE){ + $tmp= preg_replace ("/^[^,]+,/", "", $tmp); + + $ldap->cat("cn=default,".get_ou('terminalRDN').$tmp. + $this->config->current['BASE'], array('gotoTerminalPath')); + $attrs= $ldap->fetch(); + if (isset($attrs['gotoTerminalPath'])){ + $this->gotoTerminalPath= $attrs['gotoTerminalPath'][0]; + break; + } + + /* Nothing left? */ + if ($tmp == ""){ + break; + } + } + } + plugin::save(); /* Strip out 'default' values */ diff --git a/gosa-plugins/goto/admin/systems/goto/class_terminalService.inc b/gosa-plugins/goto/admin/systems/goto/class_terminalService.inc index 2f4c30515..b78b35c71 100644 --- a/gosa-plugins/goto/admin/systems/goto/class_terminalService.inc +++ b/gosa-plugins/goto/admin/systems/goto/class_terminalService.inc @@ -683,6 +683,19 @@ class termservice extends plugin } + function PrepareForCopyPaste($source) + { + plugin::PrepareForCopyPaste($source); + + $source_o = new termservice ($this->config, $source['dn']); + + foreach(array("gotoXdmcpServer","selected_xdmcp_servers") as $attr){ + $this->$attr = $source_o->$attr; + } + } + + + /* Return plugin informations for acl handling */ static function plInfo() { diff --git a/gosa-plugins/goto/admin/systems/goto/class_terminalStartup.inc b/gosa-plugins/goto/admin/systems/goto/class_terminalStartup.inc index c55ce9824..31c8ea97e 100644 --- a/gosa-plugins/goto/admin/systems/goto/class_terminalStartup.inc +++ b/gosa-plugins/goto/admin/systems/goto/class_terminalStartup.inc @@ -375,35 +375,6 @@ class termstartup extends plugin exit(); } - /* Find proper terminal path for tftp configuration - FIXME: This is suboptimal when the default has changed to - another location! */ - if ($this->gotoTerminalPath == "default-inherit"){ - $ldap= $this->config->get_ldap_link(); - - /* Strip relevant part from dn, keep trailing ',' */ - $tmp= preg_replace("/^cn=[^,]+,".get_ou('terminalRDN')."/i", "", $this->dn); - $tmp= preg_replace("/".$this->config->current['BASE']."$/i", "", $tmp); - - /* Walk from top to base and try to load default values for - 'gotoTerminalPath'. Abort when an entry is found. */ - while (TRUE){ - $tmp= preg_replace ("/^[^,]+,/", "", $tmp); - - $ldap->cat("cn=default,".get_ou('terminalRDN').$tmp. - $this->config->current['BASE'], array('gotoTerminalPath')); - $attrs= $ldap->fetch(); - if (isset($attrs['gotoTerminalPath'])){ - $this->gotoTerminalPath= $attrs['gotoTerminalPath'][0]; - break; - } - - /* Nothing left? */ - if ($tmp == ""){ - break; - } - } - } plugin::save(); @@ -501,7 +472,12 @@ class termstartup extends plugin $source_o = new termstartup ($this->config, $source['dn']); - foreach(array("gotoModules", "gotoKernelParameters","gotoShares","gotoKernelParameters","gotoTerminalPath","gotoShares","goLdapServerList","gotoBootKernel","gotoLdapServer","gotoBootKernels") as $attr){ + foreach(array("gotoModules", "gotoKernelParameters","gotoShare", + "gotoKernelParameters","gotoShares", + "goLdapServerList","gotoBootKernel","gotoLdapServer", + "gotoBootKernels","gotoLdapServers","gotoLdapServers", + "gotoLdapServerList","gotoLdap_inherit","gotoShareSelections", + "gotoAvailableShares") as $attr){ $this->$attr = $source_o->$attr; } }