From 5e1eca4b5478eea2db0ac703798352e0539e7894 Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 27 Aug 2007 07:21:11 +0000 Subject: [PATCH] Udpated padding git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7141 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/systems/class_servDHCP.inc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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(); -- 2.30.2