summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 89cb914)
raw | patch | inline | side by side (parent: 89cb914)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 30 Jan 2006 16:02:31 +0000 (16:02 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 30 Jan 2006 16:02:31 +0000 (16:02 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2600 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/html/main.php b/html/main.php
index 958d826417d8decabce122496c9b9bca1772d49a..dd02c0f7a215657231d1df21072c5ebc691872ac 100644 (file)
--- a/html/main.php
+++ b/html/main.php
/* Load department list when plugin has changed. That is some kind of
compromise between speed and beeing up to date */
if (isset($_GET['reset'])){
- $config->departments= get_departments();
+ if (!isset($_SESSION['cached_departments'])){
+ $_SESSION['cached_departments']= get_departments();
+ }
+ $config->departments= $_SESSION['cached_departments'];
$config->make_idepartments ();
if (isset($_SESSION['objectinfo'])){
unset ($_SESSION['objectinfo']);
diff --git a/plugins/admin/departments/class_departmentManagement.inc b/plugins/admin/departments/class_departmentManagement.inc
index 39c5eb93c860eeb24bc7028727470367a3d1484d..2a1e2e523a85bdc5efbe9d061dff3a96d6cc2b7f 100644 (file)
}
natcasesort ($this->departments);
reset ($this->departments);
+
+ /* Unset global department list */
+ unset($_SESSION['cached_departments']);
}
function remove_from_parent()
diff --git a/plugins/admin/groups/class_groupManagement.inc b/plugins/admin/groups/class_groupManagement.inc
index 5ce272b32f181f4eca2f30a1241109dff2fe294d..84e7eda1ecf50bf2a84f9fcf715af18d3562d343 100644 (file)
/* What are primary groups? */
$primaries= array();
$ldap= $this->config->get_ldap_link();
- $ldap->cd($base);
- $ldap->search("(&(uid=$regex)(!(uid=*$))(objectClass=posixAccount)(gidNumber=*))", array("gidNumber", "cn"));
- show_ldap_error($ldap->get_error());
- while ($attrs= $ldap->fetch()){
- $primaries[$attrs['gidNumber'][0]]= $attrs['cn'][0];
+ if (!isset($this->config->data['MAIN']['NOPRIMARYGROUP'])){
+ $ldap->cd($base);
+ $ldap->search("(&(uid=$regex)(!(uid=*$))(objectClass=posixAccount)(gidNumber=*))", array("gidNumber", "cn"));
+ show_ldap_error($ldap->get_error());
+ while ($attrs= $ldap->fetch()){
+ $primaries[$attrs['gidNumber'][0]]= $attrs['cn'][0];
+ }
}
/* Set filter depending on selection */
diff --git a/plugins/admin/systems/class_selectUserToPrinterDialog.inc b/plugins/admin/systems/class_selectUserToPrinterDialog.inc
index 20ee7ea22ac972993098a51637bf3c9c10fe59cc..923f9454f0f84bc628fb896f73941d35a51a454d 100644 (file)
var $searchObjects = "";
var $searchAttrs = "";
var $searchAppend = "";
+ var $baseAddition = "";
var $type = "";
function selectUserToPrinterDialog ($config, $dn= NULL,$type=false )
$this->searchObjects = "(objectClass=gosaAccount)(!(uid=*$))";
$this->searchAttrs = array("cn","uid");
$this->searchAppend = "uid";
+ $this->baseAddition = get_people_ou();
;break;
case "AddGroup" :
$this->searchObjects = "(objectClass=posixGroup)";
$this->searchAttrs = array("cn","description");
$this->searchAppend = "cn";
+ $this->baseAddition = get_groups_ou();
;break;
case "AddAdminUser" :
$this->searchObjects = "(objectClass=gosaAccount)(!(uid=*$))";
$this->searchAttrs = array("cn","uid");
$this->searchAppend = "uid";
+ $this->baseAddition = get_people_ou();
;break;
case "AddAdminGroup" :
$this->searchObjects = "(objectClass=posixGroup)";
$this->searchAttrs = array("cn","description");
$this->searchAppend = "cn";
+ $this->baseAddition = get_groups_ou();
;break;
}
$this->type = $type;
$this->regex=preg_replace("/\*\*/","*",$this->regex);
}
+ $tmp_printers= $this->getPrinter();
$smarty->assign("regexPrinter" , $this->regex);
$smarty->assign("deplistPrinter" , $this->config->idepartments);//deplist);
$smarty->assign("depselectPrinter" , $this->depselect);
- $smarty->assign("gotoPrinters" , $this->getPrinter());
- $smarty->assign("gotoPrinterKeys" , array_flip($this->getPrinter()));
+ $smarty->assign("gotoPrinters" , $tmp_printers);
+ $smarty->assign("gotoPrinterKeys" , array_flip($tmp_printers));
$smarty->assign("apply" , apply_filter());
$smarty->assign("alphabet" , generate_alphabet());
$smarty->assign("search_image" , get_template_path('images/search.png'));
$a_return=array();
$ldap = $this->config->get_ldap_link();
$ldap->cd($this->depselect);
- $ldap->search("(&".$this->searchObjects."(cn=".$this->regex."))",$this->searchAttrs);
+ #$ldap->search("(&".$this->searchObjects."(cn=".$this->regex."))", $this->depselect, $this->searchAttrs);
+ $ldap->ls("(&".$this->searchObjects."(cn=".$this->regex."))", $this->baseAddition.$this->depselect, $this->searchAttrs);
while($printer = $ldap->fetch()){
if(($detailed ==true)){
if(isset($printer[$this->searchAppend])){
}
}
-
-
-
-
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
?>