From: hickert Date: Fri, 4 Aug 2006 08:44:04 +0000 (+0000) Subject: Initial freeze check in for application freezes. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=eeacaf2b8d17a9f28cad96e73d1e8b1df7e518a2;p=gosa.git 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 --- 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])){