From bf8783388413a9f19b5b8ae4b998d10b93bf4617 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 5 Apr 2013 07:52:50 +0400 Subject: [PATCH] fix prefs reset not working properly --- classes/pref/prefs.php | 2 ++ js/prefs.js | 9 ++------- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/classes/pref/prefs.php b/classes/pref/prefs.php index 730d556a..445d0aad 100644 --- a/classes/pref/prefs.php +++ b/classes/pref/prefs.php @@ -180,6 +180,8 @@ class Pref_Prefs extends Handler_Protected { WHERE $profile_qpart AND owner_uid = ".$_SESSION["uid"]); initialize_user_prefs($this->link, $_SESSION["uid"], $_SESSION["profile"]); + + echo __("Your preferences are now set to default values."); } function index() { diff --git a/js/prefs.js b/js/prefs.js index b4ecd258..b1decede 100644 --- a/js/prefs.js +++ b/js/prefs.js @@ -975,13 +975,8 @@ function validatePrefsReset() { new Ajax.Request("backend.php", { parameters: query, onComplete: function(transport) { - var msg = transport.responseText; - if (msg.match("PREFS_THEME_CHANGED")) { - window.location.reload(); - } else { - notify_info(msg); - selectTab(); - } + updatePrefsList(); + notify_info(transport.responseText); } }); } -- 2.39.5