From: cajus Date: Thu, 8 Jun 2006 11:07:58 +0000 (+0000) Subject: * Fixed current main base problem X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=6a1f9891c4d90dcd283c4bfd3e75069103c736eb;p=gosa.git * Fixed current main base problem * Added create_snapshot() for testing git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3714 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/html/main.php b/html/main.php index e43f2aaeb..3e1363f1a 100644 --- a/html/main.php +++ b/html/main.php @@ -135,6 +135,11 @@ if ($config->data['MAIN']['LANG'] == ""){ $lang= $config->data['MAIN']['LANG']; } +/* Preset current main base */ +if(!isset($_SESSION['CurrentMainBase'])){ + $_SESSION['CurrentMainBase']= get_base_from_people($ui->dn); +} + $lang.=".UTF-8"; putenv("LANGUAGE="); putenv("LANG=$lang"); diff --git a/include/class_MultiSelectWindow.inc b/include/class_MultiSelectWindow.inc index a26337785..0babe8964 100644 --- a/include/class_MultiSelectWindow.inc +++ b/include/class_MultiSelectWindow.inc @@ -79,12 +79,6 @@ class MultiSelectWindow{ $this->CloseButtonString = _("Close"); $this->filterName = $filterName; - /* Set default base, to users base */ - $ui = get_userinfo(); - $base = get_base_from_people($ui->dn); - if(!isset($_SESSION['CurrentMainBase'])){ - $_SESSION['CurrentMainBase'] = $base; - } $this->selectedBase = $_SESSION['CurrentMainBase']; /* Check default values for SaveAdditionalVars */ diff --git a/include/class_ldap.inc b/include/class_ldap.inc index 7b82a8b32..6a2c44510 100644 --- a/include/class_ldap.inc +++ b/include/class_ldap.inc @@ -1130,6 +1130,14 @@ function gen_xls ($dn, $filter= "(objectClass=*)", $attributes= array('*'), $rec return $objectclasses; } + function create_snapshot($dn) + { + if ($this->dn_exists($dn) && $dn != ""){ + $data= preg_replace('/^dn:.*\n/', '', $this->gen_ldif($dn)); + echo base64_encode(gzcompress($data, 6)); + } + } + } // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: diff --git a/plugins/admin/users/class_userManagement.inc b/plugins/admin/users/class_userManagement.inc index 5b5c81162..362245e05 100644 --- a/plugins/admin/users/class_userManagement.inc +++ b/plugins/admin/users/class_userManagement.inc @@ -699,6 +699,7 @@ class userManagement extends plugin /* Generate userlist */ $ldap= $this->config->get_ldap_link(TRUE); + if ($SubSearch){ $ListTemp = get_list($filter, $this->ui->subtreeACL, $base, array("uid", "givenName", "sn", "objectClass"), GL_SUBSEARCH | GL_SIZELIMIT); diff --git a/plugins/personal/posix/class_posixAccount.inc b/plugins/personal/posix/class_posixAccount.inc index b72840a3f..758ea14d8 100644 --- a/plugins/personal/posix/class_posixAccount.inc +++ b/plugins/personal/posix/class_posixAccount.inc @@ -1078,9 +1078,8 @@ class posixAccount extends plugin } - function reload() + function reload() { - /* Set base for all searches */ $base = $_SESSION['CurrentMainBase']; $base = $base;