]> git.wh0rd.org Git - tt-rss.git/commitdiff
catchupSelected: pass ids in POST to prevent url size limit problems
authorAndrew Dolgov <fox@bah.org.ru>
Sat, 25 Apr 2009 08:15:26 +0000 (12:15 +0400)
committerAndrew Dolgov <fox@bah.org.ru>
Sat, 25 Apr 2009 08:15:26 +0000 (12:15 +0400)
modules/backend-rpc.php
viewfeed.js

index 8b22bf85080c9eaff9036907aa63494b65413875..3e4a9434051213c28cc058c66890f7a6ca922a56 100644 (file)
                /* GET["cmode"] = 0 - mark as read, 1 - as unread, 2 - toggle */
                if ($subop == "catchupSelected") {
 
-                       $ids = split(",", db_escape_string($_GET["ids"]));
-                       $cmode = sprintf("%d", $_GET["cmode"]);
+                       $ids = split(",", db_escape_string($_REQUEST["ids"]));
+                       $cmode = sprintf("%d", $_REQUEST["cmode"]);
 
                        catchupArticlesById($link, $ids, $cmode);
 
index d21e3e623a11f181262e59da67ed517a2ab9a239..6afc6c317452acfdcd3c42a134a7f158387ca47b 100644 (file)
@@ -896,12 +896,15 @@ function toggleUnread(id, cmode, effect) {
 
                        if (cmode == undefined) cmode = 2;
 
-                       var query = "backend.php?op=rpc&subop=catchupSelected&ids=" +
-                               param_escape(id) + "&cmode=" + param_escape(cmode);
+                       var query = "backend.php?op=rpc&subop=catchupSelected" +
+                               "&cmode=" + param_escape(cmode);
+
+                       var ids = "?ids=" + param_escape(id);
 
 //                     notify_progress("Loading, please wait...");
 
                        new Ajax.Request(query, {
+                               parameters: ids,
                                onComplete: function(transport) { 
                                        all_counters_callback2(transport); 
                                } });
@@ -1049,12 +1052,15 @@ function selectionToggleUnread(cdm_mode, set_state, callback_func, no_error) {
                                cmode = "0";
                        }
 
-                       var query = "backend.php?op=rpc&subop=catchupSelected&ids=" +
-                               param_escape(rows.toString()) + "&cmode=" + cmode;
+                       var query = "backend.php?op=rpc&subop=catchupSelected" +
+                               "&cmode=" + cmode;
+
+                       var ids = "?ids=" + param_escape(rows.toString()); 
 
                        notify_progress("Loading, please wait...");
 
                        new Ajax.Request(query, {
+                               parameters: ids,
                                onComplete: function(transport) { 
                                        catchup_callback2(transport, callback_func); 
                                } });
@@ -1548,10 +1554,13 @@ function cdmWatchdog() {
                                }
                        }
 
-                       var query = "backend.php?op=rpc&subop=catchupSelected&ids=" +
-                               param_escape(ids.toString()) + "&cmode=0";
+                       var query = "backend.php?op=rpc&subop=catchupSelected" +
+                               "&cmode=0";
+
+                       var ids = "?ids=" + param_escape(ids.toString());
 
                        new Ajax.Request(query, {
+                               parameters: ids,
                                onComplete: function(transport) { 
                                        all_counters_callback2(transport); 
                                } });
@@ -1929,10 +1938,13 @@ function catchupRelativeToArticle(below) {
                                        e.className = e.className.replace("Unread", "");
                                }
 
-                               var query = "backend.php?op=rpc&subop=catchupSelected&ids=" +
-                                       param_escape(ids_to_mark.toString()) + "&cmode=0";
+                               var query = "backend.php?op=rpc&subop=catchupSelected" +
+                                       "&cmode=0";
+
+                               var ids = "?ids=" + param_escape(ids_to_mark.toString()); 
 
                                new Ajax.Request(query, {
+                                       parameters: ids,
                                        onComplete: function(transport) { 
                                                catchup_callback2(transport); 
                                        } });