Code

* Fixed current main base problem
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 8 Jun 2006 11:07:58 +0000 (11:07 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 8 Jun 2006 11:07:58 +0000 (11:07 +0000)
* Added create_snapshot() for testing

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3714 594d385d-05f5-0310-b6e9-bd551577e9d8

html/main.php
include/class_MultiSelectWindow.inc
include/class_ldap.inc
plugins/admin/users/class_userManagement.inc
plugins/personal/posix/class_posixAccount.inc

index e43f2aaeb104149ffc1c5b3d6bc85e9e71146f32..3e1363f1a42bbc0f170eae3e8c8bcab118b6f2f4 100644 (file)
@@ -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");
index a26337785ec3f7ea52d7fda4473a6b39591f27b1..0babe89645c57e0916684eabb34c3af39715fbff 100644 (file)
@@ -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 */
index 7b82a8b327bf262cc2a9804681c47bfc3b71f7b4..6a2c445103ccbdf074333d7e5d822963df69683c 100644 (file)
@@ -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:
index 5b5c8116265c2b7d352c2d382b792c0223997085..362245e0540052215c3597ab519e4cf16029eade 100644 (file)
@@ -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);
index b72840a3f6da714c7a64e5685f40bca7c8e7c3af..758ea14d88942b783914a2dbbb07aea0979f3175 100644 (file)
@@ -1078,9 +1078,8 @@ class posixAccount extends plugin
 
   }
 
- function reload()
 function reload()
   {
-
     /* Set base for all searches */
     $base     = $_SESSION['CurrentMainBase'];
     $base     = $base;