From 0f9bcb3e5dd3f2d1c8803ada99fc8e529f6828e5 Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 22 Dec 2005 11:25:27 +0000 Subject: [PATCH] fixed removement of fai classes git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2380 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/fai/class_faiProfile.inc | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) diff --git a/plugins/admin/fai/class_faiProfile.inc b/plugins/admin/fai/class_faiProfile.inc index ff2b4923f..5fe543b06 100644 --- a/plugins/admin/fai/class_faiProfile.inc +++ b/plugins/admin/fai/class_faiProfile.inc @@ -37,22 +37,10 @@ class faiProfile extends plugin $ldap=$this->config->get_ldap_link(); $tmp = split(" ",$this->FAIclass); - $tmp3 = $tmp2 = array(); + $tmp2 = array(); foreach($tmp as $class){ if(!empty($class)){ - if(preg_match("/|/",$class)){ - $o = split("\|",$class); - $tmp3[$o[1]] = trim($o[0]); - }else{ - $tmp2[trim($class)] = trim($class); - } - } - } - $this->FAIclasses = array(); - ksort($tmp3); - if(is_array($tmp3)){ - foreach($tmp3 as $class){ - $this->FAIclasses[$class]=$class; + $tmp2[trim($class)] = trim($class); } } @@ -184,7 +172,7 @@ class faiProfile extends plugin if(preg_match("/DEL_/i",$name)){ $s_action = "delete"; $s_entry = preg_replace("/DEL_/","",$name); - $s_entry = preg_replace("/_.*$/","",$s_entry); + $s_entry = base64_decode(preg_replace("/_.*$/","",$s_entry)); }elseif(preg_match("/Add_class/i",$name)){ $s_action = "add"; }elseif(preg_match("/DelClass/i",$name)){ @@ -280,7 +268,7 @@ class faiProfile extends plugin $field1 = array("string"=> $usedClass,"attach"=>""); $field2 = array("string"=> $str,"attach"=>""); - $field3 = array("string"=> preg_replace("/%KEY%/",$usedClass,$actions).preg_replace("/%s/",base64_encode($usedClass),$linkupdown),"attach"=>"style='border-right:none;'"); + $field3 = array("string"=> preg_replace("/%KEY%/",base64_encode($usedClass),$actions).preg_replace("/%s/",base64_encode($usedClass),$linkupdown),"attach"=>"style='border-right:none;'"); $divlist->AddEntry(array($field1,$field2,$field3)); } @@ -357,10 +345,8 @@ class faiProfile extends plugin $ldap = $this->config->get_ldap_link(); $this->FAIclass = ""; - $i = 0 ; foreach($this->FAIclasses as $class){ - $i ++ ; - $this->FAIclass.=$class."|".$i." "; + $this->FAIclass.=$class." "; } $this->attrs['FAIclass']=trim($this->FAIclass); -- 2.30.2