summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8e494bd)
raw | patch | inline | side by side (parent: 8e494bd)
author | psc <psc@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 4 Mar 2010 14:02:56 +0000 (14:02 +0000) | ||
committer | psc <psc@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 4 Mar 2010 14:02:56 +0000 (14:02 +0000) |
- Move gathering of all FAI classes to an own function,
because it should really be limited to the FAI classes
that are part of the current release or inheritted releases.
- Use FAI::get_all_objects_for_given_base to get the list of
FAI classes and limit the scope to the current FAI release.
This way the list only has those FAI classes which we have
in the current release or could inherit. This fixes a bug
with displaying wrong symbols in some conditions.
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-lhm@16073 594d385d-05f5-0310-b6e9-bd551577e9d8
because it should really be limited to the FAI classes
that are part of the current release or inheritted releases.
- Use FAI::get_all_objects_for_given_base to get the list of
FAI classes and limit the scope to the current FAI release.
This way the list only has those FAI classes which we have
in the current release or could inherit. This fixes a bug
with displaying wrong symbols in some conditions.
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-lhm@16073 594d385d-05f5-0310-b6e9-bd551577e9d8
trunk/gosa-plugins/fai/admin/fai/class_faiProfile.inc | patch | blob | history |
diff --git a/trunk/gosa-plugins/fai/admin/fai/class_faiProfile.inc b/trunk/gosa-plugins/fai/admin/fai/class_faiProfile.inc
index 3daa2424d77f3ad669c546a99db65953cbea0e57..e146a9121644060ea1327408aa72eb8d7ab4d366 100644 (file)
{
/* Load Attributes */
plugin::plugin ($config, $dn);
- $ldap=$this->config->get_ldap_link();
-
+
$this->ui = get_userinfo();
/* Parse ldap attribute to get all assigned classes */
}
}
+
+ if($dn != "new"){
+ $this->dn =$dn;
+ }
+ $this->old_cn = $this->cn;
+ }
+
+ function get_all_fai_classes()
+ {
+ if (count($this->FAIAllclasses)) {
+ return;
+ }
+
+ $ldap=$this->config->get_ldap_link();
+
$categories = array("FAIscript","FAItemplate","FAIhook","FAIvariable","FAIpartitionTable","FAIpackageList");
/* Build filter */
$filter.= "(objectClass=$cat)";
}
- /* Get ldap connection */
- $base = session::get('CurrentMainBase');
- $ldap->cd($base);
$sort = array();
-
/* search all FAI classes */
- $ldap->search("(|$filter)",array("*"));
- while($attrs = $ldap->fetch()){
-
+ $res = FAI::get_all_objects_for_given_base($this->parent->parent->fai_release, "(|$filter)", true);
+ foreach($res as $attrs){
/* Sort by categorie */
foreach($categories as $cat){
if(in_array($cat,$attrs['objectClass'])){
/* Assign sorted classes */
$this->FAIAllclasses = array();
$this->FAIAllclasses = $tmp;
-
- if($dn != "new"){
- $this->dn =$dn;
- }
- $this->old_cn = $this->cn;
}
function acl_base_for_current_object($dn)
$str = " ";
$act = "";
+ $this->get_all_fai_classes();
+
if(isset($this->FAIAllclasses[$usedClass])){
foreach($this->FAIAllclasses[$usedClass] as $class => $obj){
$str.= $objTypes[$class];