From: hickert Date: Fri, 28 Jul 2006 06:20:13 +0000 (+0000) Subject: Fixed Workstation startup, FAIclasses will know work with strict units X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=b4c7f3e5931c5275b9a73d814f26c63ad5e181c1;p=gosa.git Fixed Workstation startup, FAIclasses will know work with strict units git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@4333 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/systems/class_workstationStartup.inc b/plugins/admin/systems/class_workstationStartup.inc index 1fcae8be3..ef0244274 100644 --- a/plugins/admin/systems/class_workstationStartup.inc +++ b/plugins/admin/systems/class_workstationStartup.inc @@ -67,12 +67,18 @@ class workstartup extends plugin $_SESSION['getAvailableClassesForThisRelease_CACHE'] = array(); $_SESSION['getAvailableClassesForThisRelease_CACHED_CLASSES'] = array(); - /* Search all FAI objects */ - $ldap->search("(|(objectClass=FAIpackageList)(objectClass=FAItemplate)(objectClass=FAIvariable)(objectClass=FAIscript)(objectClass=FAIhook)(objectClass=FAIprofile)(objectClass=FAIpartitionTable))",array("cn","objectClass","FAIdebianSection")); - /* Sort all entries, and attach elementtype. - * To be able to show the types in the listbox. - */ - while($attr = $ldap->fetch()){ + $ui = get_userinfo(); + $res = get_list( "(|(objectClass=FAIpackageList)". + "(objectClass=FAItemplate)". + "(objectClass=FAIvariable)". + "(objectClass=FAIscript)". + "(objectClass=FAIhook)". + "(objectClass=FAIprofile)". + "(objectClass=FAIpartitionTable))", + $ui->subtreeACL,$this->config->current['BASE'], + array("cn","objectClass","FAIdebianSection")); + + foreach($res as $attr){ $cn = $attr['cn'][0]; $_SESSION['getAvailableClassesForThisRelease_CACHED_CLASSES'][] = $attr; @@ -341,28 +347,6 @@ class workstartup extends plugin return($_SESSION['getAvailableClassesForThisRelease_CACHE'][$release]); } - /* Create cache with all classes - */ - if((!isset($_SESSION['getAvailableClassesForThisRelease_CACHED_CLASSES'])) || - (!is_array($_SESSION['getAvailableClassesForThisRelease_CACHED_CLASSES'])) || - (count($_SESSION['getAvailableClassesForThisRelease_CACHED_CLASSES']) ==0 )){ - - /* Get ldap connection */ - $ldap = $this->config->get_ldap_link(); - $ldap->cd($this->config->current['BASE']); - - /* Get possible classes ... - This would be faste with some kind of caching ... - */ - $ldap->search("(|(objectClass=FAIpackageList)(objectClass=FAItemplate)(objectClass=FAIvariable)(objectClass=FAIscript)(objectClass=FAIhook)(objectClass=FAIprofile)(objectClass=FAIpartitionTable))",array("cn"),true); - /* Sort all entries, and attach elementtype. - * To be able to show the types in the listbox. - */ - while($attr = $ldap->fetch()){ - $_SESSION['getAvailableClassesForThisRelease_CACHED_CLASSES'][] = $attr; - } - } - /* Walk through cache and get out what we need. * * Function od : "$this->generateDNSyn($release)"