Code

Udpated padding
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 27 Aug 2007 07:21:11 +0000 (07:21 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 27 Aug 2007 07:21:11 +0000 (07:21 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7141 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/systems/class_servDHCP.inc

index 3e70a80b96ce79c5b40c2a7ac4c6fe3400c4ad6f..a434978e3f4638b32d1bd7178d4cd45e326409d9 100644 (file)
@@ -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.= "&nbsp;&nbsp;&nbsp;&nbsp;";
         }
         $data= $this->dialog->save();