From: hickert Date: Tue, 30 Mar 2010 14:49:42 +0000 (+0000) Subject: Updated faiProfile X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=0086cde0b19a863fec279fa9f653c910e80858a7;p=gosa.git Updated faiProfile git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@17406 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/fai/admin/fai/class_faiProfile.inc b/gosa-plugins/fai/admin/fai/class_faiProfile.inc index db587ac06..06c46533b 100644 --- a/gosa-plugins/fai/admin/fai/class_faiProfile.inc +++ b/gosa-plugins/fai/admin/fai/class_faiProfile.inc @@ -217,7 +217,7 @@ class faiProfile extends plugin if(preg_match("/DEL_/i",$name) && $this->acl_is_writeable("FAIclass")){ $s_action = "delete"; $s_entry = preg_replace("/DEL_/","",$name); - $s_entry = base64_decode(preg_replace("/_.*$/","",$s_entry)); + $s_entry = postDecode($s_entry); }elseif(preg_match("/Add_class/i",$name)&& $this->acl_is_writeable("FAIclass")){ $s_action = "add"; }elseif(preg_match("/DelClass/i",$name) && $this->acl_is_writeable("FAIclass")){ @@ -231,8 +231,7 @@ class faiProfile extends plugin if((preg_match("/sortup_/",$name))&&(!$sort_once) && $this->acl_is_writeable("FAIclass")){ $sort_once = true; $val = preg_replace("/sortup_/","",$name); - $val = preg_replace("/_.*$/","",$val); - $val = base64_decode($val); + $val = postDecode($val); $this->catUp($val); } @@ -240,8 +239,7 @@ class faiProfile extends plugin if((preg_match("/sortdown_/",$name))&&(!$sort_once) && $this->acl_is_writeable("FAIclass")){ $sort_once = true; $val = preg_replace("/sortdown_/","",$name); - $val = preg_replace("/_.*$/","",$val); - $val = base64_decode($val); + $val = postDecode($val); $this->catDown($val); } @@ -284,19 +282,21 @@ class faiProfile extends plugin $divlist->SetSummary(_("This list displays all assigned class names for this profile.")); /* item images */ - $objTypes['FAIhook'] = ""; - $objTypes['FAItemplate'] = ""; - $objTypes['FAIscript'] = ""; - $objTypes['FAIvariable'] = ""; - $objTypes['FAIpackageList'] = ""; - $objTypes['FAIpartitionTable'] = ""; + $objTypes['FAIhook'] = image('plugins/fai/images/fai_hook.png','',_("Hook bundle")); + $objTypes['FAItemplate'] = image('plugins/fai/images/fai_template.png','',_("Template bundle")); + $objTypes['FAIscript'] = image('plugins/fai/images/fai_script.png','',_("Script bundle")); + $objTypes['FAIvariable'] = image('plugins/fai/images/fai_variable.png','',_("Variable bundle")); + $objTypes['FAIpackageList'] = image('plugins/fai/images/fai_packages.png','',_("Package bundle")); + $objTypes['FAIpartitionTable'] = image('plugins/fai/images/fai_partitionTable.png','',_("Partition table")); + + $emp = image('images/empty.png'); /* Delete button */ - $actions = ""; + $actions = image('images/lists/trash.png','DEL_%KEY%',_("Remove class from profile")); /* Up down buttons */ - $linkupdown = " "; - $linkupdown.= ""; + $linkupdown = image('images/lists/sort-up.png','sortup_%s',_("Up"), 'top'); + $linkupdown.= image('images/lists/sort-down.png','sortdown_%s',_("Down"), 'bottom'); /* Append fai classes to divlist */ if($this->acl_is_readable("FAIclass")){ @@ -313,8 +313,8 @@ class faiProfile extends plugin $field1 = array("string"=> $usedClass,"attach"=>""); $field2 = array("string"=> $str,"attach"=>""); if(!preg_match("/freeze/", $this->FAIstate) && $this->acl_is_writeable("FAIclass")){ - $field3 = array("string"=> preg_replace("/%KEY%/",base64_encode($usedClass),$actions). - preg_replace("/%s/",base64_encode($usedClass),$linkupdown), + $field3 = array("string"=> preg_replace("/%KEY%/",postEncode($usedClass),$actions). + preg_replace("/%s/",postEncode($usedClass),$linkupdown), "attach"=>"style='border-right:none;'"); }else{ $field3 = array("string"=>" ", "attach"=>"style='border-right:none;'");