From afe4b2ee86c5a5bdf3db2527896c1d197c5f7079 Mon Sep 17 00:00:00 2001 From: psc Date: Tue, 24 Mar 2009 11:17:38 +0000 Subject: [PATCH] Apply patch from mba: If all classes of a certain type are in FAIstate freeze, don't allow removal and show lock-symbol (Trac #2271) git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-lhm@13561 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../gosa-plugins/fai/admin/fai/class_divListFai.inc | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/trunk/gosa-plugins/fai/admin/fai/class_divListFai.inc b/trunk/gosa-plugins/fai/admin/fai/class_divListFai.inc index 28c00143c..620aaa745 100644 --- a/trunk/gosa-plugins/fai/admin/fai/class_divListFai.inc +++ b/trunk/gosa-plugins/fai/admin/fai/class_divListFai.inc @@ -248,8 +248,13 @@ class divListFai extends MultiSelectWindow $name = ""; $icon_list = ""; $opsi_only = TRUE; + $locked = TRUE; foreach($objects as $type => $type_data){ if(isset($value[$type])){ + if(!preg_match("/^freeze/", $value[$type]['FAIstate'])){ + /* at least one FAI object of this name is not frozen. */ + $locked = FALSE; + } $name = $value[$type]['cn']; $icon_list .= "\n"; @@ -282,8 +287,12 @@ class divListFai extends MultiSelectWindow $actions.= ""; - $actions.= ""; + if($locked) { + $actions.= "F"; + }else{ + $actions.= ""; + } } /* Create list -- 2.30.2