Code

Removed cached departments
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 11 May 2006 10:40:57 +0000 (10:40 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 11 May 2006 10:40:57 +0000 (10:40 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3288 594d385d-05f5-0310-b6e9-bd551577e9d8

TODO
html/index.php
html/main.php
plugins/admin/departments/class_departmentGeneric.inc
plugins/admin/departments/class_departmentManagement.inc

diff --git a/TODO b/TODO
index 6abb8a8867d8b3eaf3c0971087924151fb651bce..0ef0fcfb79c57b24b4dda453358ea669327f0649 100644 (file)
--- a/TODO
+++ b/TODO
@@ -36,6 +36,7 @@ Now:
   will have to other plugins in class_plugin.inc
 * Enhance show_ldap_error() with an additional programmer supplied message
 * Changing LDAP-Servers -> start tab!
+* Subsearches for user dialogs
 
 
 Target for 2.5:
index dd9cc28b93083f42e60d47178d1b551312cf901e..e3e87e6dadb6da018115bbd878a8fa16c855b31b 100644 (file)
@@ -213,6 +213,8 @@ if ($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST['login'])){
 
       /* Let GOsa trigger a new connection for each POST, save
          config to session. */
+      $config->get_departments();
+      $config->make_idepartments();
       $_SESSION['config']= $config;
 
       /* Go to main page */
index 6fefa08a2fadc0fa664a4c1939bc291564a003b0..95b5e5ca9196ca65f5eb17d7263f8acabb5f7b8c 100644 (file)
@@ -240,12 +240,7 @@ if ($_SERVER["REQUEST_METHOD"] == "POST"){
 /* Load department list when plugin has changed. That is some kind of
    compromise between speed and beeing up to date */
 if (isset($_GET['reset'])){
-  if (!isset($_SESSION['cached_departments'])){
-    $config->get_departments();
-    $_SESSION['cached_departments']= $config->departments;
-  } else {
-    $config->departments= $_SESSION['cached_departments'];
-  }
+  $config->get_departments();
   $config->make_idepartments ();
   if (isset($_SESSION['objectinfo'])){
     unset ($_SESSION['objectinfo']);
@@ -380,8 +375,9 @@ if ((isset($config->data['MAIN']['W3CTEST']) && preg_match('/true/i', $config->d
 /* Show page... */
 echo $display;
 
-/* Save plist */
+/* Save plist and config */
 $_SESSION['plist']= $plist;
+$_SESSION['config']= $config;
 
 /* Echo compilation time * /
 $r = split(" ",$start);
index e9021a8bdca607d0ef98e466bf900b594d7a9077..0954ac8eca934f65157405350b705c566393ed63 100644 (file)
@@ -382,7 +382,7 @@ class department extends plugin
 
                        $display=  $smarty->fetch(get_template_path("recursive_move.tpl",TRUE));
                        return($display);
-                       exit();
+
                }else{
                        if(!$this->rec_cpy){ 
                                return;
index 1906820283c99718eaa76a3b39230ad913d84f64..f6163834fee77c2925012c266001792693bf4c80 100644 (file)
@@ -66,14 +66,15 @@ class departmentManagement extends plugin
 
                /* Reload departments */
                $this->config->get_departments();
+               $this->config->make_idepartments();
+               $_SESSION['config']= $this->config;
+
                $smarty                                         = get_smarty();
                $display                                        = "";
                $depfilter                                      = get_global("depfilter");
                $s_action                                       = "";  // Will contain an action, like del or edit
                $s_entry                                        = "";  // The entry name for edit delete -...
 
-               $this->config->make_idepartments();
-
                if (isset($_POST['regex'])){
                        $depfilter['regex']= $_POST['regex'];
                }
@@ -214,8 +215,8 @@ class departmentManagement extends plugin
                        $this->deptabs->save(true);
                        $this->deptabs->by_object['department']->recursive_move("","",true);
                        $this->reload ();
-                       /* Group has been saved successfully, remove lock from
-                          LDAP. */
+
+                       /* Group has been saved successfully, remove lock from LDAP. */
                        if ($this->dn != "new"){
                                del_lock ($this->dn);
                        }
@@ -431,9 +432,6 @@ class departmentManagement extends plugin
                }
                natcasesort ($this->departments);
                reset ($this->departments);
-
-               /* Unset global department list */
-               unset($_SESSION['cached_departments']);
        }
 
        function remove_from_parent()