]> git.wh0rd.org Git - tt-rss.git/commitdiff
implement save in feed_cat editor (closes #6)
authorAndrew Dolgov <fox@bah.spb.su>
Sun, 11 Dec 2005 04:55:37 +0000 (05:55 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Sun, 11 Dec 2005 04:55:37 +0000 (05:55 +0100)
backend.php
prefs.js

index 4f4ac12e79a8550709a6caac51be59a5b51b5c11..6d1f4368174c1b09642c2a9e031a0dd0cd8f2ca8 100644 (file)
                                update_interval = '$upd_intl',
                                purge_interval = '$purge_intl'
                                WHERE id = '$feed_id' AND owner_uid = " . $_SESSION["uid"]);                    
+               }
+
+               if ($subop == "saveCat") {
+                       $cat_title = db_escape_string($_GET["title"]);
+                       $cat_id = db_escape_string($_GET["id"]);
+
+                       $result = db_query($link, "UPDATE ttrss_feed_categories SET
+                               title = '$cat_title' WHERE id = '$cat_id' AND owner_uid = ".$_SESSION["uid"]);
 
                }
 
index f6917f681f39a02480cf66d6fcd02fad4a53e072..b0df20aa1631fe3cc59da663307499ff9a0553d5 100644 (file)
--- a/prefs.js
+++ b/prefs.js
@@ -685,6 +685,28 @@ function feedEditSave() {
 
 }
 
+function feedCatEditSave() {
+
+       if (!xmlhttp_ready(xmlhttp)) {
+               printLockingError();
+               return
+       }
+
+       notify("");
+
+       var cat_title = document.getElementById("iedit_title").value;
+
+       xmlhttp.open("GET", "backend.php?op=pref-feeds&subop=saveCat&id=" +
+               param_escape(active_feed_cat) + "&title=" + param_escape(cat_title), 
+               true);
+       xmlhttp.onreadystatechange=feedlist_callback;
+       xmlhttp.send(null);
+
+       active_feed_cat = false;
+
+}
+
+
 function labelTest() {
 
        var sqlexp = document.getElementById("iedit_expr").value;