From 1098fdba2a3edbb64a3aed75f890e2b826b6e37b Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 5 Sep 2006 10:45:43 +0000 Subject: [PATCH] Hide "Toggle remove flag" button, while editing freezed objects git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@4594 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/fai/class_faiPackage.inc | 22 ++++++++++++---------- plugins/admin/fai/faiPackage.tpl | 2 +- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/plugins/admin/fai/class_faiPackage.inc b/plugins/admin/fai/class_faiPackage.inc index 0cb3792f5..67f5c6666 100644 --- a/plugins/admin/fai/class_faiPackage.inc +++ b/plugins/admin/fai/class_faiPackage.inc @@ -274,19 +274,21 @@ class faiPackage extends plugin } /* Configuration dialog open*/ - if((isset($_POST['Markpkg']))&&(isset($_POST['usedPackages']))&&(!empty($_POST['usedPackages']))){ - foreach($_POST['usedPackages'] as $pkg){ - if (isset($this->usedPackages[$pkg])){ - unset($this->usedPackages[$pkg]); - if (preg_match('/^-/', $pkg)){ - $pkg= preg_replace('/^-/', '', $pkg); - } else { - $pkg= preg_replace('/^/', '-', $pkg); + if($this->FAIstate != "freeze"){ + if((isset($_POST['Markpkg']))&&(isset($_POST['usedPackages']))&&(!empty($_POST['usedPackages']))){ + foreach($_POST['usedPackages'] as $pkg){ + if (isset($this->usedPackages[$pkg])){ + unset($this->usedPackages[$pkg]); + if (preg_match('/^-/', $pkg)){ + $pkg= preg_replace('/^-/', '', $pkg); + } else { + $pkg= preg_replace('/^/', '-', $pkg); + } + $this->usedPackages[$pkg]= $pkg; } - $this->usedPackages[$pkg]= $pkg; } } - } + } /* Save Configuration */ if(isset($_POST['SaveObjectConfig'])){ diff --git a/plugins/admin/fai/faiPackage.tpl b/plugins/admin/fai/faiPackage.tpl index 40c133134..388c1e848 100644 --- a/plugins/admin/fai/faiPackage.tpl +++ b/plugins/admin/fai/faiPackage.tpl @@ -71,7 +71,7 @@ - + -- 2.30.2