]> git.wh0rd.org Git - tt-rss.git/commitdiff
fix prefs reset not working properly
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Fri, 5 Apr 2013 03:52:50 +0000 (07:52 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Fri, 5 Apr 2013 03:52:50 +0000 (07:52 +0400)
classes/pref/prefs.php
js/prefs.js

index 730d556a5ddf12ae522cd1cc508400a161f963d1..445d0aadb37c4aef842237bb0c1fd8c091ec9421 100644 (file)
@@ -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() {
index b4ecd25842cda5b6ccaa0cb555f9b1a588d6c5b5..b1decede5aa9feae225e9d826f8530005c96ebd3 100644 (file)
@@ -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);
                                } });
 
                }