diff --git a/html/main.php b/html/main.php index ddcef8e148b29f987e8a44b1cf27de1642b83eac..5433436d1469bfe3eff63635b06ef11f2f13a261 100644 --- a/html/main.php +++ b/html/main.php @@ -169,12 +169,6 @@ if (memory_get_usage() > (to_byte(ini_get('memory_limit')) - 2048000)) { msg_dialog::display(_("Configuration error"), _("Running out of memory!"), WARNING_DIALOG); } -/* Load department list when plugin has changed. That is some kind of - compromise between speed and beeing up to date */ -if (isset($_GET['reset'])) { - set_object_info(); -} - /* show web frontend */ $smarty->assign("date", date("l, dS F Y H:i:s O")); $lang = session::get('lang'); diff --git a/include/functions.inc b/include/functions.inc index b0c4459df4b78500d85a2b7bb4c9fa7f4a11cb9f..0ff4d6611408d2cbd76387ca7e66def3a8521a3c 100644 --- a/include/functions.inc +++ b/include/functions.inc @@ -1835,18 +1835,6 @@ function cred_decrypt ($input, $password) return openssl_decrypt($input, 'aes-256-cbc', $key, OPENSSL_RAW_DATA, $iv); } - -function get_object_info () -{ - return session::get('objectinfo'); -} - - -function set_object_info ($str = "") -{ - session::set('objectinfo', $str); -} - /*! * \brief Test if an ip is the network range * diff --git a/include/management/class_management.inc b/include/management/class_management.inc index 0e67ce0128c3461d77e0c40f725e2679cea3e505..75c49e07f415efe6dec84df56173927459add3ba 100644 --- a/include/management/class_management.inc +++ b/include/management/class_management.inc @@ -589,9 +589,8 @@ class management $smarty->assign('headline', $this->title); $smarty->assign('headline_image', $this->icon); - $info = get_object_info(); - if ($info != '') { - return '<div class="pluginfo">'.$info."</div>\n"; + if (is_object($this->tabObject) && ($this->currentDn != '')) { + return '<div class="pluginfo">'.$this->currentDn."</div>\n"; } return ''; } @@ -617,8 +616,6 @@ class management $this->tabObject = NULL; $this->last_dialogObject = $this->dialogObject; $this->dialogObject = NULL; - - set_object_info(); } protected function listAclCategories (): array @@ -719,8 +716,6 @@ class management $this->currentDn = 'new'; - set_object_info($this->currentDn); - // Open object $this->openTabObject(objects::create($type)); @DEBUG(DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__, $this->currentDn, 'Create entry initiated'); @@ -735,8 +730,6 @@ class management $this->currentDn = 'new'; - set_object_info($this->currentDn); - // Open object $this->openTabObject(objects::createTemplate($type)); @DEBUG(DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__, $this->currentDn, 'Create template entry initiated'); @@ -841,7 +834,6 @@ class management // Get the dn of the object and create lock $this->currentDn = $target; - set_object_info($this->currentDn); if ($locks = get_locks($this->currentDn, TRUE)) { return gen_locked_message($locks, $this->currentDn, TRUE); } @@ -1230,7 +1222,6 @@ class management $this->listing->focusDn($dn); $entry = $this->listing->getEntry($dn); $this->currentDn = $dn; - set_object_info($this->currentDn); add_lock($this->currentDn, $ui->dn); // Open object diff --git a/include/simpleplugin/class_simpleManagement.inc b/include/simpleplugin/class_simpleManagement.inc index de90f18a58caa0c9eec27ad975f4e33569af9ba3..aa99423ed843bd4f2c973b5594ac66827a977e03 100644 --- a/include/simpleplugin/class_simpleManagement.inc +++ b/include/simpleplugin/class_simpleManagement.inc @@ -511,9 +511,8 @@ class simpleManagement $smarty->assign('headline', $plTitle); $smarty->assign('headline_image', $plIcon); - $info = get_object_info(); - if ($info != '') { - return '<div class="pluginfo">'.$info."</div>\n"; + if (is_object($this->tabObject) && ($this->dn != '')) { + return '<div class="pluginfo">'.$this->dn."</div>\n"; } return ''; } @@ -577,8 +576,6 @@ class simpleManagement $this->dn = 'new'; $this->is_single_edit = FALSE; - set_object_info($this->dn); - // Open object $this->openTabObject(objects::open($this->dn, $type)); @DEBUG(DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__, $this->dn, "Create new entry initiated!"); @@ -774,7 +771,6 @@ class simpleManagement // Get the dn of the object and creates lock $this->dn = array_pop($target); - set_object_info($this->dn); if ($locks = get_locks($this->dn, TRUE)) { return gen_locked_message($locks, $this->dn, TRUE); } @@ -871,7 +867,6 @@ class simpleManagement $this->dialogObject = NULL; $this->skipFooter = FALSE; - set_object_info(); } /*! diff --git a/plugins/admin/acl/class_aclManagement.inc b/plugins/admin/acl/class_aclManagement.inc index 889270f98adeb91d0bf5aceba4f29380878adeb3..f774ce2524565e20716c27bdfadadd89292e6888 100644 --- a/plugins/admin/acl/class_aclManagement.inc +++ b/plugins/admin/acl/class_aclManagement.inc @@ -187,8 +187,6 @@ class aclManagement extends management $this->currentDn = $dn; - set_object_info($this->currentDn); - $this->openTabObject($tabObject); @DEBUG(DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__, $this->currentDn, 'Creating new ACLĂ‚ assignment'); }