diff --git a/html/main.php b/html/main.php
index 1583904f7694bc2cefe594a164f7cc5364ab52ec..37a2eec73c14796cb2a3bceeaddd24c303c9413c 100644 (file)
--- a/html/main.php
+++ b/html/main.php
/* Save dialog filters and selected base in a cookie.
So we may be able to restore the filter an base settings on reload.
*/
+$cookie = array();
+
+if(isset($_COOKIE['GOsa_Filter_Settings'])){
+ $cookie = unserialize(base64_decode($_COOKIE['GOsa_Filter_Settings']));
+}elseif(isset($HTTP_COOKIE_VARS['GOsa_Filter_Settings'])){
+ $cookie = unserialize(base64_decode($HTTP_COOKIE_VARS['GOsa_Filter_Settings']));
+}
if(isset($config->data['MAIN']['SAVE_FILTER']) && preg_match("/true/",$config->data['MAIN']['SAVE_FILTER'])){
$cookie_vars = array("MultiDialogFilters","CurrentMainBase");
foreach($cookie_vars as $var){
if(isset($_SESSION[$var])){
- @setcookie($var,base64_encode(serialize($_SESSION[$var])),time()+ 60*60*24*30);
+ $cookie[$ui->dn][$var] = $_SESSION[$var];
}
}
if(isset($_GET['plug'])){
- @setcookie("plug", $_GET['plug'],time()+ 60*60*24*30);
+ $cookie[$ui->dn]['plug'] = $_GET['plug'];
}
+ setcookie("GOsa_Filter_Settings",base64_encode(serialize($cookie)),time() + (60*60*24));
}
/* Show page... */