summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: adfa941)
raw | patch | inline | side by side (parent: adfa941)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 28 Jul 2006 06:20:13 +0000 (06:20 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 28 Jul 2006 06:20:13 +0000 (06:20 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@4333 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/systems/class_workstationStartup.inc | patch | blob | history |
diff --git a/plugins/admin/systems/class_workstationStartup.inc b/plugins/admin/systems/class_workstationStartup.inc
index 1fcae8be32a59edb37ccba7f969068dbbd69cf18..ef0244274ed5e61fb09bec445d83698d12d15889 100644 (file)
$_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;
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)"