From: hickert Date: Wed, 3 Dec 2008 11:00:35 +0000 (+0000) Subject: Readded direct edit link to fai management X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=8f456f58e4517f79d6c7061ab5c9598816f398d9;p=gosa.git Readded direct edit link to fai management git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13141 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/fai/admin/fai/class_divListFai.inc b/gosa-plugins/fai/admin/fai/class_divListFai.inc index 742a20285..ccdd45812 100644 --- a/gosa-plugins/fai/admin/fai/class_divListFai.inc +++ b/gosa-plugins/fai/admin/fai/class_divListFai.inc @@ -202,6 +202,7 @@ class divListFai extends MultiSelectWindow Variable init ********************/ + $edit_link = "%s"; $objects = array( "FAIpartitionTable" => array("IMG"=> "plugins/fai/images/fai_partitionTable.png", "NAME"=>_("Partition table"),"KZL"=> "PT", "VAR"=>"ShowPartitions"), @@ -286,7 +287,7 @@ class divListFai extends MultiSelectWindow "string" => $checkbox , "attach" => "style='width:20px;'"); $field2 = array( - "string" => $name, + "string" => sprintf($edit_link,$key,$name), "attach" => "style=''"); $field3 = array( "string" => $icon_list , diff --git a/gosa-plugins/fai/admin/fai/class_faiManagement.inc b/gosa-plugins/fai/admin/fai/class_faiManagement.inc index f9a875861..013ee7657 100644 --- a/gosa-plugins/fai/admin/fai/class_faiManagement.inc +++ b/gosa-plugins/fai/admin/fai/class_faiManagement.inc @@ -151,18 +151,15 @@ class faiManagement extends plugin break; } } - if(preg_match("/^edit_[0-9]*_.*$/",$name)){ - $i_entryID = preg_replace("/^edit_([0-9]*)_.*$/i","\\1",$name); - $s_entryType= preg_replace("/^edit_[0-9]*_([^_]*)_.*$/i","\\1",$name); - $s_action = "edit"; - break; - }elseif(preg_match("/^entry_delete_.*/",$name)){ - $s_entry = preg_replace("/^entry_delete_/","",$name); - $s_entry = preg_replace("/_.*$/","",$s_entry); - $s_action = "delete"; - break; + } + + if(isset($_GET['act']) && $_GET['act'] == "edit" && isset($_GET['id'])){ + if(isset($this->objects[$_GET['id']])){ + $s_action = "group_edit"; + $s_entry = $_GET['id']; } } + foreach(array("freeze_branch" => "freeze_branch", "branch_branch" => "branch_branch", "remove_branch" => "remove_branch") as $from => $to){ @@ -404,7 +401,7 @@ class faiManagement extends plugin Edit entry ****************/ - if(($s_action == "edit") || $this->dialog instanceOf faiGroupHandle && $this->dialog->get_mode() == "edit"){ + if($this->dialog instanceOf faiGroupHandle && $this->dialog->get_mode() == "edit"){ $entry = array(); if($this->dialog instanceOf faiGroupHandle){