summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c959558)
raw | patch | inline | side by side (parent: c959558)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 17 Sep 2007 11:50:28 +0000 (11:50 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 17 Sep 2007 11:50:28 +0000 (11:50 +0000) |
if save_filter is 'true' the current filter settings will be stored in a seperate user cookie
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7304 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7304 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/contrib/gosa.conf b/contrib/gosa.conf
index a7a4f2637c32e5c7ec0ceffd7adbe42d417c6a1a..0de32e9a128c4905ade339ca66f2cd6478fd7542 100644 (file)
--- a/contrib/gosa.conf
+++ b/contrib/gosa.conf
{/if}
{if $cv.optional.auto_network_hook_active}
auto_network_hook="{$cv.optional.auto_network_hook} "
+{/if}
+{if $cv.optional.user_filter_cookie}
+ save_filter="true"
+{else}
+ save_filter="false"
{/if}
lang="{$cv.lang_selected}"
theme="{$cv.theme}"
diff --git a/html/index.php b/html/index.php
index f525d267cfc09398d6467fceec4ce2e7ad3f6bbc..2f7a401ae34ee8c69b541c26fb3b8fb154f74402 100644 (file)
--- a/html/index.php
+++ b/html/index.php
/* 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]));
+ 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($_COOKIE[$var])){
+ $_SESSION[$var] = unserialize(base64_decode($_COOKIE[$var]));
+ }elseif(isset($HTTP_COOKIE_VARS[$var])){
+ $_SESSION[$var] = unserialize(base64_decode($HTTP_COOKIE_VARS[$var]));
+ }
}
}
diff --git a/html/main.php b/html/main.php
index a2db883ebd2a9557158a695b2826565421b75a25..c56a231753b1217c5ad150f15d8a9256295c5f93 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_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);
+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);
+ }
}
}
index 9148868ef95cd131e996bfec6dc7a0b17272de33..cb1d28c8ad91a3ba9726631f6dce1e718e3760af 100644 (file)
"forcessl" => false,
"ldapstats" => false,
"warnssl" => true,
+ "user_filter_cookie" => true,
"ppd_path" => "/var/spool/ppd/",
"ppd_path_active" => FALSE,
"compile" => "/var/spool/gosa",
}
}
- foreach(array("list_summary","strict_units","noprimarygroup","forceglobals","forcessl","ldapstats","warnssl","compile","debuglevel","session_lifetime") as $name){
+ foreach(array("list_summary","strict_units","noprimarygroup","forceglobals","forcessl","ldapstats","user_filter_cookie","warnssl","compile","debuglevel","session_lifetime") as $name){
if(isset($_POST[$name])){
$this->optional[$name] = get_post($name);
}
index 47c2a42301f7d59faf7ccd6a6e87d756612e9bb4..724bae7157a785a94d655e63680a843efe592522 100644 (file)
--- a/setup/setup_config3.tpl
+++ b/setup/setup_config3.tpl
</div>
</div>
+ <div class='step4_container'>
+ <div class='step4_name'>
+ {t}Remember dialog filter settings{/t}
+ </div>
+ <div class='step4_value'>
+
+ <select name="user_filter_cookie" size="1" title="">
+ {html_options options=$bool selected=$optional.user_filter_cookie}
+ </select>
+ </div>
+ </div>
+
<div class='step4_container'>
<div class='step4_name'>
{t}Session lifetime{/t}