From: cajus Date: Thu, 11 May 2006 10:40:57 +0000 (+0000) Subject: Removed cached departments X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=98d4474e843cf4591ae84461d91dbdd99854784c;p=gosa.git Removed cached departments git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3288 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/TODO b/TODO index 6abb8a886..0ef0fcfb7 100644 --- 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: diff --git a/html/index.php b/html/index.php index dd9cc28b9..e3e87e6da 100644 --- a/html/index.php +++ b/html/index.php @@ -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 */ diff --git a/html/main.php b/html/main.php index 6fefa08a2..95b5e5ca9 100644 --- a/html/main.php +++ b/html/main.php @@ -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); diff --git a/plugins/admin/departments/class_departmentGeneric.inc b/plugins/admin/departments/class_departmentGeneric.inc index e9021a8bd..0954ac8ec 100644 --- a/plugins/admin/departments/class_departmentGeneric.inc +++ b/plugins/admin/departments/class_departmentGeneric.inc @@ -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; diff --git a/plugins/admin/departments/class_departmentManagement.inc b/plugins/admin/departments/class_departmentManagement.inc index 190682028..f6163834f 100644 --- a/plugins/admin/departments/class_departmentManagement.inc +++ b/plugins/admin/departments/class_departmentManagement.inc @@ -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()