From: hickert Date: Thu, 28 Jul 2005 06:41:26 +0000 (+0000) Subject: Edit / Delete available for departments with spaces X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=ba56bbc4d5fa988702f40cd94a7206f0507c647c;p=gosa.git Edit / Delete available for departments with spaces git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1019 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/departments/class_departmentManagement.inc b/plugins/admin/departments/class_departmentManagement.inc index 38753f4b1..cbfef6f7d 100644 --- a/plugins/admin/departments/class_departmentManagement.inc +++ b/plugins/admin/departments/class_departmentManagement.inc @@ -76,10 +76,14 @@ class departmentManagement extends plugin if(preg_match("/dep_del.*/",$key)){ $s_action = "del"; $s_entry = preg_replace("/dep_".$s_action."_/i","",$key); + $s_entry = preg_replace("/_.*/","",$s_entry); + $s_entry = base64_decode($s_entry); // Post for edit }elseif(preg_match("/dep_edit_.*/",$key)){ $s_action="edit"; $s_entry = preg_replace("/dep_".$s_action."_/i","",$key); + $s_entry = preg_replace("/_.*/","",$s_entry); + $s_entry = base64_decode($s_entry); // Post for new }elseif(preg_match("/dep_new.*/",$key)){ $s_action="new"; @@ -90,6 +94,7 @@ class departmentManagement extends plugin }elseif(preg_match("/dep_root.*/i",$key)){ $s_action="root"; } + } if(isset($_POST['depselect']) && $_POST['depselect']){ @@ -127,9 +132,6 @@ class departmentManagement extends plugin $this->reload(); } - - $s_entry = preg_replace("/_.*/","",$s_entry); - if (isset($_GET['search'])){ $s= mb_substr($_GET['search'], 0, 1, "UTF8")."*"; if ($s == "**"){ @@ -306,7 +308,7 @@ class departmentManagement extends plugin } $field0 = array("string" => "department","attach"=>"style='width:20px;'"); $field1 = array("string" => sprintf($linkopen,base64_encode($key),$val), "attach" => "width='100%'"); - $field2 = array("string" => preg_replace("/%KEY%/", $key, $actions),"attach"=>"style='text-align:right;border:none'"); + $field2 = array("string" => preg_replace("/%KEY%/", base64_encode($key), $actions),"attach"=>"style='text-align:right;border:none'"); $divlist->AddEntry( array($field0,$field1,$field2));