diff --git a/addressbook/index.php b/addressbook/index.php index fa3bf9a98d..652c642201 100755 --- a/addressbook/index.php +++ b/addressbook/index.php @@ -43,6 +43,12 @@ if ($cat_id=='') { $cat_id = $phpgw_info["user"]["preferences"]["addressbook"]["default_category"]; + } + + if ($phpgw_info["user"]["preferences"]["addressbook"]["autosave_category"]) { + $phpgw->preferences->delete("addressbook","default_category"); + $phpgw->preferences->add("addressbook","default_category",$cat_id); + $phpgw->preferences->save_repository(); } $extrafields = array( diff --git a/addressbook/preferences.php b/addressbook/preferences.php index 209c92a7d8..1d855bebd3 100644 --- a/addressbook/preferences.php +++ b/addressbook/preferences.php @@ -64,6 +64,13 @@ $phpgw->preferences->delete("addressbook","mainscreen_showbirthdays"); } + if ($autosave_category) { + $phpgw->preferences->delete("addressbook","autosave_category"); + $phpgw->preferences->add("addressbook","autosave_category",True); + } else { + $phpgw->preferences->delete("addressbook","autosave_category"); + } + if ($cat_id) { $phpgw->preferences->delete("addressbook","default_category"); $phpgw->preferences->add("addressbook","default_category",$cat_id); @@ -131,7 +138,12 @@ ?>