summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 30dc38b)
raw | patch | inline | side by side (parent: 30dc38b)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 28 Aug 2007 07:18:25 +0000 (07:18 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 28 Aug 2007 07:18:25 +0000 (07:18 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7149 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/systems/class_servDHCP.inc | patch | blob | history |
index a434978e3f4638b32d1bd7178d4cd45e326409d9..89fd1419e4730ff97535d2bea4d15e42369a821c 100644 (file)
var $types= array();
var $serviceDN= "";
+ var $quote_option = array("domain-name");
+
function servdhcp ($config, $dn= NULL, $parent= NULL)
{
plugin::plugin ($config, $dn, $parent);
if (!count($this->dhcpSections)){
$this->is_account= FALSE;
}
+
}
continue;
}
if (count($values)){
+
+ if($attribute == "dhcpOption"){
+ foreach($values as $key => $value){
+ $option_name = trim(preg_replace("/[^ ]*$/","",$value));
+ $option_value= trim(preg_replace("/^[^ ]*/","",$value));
+ if(in_array($option_name,$this->quote_option)){
+ $values[$key] = $option_name." \"".$option_value."\"";
+ }
+ }
+ }
if (count($values) == 1){
$attrs[$attribute]= $values[0];
} else {
unset($sattrs[$attrs[$i]]['count']);
}
$sattrs['dn']= $ldap->getDN();
+
+ foreach($sattrs as $name => $values){
+ if($name == "dhcpOption"){
+ foreach($values as $key => $value){
+ $value_name = trim(preg_replace("/[^ ]*$/","",$value));
+ $value_value= trim(preg_replace("/^[^ ]*/","",$value));
+ if(in_array($value_name,$this->quote_option)){
+ $value_value = preg_replace("/^\"/","",$value_value);
+ $value_value = preg_replace("/\"$/","",$value_value);
+ $sattrs[$name][$key] = $value_name." ".$value_value;
+ }
+ }
+ }
+ }
+
$this->dhcpObjectCache[$ldap->getDN()]= $sattrs;
$tmp= preg_replace("/".$this->serviceDN."/", "", $ldap->getDN());
$indent= substr_count($tmp, ",");