From eeacaf2b8d17a9f28cad96e73d1e8b1df7e518a2 Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 4 Aug 2006 08:44:04 +0000 Subject: [PATCH] Initial freeze check in for application freezes. No acls handling implemented yet... git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@4386 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../class_applicationManagement.inc | 4 +- .../applications/class_divListApplication.inc | 43 +++++++++++++------ 2 files changed, 31 insertions(+), 16 deletions(-) diff --git a/plugins/admin/applications/class_applicationManagement.inc b/plugins/admin/applications/class_applicationManagement.inc index af900c92e..1df485d75 100644 --- a/plugins/admin/applications/class_applicationManagement.inc +++ b/plugins/admin/applications/class_applicationManagement.inc @@ -72,7 +72,7 @@ class applicationManagement extends plugin $ldap = $this->config->get_ldap_link(); $dn = "ou=apps,".$base; $ret = array(); - $ret [$base] = "/"; + $ret [$dn] = "/"; $ldap->cd($dn); $ldap->search("objectClass=organizationalUnit",array("ou")); @@ -396,7 +396,7 @@ class applicationManagement extends plugin $Flags |= GL_SUBSEARCH; } - $res= get_list($Filter, $this->ui->subtreeACL,$use_base, array("cn","description","dn","objectClass"), $Flags); + $res= get_list($Filter, $this->ui->subtreeACL,$use_base, array("cn","description","dn","objectClass","FAIstate"), $Flags); foreach ($res as $val){ $tmp[strtolower($val['cn'][0]).$val['cn'][0]]=$val; } diff --git a/plugins/admin/applications/class_divListApplication.inc b/plugins/admin/applications/class_divListApplication.inc index e5bddf2ce..612d530b3 100755 --- a/plugins/admin/applications/class_divListApplication.inc +++ b/plugins/admin/applications/class_divListApplication.inc @@ -131,25 +131,40 @@ class divListApplication extends MultiSelectWindow $empty = ""; - /* Create action icons */ - $actions = ""; - if($this->parent->CopyPasteHandler){ - $actions.= " "; - $actions.= " "; - } - $actions.= ""; - $actions.= ""; - - /******************** Attach objects ********************/ foreach($list as $key => $val){ + + /* Get state */ + $state = ""; + if(isset($val['FAIstate'])){ + $state = $val['FAIstate'][0]; + } + + /* If this application is a freezed one, we must hide some action buttons */ + $is_freezed = preg_match("/freeze/i",$state); + + /* Create action icons */ + $actions = ""; + if(($this->parent->CopyPasteHandler) && (!$is_freezed)){ + $actions.= " "; + $actions.= " "; + } + + $actions.= ""; + if($is_freezed){ + $actions.= " "; + }else{ + $actions.= ""; + } + + $title = "title='".preg_replace('/ /', ' ', @LDAP::fix($val['dn']))."'"; if(!isset($val['description'][0])){ -- 2.30.2