summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8ab3d7d)
raw | patch | inline | side by side (parent: 8ab3d7d)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 17 Sep 2007 09:51:21 +0000 (09:51 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 17 Sep 2007 09:51:21 +0000 (09:51 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7303 594d385d-05f5-0310-b6e9-bd551577e9d8
html/index.php | patch | blob | history | |
html/main.php | patch | blob | history |
diff --git a/html/index.php b/html/index.php
index 77c375bc909e773937b1a4bef44171ac5cfd5cf4..f525d267cfc09398d6467fceec4ce2e7ad3f6bbc 100644 (file)
--- a/html/index.php
+++ b/html/index.php
$_SESSION['PHP4COMPATIBLE']= TRUE;
}
+ /* Restore filter settings from cookie, if available
+ */
+ $cookie_vars= array("MultiDialogFilters","CurrentMainBase");
+ foreach($cookie_vars as $var){
+ if(isset($_COOKIE[$var])){
+ $_SESSION[$var] = unserialize(base64_decode($_COOKIE[$var]));
+ }elseif(isset($HTTP_COOKIE_VARS[$var])){
+ $_SESSION[$var] = unserialize(base64_decode($HTTP_COOKIE_VARS[$var]));
+ }
+ }
+
/* are we using accountexpiration */
if((isset($config->data['MAIN']['ACCOUNT_EXPIRATION'])) &&
preg_match('/true/i', $config->data['MAIN']['ACCOUNT_EXPIRATION'])){
diff --git a/html/main.php b/html/main.php
index 4dfe7477e5e2e70a343dd43b4799adb91b292c8a..a2db883ebd2a9557158a695b2826565421b75a25 100644 (file)
--- a/html/main.php
+++ b/html/main.php
$display= $header.$smarty->fetch(get_template_path('framework.tpl'));
+/* Save dialog filters and selected base in a cookie.
+ So we may be able to restore the filter an base settings on reload.
+*/
+$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);
+ }
+}
+
/* Show page... */
echo $display;