From: hickert Date: Mon, 27 Aug 2007 07:21:11 +0000 (+0000) Subject: Udpated padding X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=5e1eca4b5478eea2db0ac703798352e0539e7894;p=gosa.git Udpated padding git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7141 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/systems/class_servDHCP.inc b/plugins/admin/systems/class_servDHCP.inc index 3e70a80b9..a434978e3 100644 --- a/plugins/admin/systems/class_servDHCP.inc +++ b/plugins/admin/systems/class_servDHCP.inc @@ -80,9 +80,13 @@ class servdhcp extends plugin $dn= $this->dialog->dn; $class= get_class($this->dialog); $type= $this->types[$class]; - $indent= substr_count(preg_replace("/".$this->serviceDN."/", '', $dn), ","); - $spaces= ""; - for ($i= 0; $i<$indent; $i++){ + if(empty($this->serviceDN)){ + $indent= substr_count(preg_replace("/".$this->dn."/", '', $dn), ",") -1; + }else{ + $indent= substr_count(preg_replace("/".$this->serviceDN."/", '', $dn), ","); + } + $spaces= ""; + for ($i= 0; $i<$indent; $i++){ $spaces.= "    "; } $data= $this->dialog->save();