]> git.wh0rd.org Git - tt-rss.git/commitdiff
preferences editor feedback
authorAndrew Dolgov <fox@bah.spb.su>
Sun, 20 Nov 2005 07:15:59 +0000 (08:15 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Sun, 20 Nov 2005 07:15:59 +0000 (08:15 +0100)
backend.php

index fe2245fae592a6e8d78c524e663538d8753a08b3..4320f51330f5c1f4697ff32b109a3c616c952c9a 100644 (file)
 
                        if (WEB_DEMO_MODE) return;
 
+                       $_SESSION["prefs_op_result"] = "save-config";
+
                        foreach (array_keys($_POST) as $pref_name) {
                        
                                $pref_name = db_escape_string($pref_name);
 
                        if (WEB_DEMO_MODE) return;
 
+                       $_SESSION["prefs_op_result"] = "reset-to-defaults";
+
                        if (DB_TYPE == "pgsql") {
                                db_query($link,"UPDATE ttrss_user_prefs 
                                        SET value = ttrss_prefs.def_value 
 
                                $_SESSION["pwd_change_result"] = "";
 
+                               if ($_SESSION["prefs_op_result"] == "reset-to-defaults") {
+                                       print "<div class=\"notice\"> 
+                                                       Your configuration was reset to defaults.
+                                               </div>";
+                               }
+
+                               if ($_SESSION["prefs_op_result"] == "save-config") {
+                                       print "<div class=\"notice\"> 
+                                                       Your configuration was saved successfully.
+                                               </div>";
+                               }
+
+                               $_SESSION["prefs_op_result"] = "";
+
                                print "<form action=\"backend.php\" method=\"POST\">";
        
                                print "<table width=\"100%\" class=\"prefPrefsList\">";