]> git.wh0rd.org Git - tt-rss.git/commitdiff
subop -> method
authorAndrew Dolgov <fox@fakecake.org>
Mon, 12 Dec 2011 18:46:25 +0000 (22:46 +0400)
committerAndrew Dolgov <fox@fakecake.org>
Mon, 12 Dec 2011 18:46:25 +0000 (22:46 +0400)
19 files changed:
backend.php
include/db.php
include/functions.php
js/PrefFeedTree.js
js/digest.js
js/feedlist.js
js/functions.js
js/prefs.js
js/tt-rss.js
js/viewfeed.js
modules/backend-rpc.php
modules/popup-dialog.php
modules/pref-feeds.php
modules/pref-filters.php
modules/pref-instances.php
modules/pref-labels.php
modules/pref-prefs.php
modules/pref-users.php
public.php

index 247cab38b9df45451e9e8e6a35c4eff31800617c..0e485de7099582941f1609f416a71e4418173dc7 100644 (file)
@@ -43,7 +43,7 @@
 
        init_connection($link);
 
-       $subop = $_REQUEST["subop"];
+       $method = $_REQUEST["method"];
        $mode = $_REQUEST["mode"];
 
        if ((!$op || $op == "rss" || $op == "dlg") && !$_REQUEST["noxml"]) {
@@ -69,7 +69,7 @@
                return;
 
        } else if (!($_SESSION["uid"] && validate_session($link))) {
-               if ($op == 'pref-feeds' && $_REQUEST['subop'] == 'add') {
+               if ($op == 'pref-feeds' && $_REQUEST['method'] == 'add') {
                        header("Content-Type: text/html");
                        login_sequence($link);
                        render_login_form($link);
                break; // rpc
 
                case "feeds":
-                       $subop = $_REQUEST["subop"];
+                       $method = $_REQUEST["method"];
                        $root = (bool)$_REQUEST["root"];
 
-                       switch($subop) {
+                       switch($method) {
                                case "catchupAll":
                                        db_query($link, "UPDATE ttrss_user_entries SET
                                                last_read = NOW(),unread = false WHERE owner_uid = " . $_SESSION["uid"]);
                        $omode = db_escape_string($_REQUEST["omode"]);
 
                        $feed = db_escape_string($_REQUEST["feed"]);
-                       $subop = db_escape_string($_REQUEST["subop"]);
+                       $method = db_escape_string($_REQUEST["method"]);
                        $view_mode = db_escape_string($_REQUEST["view_mode"]);
                        $limit = (int) get_pref($link, "DEFAULT_ARTICLE_LIMIT");
                        @$cat_view = db_escape_string($_REQUEST["cat"]) == "true";
 
                        if ($_REQUEST["debug"]) $timing_info = print_checkpoint("04", $timing_info);
 
-                       $ret = format_headlines_list($link, $feed, $subop,
+                       $ret = format_headlines_list($link, $feed, $method,
                                $view_mode, $limit, $cat_view, $next_unread_feed, $offset,
                                $vgroup_last_feed, $override_order);
 
                                $reply['articles'] = $articles;
                        }
 
-//                     if ($subop) {
+//                     if ($method) {
 //                             $reply['counters'] = getAllCounters($link, $omode, $feed);
 //                     }
 
index 0682b58f829fa09dbd43ed14720cc1606f1bba0d..7a858ca70596549820f19eda763a23b3bc0a94f3 100644 (file)
@@ -53,7 +53,7 @@ function db_escape_string($s, $strip_tags = true) {
 
 function db_query($link, $query, $die_on_error = true) {
        //if ($_REQUEST["qlog"])
-       //      error_log($_SESSION["uid"] . ":" . $_REQUEST["op"] . "/" . $_REQUEST["subop"] .
+       //      error_log($_SESSION["uid"] . ":" . $_REQUEST["op"] . "/" . $_REQUEST["method"] .
        //              " $query\n", 3, "/tmp/ttrss-query.log");
 
        if (DB_TYPE == "pgsql") {
index 8f46c295c2bf75d528f78f54ad76305002d74640..28be5cbe5de637c2bc58f08c361082e11d595e8d 100644 (file)
 
        }
 
-       function format_headlines_list($link, $feed, $subop, $view_mode, $limit, $cat_view,
+       function format_headlines_list($link, $feed, $method, $view_mode, $limit, $cat_view,
                                        $next_unread_feed, $offset, $vgr_last_feed = false,
                                        $override_order = false) {
 
                $topmost_article_ids = array();
 
                if (!$offset) $offset = 0;
-               if ($subop == "undefined") $subop = "";
+               if ($method == "undefined") $method = "";
 
-               $subop_split = explode(":", $subop);
+               $method_split = explode(":", $method);
 
-/*             if ($subop == "CatchupSelected") {
+/*             if ($method == "CatchupSelected") {
                        $ids = explode(",", db_escape_string($_REQUEST["ids"]));
                        $cmode = sprintf("%d", $_REQUEST["cmode"]);
 
                        catchupArticlesById($link, $ids, $cmode);
                } */
 
-               if ($subop == "ForceUpdate" && $feed && is_numeric($feed) > 0) {
+               if ($method == "ForceUpdate" && $feed && is_numeric($feed) > 0) {
                        update_rss_feed($link, $feed, true);
                }
 
-               if ($subop == "MarkAllRead")  {
+               if ($method == "MarkAllRead")  {
                        catchup_feed($link, $feed, $cat_view);
 
                        if (get_pref($link, 'ON_CATCHUP_SHOW_NEXT_FEED')) {
                        }
                }
 
-               if ($subop_split[0] == "MarkAllReadGR")  {
-                       catchup_feed($link, $subop_split[1], false);
+               if ($method_split[0] == "MarkAllReadGR")  {
+                       catchup_feed($link, $method_split[1], false);
                }
 
                // FIXME: might break tag display?
 
                if ($_REQUEST["debug"]) $timing_info = print_checkpoint("H0", $timing_info);
 
-//             error_log("format_headlines_list: [" . $feed . "] subop [" . $subop . "]");
-               if( $search_mode == '' && $subop != '' ){
-                   $search_mode = $subop;
+//             error_log("format_headlines_list: [" . $feed . "] method [" . $method . "]");
+               if( $search_mode == '' && $method != '' ){
+                   $search_mode = $method;
                }
 //             error_log("search_mode: " . $search_mode);
                $qfh_ret = queryFeedHeadlines($link, $feed, $limit, $view_mode, $cat_view,
                //$url_path = ($_SERVER['HTTPS'] != "on" ? 'http://' :  'https://') . $_SERVER["HTTP_HOST"] . parse_url($_SERVER["REQUEST_URI"], PHP_URL_PATH);
 
                $url_path = get_self_url_prefix() .
-                       "/backend.php?op=pref-feeds&quiet=1&subop=add&feed_url=%s";
+                       "/backend.php?op=pref-feeds&quiet=1&method=add&feed_url=%s";
                return $url_path;
        } // function add_feed_url
 
index 4ea486609990e88e479cce787c90fbf904c6332c..9e2ee0662498abecc70b4bf3a66b42cdda5736e8 100644 (file)
@@ -11,7 +11,7 @@ dojo.declare("fox.PrefFeedStore", dojo.data.ItemFileWriteStore, {
 
                dojo.xhrPost({
                        url: "backend.php",
-                       content: {op: "pref-feeds", subop: "savefeedorder",
+                       content: {op: "pref-feeds", method: "savefeedorder",
                                payload: newFileContentString},
                        error: saveFailedCallback,
                        load: saveCompleteCallback});
index 7dba6d36ee0b60cbc9dc7de45f4abbd0cec08c3a..c1cbf8762fb17624c1beed83ec02b754fa6bc23f 100644 (file)
@@ -26,7 +26,7 @@ function catchup_feed(feed_id, callback) {
 
                        if (feed_id < 0) is_cat = "true"; // KLUDGE
 
-                       var query = "?op=rpc&subop=catchupFeed&feed_id=" +
+                       var query = "?op=rpc&method=catchupFeed&feed_id=" +
                                feed_id + "&is_cat=" + is_cat;
 
                        new Ajax.Request("backend.php", {
@@ -68,7 +68,7 @@ function catchup_visible_articles(callback) {
 
                if (confirm(__("Mark %d displayed articles as read?").replace("%d", ids.length))) {
 
-                       var query = "?op=rpc&subop=catchupSelected" +
+                       var query = "?op=rpc&method=catchupSelected" +
                                "&cmode=0&ids=" + param_escape(ids);
 
                        new Ajax.Request("backend.php", {
@@ -88,7 +88,7 @@ function catchup_visible_articles(callback) {
 
 function catchup_article(article_id, callback) {
        try {
-               var query = "?op=rpc&subop=catchupSelected" +
+               var query = "?op=rpc&method=catchupSelected" +
                        "&cmode=0&ids=" + article_id;
 
                new Ajax.Request("backend.php", {
@@ -169,7 +169,7 @@ function update(callback) {
                window.clearTimeout(_update_timeout);
 
                new Ajax.Request("backend.php", {
-                       parameters: "?op=rpc&subop=digest-init",
+                       parameters: "?op=rpc&method=digest-init",
                        onComplete: function(transport) {
                                fatal_error_check(transport);
                                parse_feeds(transport);
@@ -220,7 +220,7 @@ function view(article_id) {
                        }, 500);
 
                new Ajax.Request("backend.php", {
-                       parameters: "?op=rpc&subop=digest-get-contents&article_id=" +
+                       parameters: "?op=rpc&method=digest-get-contents&article_id=" +
                                article_id,
                        onComplete: function(transport) {
                                fatal_error_check(transport);
@@ -315,7 +315,7 @@ function viewfeed(feed_id, offset, replace, no_effects, no_indicator, callback)
 
                if (!offset) $("headlines").scrollTop = 0;
 
-               var query = "backend.php?op=rpc&subop=digest-update&feed_id=" +
+               var query = "backend.php?op=rpc&method=digest-update&feed_id=" +
                                param_escape(feed_id) + "&offset=" + offset +
                                "&seq=" + _update_seq;
 
@@ -648,7 +648,7 @@ function parse_headlines(transport, replace, no_effects) {
 function init_second_stage() {
        try {
                new Ajax.Request("backend.php", {
-                       parameters: "backend.php?op=rpc&subop=digest-init",
+                       parameters: "backend.php?op=rpc&method=digest-init",
                        onComplete: function(transport) {
                                parse_feeds(transport);
                                Element.hide("overlay");
@@ -667,7 +667,7 @@ function init() {
                dojo.require("dijit.Dialog");
 
                new Ajax.Request("backend.php", {
-                       parameters: "?op=rpc&subop=sanityCheck",
+                       parameters: "?op=rpc&method=sanityCheck",
                        onComplete: function(transport) {
                                backend_sanity_check_callback(transport);
                        } });
@@ -681,7 +681,7 @@ function toggle_mark(img, id) {
 
        try {
 
-               var query = "?op=rpc&id=" + id + "&subop=mark";
+               var query = "?op=rpc&id=" + id + "&method=mark";
 
                if (!img) return;
 
@@ -710,7 +710,7 @@ function toggle_pub(img, id, note) {
 
        try {
 
-               var query = "?op=rpc&id=" + id + "&subop=publ";
+               var query = "?op=rpc&id=" + id + "&method=publ";
 
                if (note != undefined) {
                        query = query + "&note=" + param_escape(note);
@@ -798,7 +798,7 @@ function update_title(unread) {
 function tweet_article(id) {
        try {
 
-               var query = "?op=rpc&subop=getTweetInfo&id=" + param_escape(id);
+               var query = "?op=rpc&method=getTweetInfo&id=" + param_escape(id);
 
                console.log(query);
 
index eaaeaad812b5ab004e0f411473d5d8de4085cf97..ff4c948d4318787a37f12f841c4ca8a467ac0bf2 100644 (file)
@@ -48,14 +48,14 @@ function loadMoreHeadlines() {
 }
 
 
-function viewfeed(feed, subop, is_cat, offset, background, infscroll_req) {
+function viewfeed(feed, method, is_cat, offset, background, infscroll_req) {
        try {
                if (is_cat == undefined)
                        is_cat = false;
                else
                        is_cat = !!is_cat;
 
-               if (subop == undefined) subop = '';
+               if (method == undefined) method = '';
                if (offset == undefined) offset = 0;
                if (background == undefined) background = false;
                if (infscroll_req == undefined) infscroll_req = false;
@@ -110,7 +110,7 @@ function viewfeed(feed, subop, is_cat, offset, background, infscroll_req) {
                                _infscroll_disable = 0;
                        }
 
-                       if (!offset && !subop && cached_headlines && !background) {
+                       if (!offset && !method && cached_headlines && !background) {
                                try {
                                        render_local_headlines(feed, is_cat, JSON.parse(cached_headlines));
                                        return;
@@ -119,7 +119,7 @@ function viewfeed(feed, subop, is_cat, offset, background, infscroll_req) {
                                }
                        }
 
-                       if (offset != 0 && !subop) {
+                       if (offset != 0 && !method) {
                                var date = new Date();
                                var timestamp = Math.round(date.getTime() / 1000);
 
@@ -139,7 +139,7 @@ function viewfeed(feed, subop, is_cat, offset, background, infscroll_req) {
                var toolbar_query = Form.serialize("main_toolbar_form");
 
                var query = "?op=viewfeed&feed=" + feed + "&" +
-                       toolbar_query + "&subop=" + param_escape(subop);
+                       toolbar_query + "&method=" + param_escape(method);
 
                if (!background) {
                        if (_search_query) {
@@ -148,7 +148,7 @@ function viewfeed(feed, subop, is_cat, offset, background, infscroll_req) {
                                _search_query = false;
                        }
 
-                       if (subop == "MarkAllRead") {
+                       if (method == "MarkAllRead") {
 
                                var show_next_feed = getInitParam("on_catchup_show_next_feed") == "1";
 
@@ -162,7 +162,7 @@ function viewfeed(feed, subop, is_cat, offset, background, infscroll_req) {
 
                                                        render_local_headlines(nuf, false, JSON.parse(cached_nuf));
 
-                                                       var catchup_query = "?op=rpc&subop=catchupFeed&feed_id=" +
+                                                       var catchup_query = "?op=rpc&method=catchupFeed&feed_id=" +
                                                                feed + "&is_cat=" + is_cat;
 
                                                        console.log(catchup_query);
@@ -246,7 +246,7 @@ function request_counters_real() {
        try {
                console.log("requesting counters...");
 
-               var query = "?op=rpc&subop=getAllCounters&seq=" + next_seq();
+               var query = "?op=rpc&method=getAllCounters&seq=" + next_seq();
 
                query = query + "&omode=flc";
 
@@ -487,7 +487,7 @@ function catchupFeed(feed, is_cat) {
                        return;
                }
 
-               var catchup_query = "?op=rpc&subop=catchupFeed&feed_id=" +
+               var catchup_query = "?op=rpc&method=catchupFeed&feed_id=" +
                        feed + "&is_cat=" + is_cat;
 
                notify_progress("Loading, please wait...", true);
index 02fbadf5398111065b306af044b987dff156da50..e62d576b66cff2db6042cf95f076850d4054d247 100644 (file)
@@ -607,7 +607,7 @@ function filterDlgCheckDate() {
 
                var reg_exp = dialog.attr('value').reg_exp;
 
-               var query = "?op=rpc&subop=checkDate&date=" + reg_exp;
+               var query = "?op=rpc&method=checkDate&date=" + reg_exp;
 
                new Ajax.Request("backend.php", {
                        parameters: query,
@@ -756,7 +756,7 @@ function removeFeedIcon(id) {
        try {
 
                if (confirm(__("Remove stored feed icon?"))) {
-                       var query = "backend.php?op=pref-feeds&subop=removeicon&feed_id=" + param_escape(id);
+                       var query = "backend.php?op=pref-feeds&method=removeicon&feed_id=" + param_escape(id);
 
                        console.log(query);
 
@@ -815,7 +815,7 @@ function addLabel(select, callback) {
                                return false;
                        }
 
-                       var query = "?op=pref-labels&subop=add&caption=" +
+                       var query = "?op=pref-labels&method=add&caption=" +
                                param_escape(caption);
 
                        if (select)
@@ -893,7 +893,7 @@ function quickAddFeed() {
                                                                        notify_progress("Searching for feed urls...", true);
 
                                                                        new Ajax.Request("backend.php", {
-                                                                               parameters: 'op=rpc&subop=extractfeedurls&url=' + param_escape(feed_url),
+                                                                               parameters: 'op=rpc&method=extractfeedurls&url=' + param_escape(feed_url),
                                                                                onComplete: function(transport, dialog, feed_url) {
 
                                                                                        notify('');
@@ -978,7 +978,7 @@ function quickAddFilter() {
                        execute: function() {
                                if (this.validate()) {
 
-                                       var query = "?op=rpc&subop=verifyRegexp&reg_exp=" +
+                                       var query = "?op=rpc&method=verifyRegexp&reg_exp=" +
                                                param_escape(dialog.attr('value').reg_exp);
 
                                        notify_progress("Verifying regular expression...");
@@ -1028,7 +1028,7 @@ function resetPubSub(feed_id, title) {
        if (title == undefined || confirm(msg)) {
                notify_progress("Loading, please wait...");
 
-               var query = "?op=pref-feeds&quiet=1&subop=resetPubSub&ids=" + feed_id;
+               var query = "?op=pref-feeds&quiet=1&method=resetPubSub&ids=" + feed_id;
 
                new Ajax.Request("backend.php", {
                        parameters: query,
@@ -1049,7 +1049,7 @@ function unsubscribeFeed(feed_id, title) {
        if (title == undefined || confirm(msg)) {
                notify_progress("Removing feed...");
 
-               var query = "?op=pref-feeds&quiet=1&subop=remove&ids=" + feed_id;
+               var query = "?op=pref-feeds&quiet=1&method=remove&ids=" + feed_id;
 
                new Ajax.Request("backend.php", {
                        parameters: query,
@@ -1155,7 +1155,7 @@ function quickAddCat(elem) {
 
                if (cat) {
 
-                       var query = "?op=rpc&subop=quickAddCat&cat=" + param_escape(cat);
+                       var query = "?op=rpc&method=quickAddCat&cat=" + param_escape(cat);
 
                        notify_progress("Loading, please wait...", true);
 
@@ -1188,7 +1188,7 @@ function genUrlChangeKey(feed, is_cat) {
 
                        notify_progress("Trying to change address...", true);
 
-                       var query = "?op=rpc&subop=regenFeedKey&id=" + param_escape(feed) +
+                       var query = "?op=rpc&method=regenFeedKey&id=" + param_escape(feed) +
                                "&is_cat=" + param_escape(is_cat);
 
                        new Ajax.Request("backend.php", {
@@ -1368,7 +1368,7 @@ function editFeed(feed, event) {
                if (feed <= 0)
                        return alert(__("You can't edit this kind of feed."));
 
-               var query = "backend.php?op=pref-feeds&subop=editfeed&id=" +
+               var query = "backend.php?op=pref-feeds&method=editfeed&id=" +
                        param_escape(feed);
 
                console.log(query);
@@ -1464,7 +1464,7 @@ function feedBrowser() {
                                        // we use dojo.toJson instead of JSON.stringify because
                                        // it somehow escapes everything TWICE, at least in Chrome 9
 
-                                       var query = "?op=rpc&subop=massSubscribe&payload="+
+                                       var query = "?op=rpc&method=massSubscribe&payload="+
                                                param_escape(dojo.toJson(selected)) + "&mode=" + param_escape(mode);
 
                                        console.log(query);
@@ -1524,7 +1524,7 @@ function feedBrowser() {
                                        if (confirm(pr)) {
                                                Element.show('feed_browser_spinner');
 
-                                               var query = "?op=rpc&subop=remarchived&ids=" +
+                                               var query = "?op=rpc&method=remarchived&ids=" +
                                                        param_escape(selected.toString());;
 
                                                new Ajax.Request("backend.php", {
@@ -1574,7 +1574,7 @@ function showFeedsWithErrors() {
                                        if (ok) {
                                                notify_progress("Removing selected feeds...", true);
 
-                                               var query = "?op=pref-feeds&subop=remove&ids="+
+                                               var query = "?op=pref-feeds&method=remove&ids="+
                                                        param_escape(sel_rows.toString());
 
                                                new Ajax.Request("backend.php", {
index e40d6d7234a9e3cc255b0df5280c2bf71aa25f63..760441a3d81e575ef2697dd5b1e99eab5148bdd8 100644 (file)
@@ -124,7 +124,7 @@ function addUser() {
 
                notify_progress("Adding user...");
 
-               var query = "?op=pref-users&subop=add&login=" +
+               var query = "?op=pref-users&method=add&login=" +
                        param_escape(login);
 
                new Ajax.Request("backend.php", {
@@ -148,7 +148,7 @@ function editUser(id, event) {
                selectTableRows('prefUserList', 'none');
                selectTableRowById('UMRR-'+id, 'UMCHK-'+id, true);
 
-               var query = "?op=pref-users&subop=edit&id=" +
+               var query = "?op=pref-users&method=edit&id=" +
                        param_escape(id);
 
                new Ajax.Request("backend.php", {
@@ -173,7 +173,7 @@ function editUser(id, event) {
 function editFilter(id) {
        try {
 
-               var query = "backend.php?op=pref-filters&subop=edit&id=" + param_escape(id);
+               var query = "backend.php?op=pref-filters&method=edit&id=" + param_escape(id);
 
                if (dijit.byId("filterEditDlg"))
                        dijit.byId("filterEditDlg").destroyRecursive();
@@ -193,7 +193,7 @@ function editFilter(id) {
 
                                        var id = this.attr('value').id;
 
-                                       var query = "?op=pref-filters&subop=remove&ids="+
+                                       var query = "?op=pref-filters&method=remove&ids="+
                                                param_escape(id);
 
                                        new Ajax.Request("backend.php", {
@@ -224,7 +224,7 @@ function editFilter(id) {
                        execute: function() {
                                if (this.validate()) {
 
-                                       var query = "?op=rpc&subop=verifyRegexp&reg_exp=" +
+                                       var query = "?op=rpc&method=verifyRegexp&reg_exp=" +
                                                param_escape(dialog.attr('value').reg_exp);
 
                                        notify_progress("Verifying regular expression...");
@@ -323,7 +323,7 @@ function removeSelectedLabels() {
                if (ok) {
                        notify_progress("Removing selected labels...");
 
-                       var query = "?op=pref-labels&subop=remove&ids="+
+                       var query = "?op=pref-labels&method=remove&ids="+
                                param_escape(sel_rows.toString());
 
                        new Ajax.Request("backend.php", {
@@ -353,7 +353,7 @@ function removeSelectedUsers() {
                        if (ok) {
                                notify_progress("Removing selected users...");
 
-                               var query = "?op=pref-users&subop=remove&ids="+
+                               var query = "?op=pref-users&method=remove&ids="+
                                        param_escape(sel_rows.toString());
 
                                new Ajax.Request("backend.php", {
@@ -388,7 +388,7 @@ function removeSelectedFilters() {
                        if (ok) {
                                notify_progress("Removing selected filters...");
 
-                               var query = "?op=pref-filters&subop=remove&ids="+
+                               var query = "?op=pref-filters&method=remove&ids="+
                                        param_escape(sel_rows.toString());
 
                                new Ajax.Request("backend.php", {
@@ -423,7 +423,7 @@ function removeSelectedFeeds() {
 
                                notify_progress("Unsubscribing from selected feeds...", true);
 
-                               var query = "?op=pref-feeds&subop=remove&ids="+
+                               var query = "?op=pref-feeds&method=remove&ids="+
                                        param_escape(sel_rows.toString());
 
                                console.log(query);
@@ -484,7 +484,7 @@ function purgeSelectedFeeds() {
                if (pr != undefined) {
                        notify_progress("Purging selected feed...");
 
-                       var query = "?op=rpc&subop=purge&ids="+
+                       var query = "?op=rpc&method=purge&ids="+
                                param_escape(sel_rows.toString()) + "&days=" + pr;
 
                        console.log(query);
@@ -583,7 +583,7 @@ function resetSelectedUserPass() {
 
                        var id = rows[0];
 
-                       var query = "?op=pref-users&subop=resetPass&id=" +
+                       var query = "?op=pref-users&method=resetPass&id=" +
                                param_escape(id);
 
                        new Ajax.Request("backend.php", {
@@ -619,7 +619,7 @@ function selectedUserDetails() {
 
                var id = rows[0];
 
-               var query = "?op=pref-users&subop=user-details&id=" + id;
+               var query = "?op=pref-users&method=user-details&id=" + id;
 
                new Ajax.Request("backend.php", {
                        parameters: query,
@@ -682,7 +682,7 @@ function editSelectedFeeds() {
 
                notify_progress("Loading, please wait...");
 
-               var query = "backend.php?op=pref-feeds&subop=editfeeds&ids=" +
+               var query = "backend.php?op=pref-feeds&method=editfeeds&ids=" +
                        param_escape(rows.toString());
 
                console.log(query);
@@ -863,7 +863,7 @@ function updatePrefsList() {
                } });
 }
 
-function selectTab(id, noupdate, subop) {
+function selectTab(id, noupdate, method) {
        try {
                if (!noupdate) {
                        notify_progress("Loading, please wait...");
@@ -905,10 +905,10 @@ function init_second_stage() {
                                if (tab) dijit.byId("pref-tabs").selectChild(tab);
                        }
 
-                       var subop = getURLParam('subop');
+                       var method = getURLParam('method');
 
-                       if (subop == 'editFeed') {
-                               var param = getURLParam('subopparam');
+                       if (method == 'editFeed') {
+                               var param = getURLParam('methodparam');
 
                                window.setTimeout('editFeed(' + param + ')', 100);
                        }
@@ -938,7 +938,7 @@ function init() {
                        loading_set_progress(50);
 
                        new Ajax.Request("backend.php", {
-                               parameters: {op: "rpc", subop: "sanityCheck"},
+                               parameters: {op: "rpc", method: "sanityCheck"},
                                        onComplete: function(transport) {
                                        backend_sanity_check_callback(transport);
                                } });
@@ -955,7 +955,7 @@ function validatePrefsReset() {
 
                if (ok) {
 
-                       query = "?op=pref-prefs&subop=reset-config";
+                       query = "?op=pref-prefs&method=reset-config";
                        console.log(query);
 
                        new Ajax.Request("backend.php", {
@@ -1160,7 +1160,7 @@ function pref_hotkey_handler(e) {
 
 function editFeedCats() {
        try {
-               var query = "backend.php?op=pref-feeds&subop=editCats";
+               var query = "backend.php?op=pref-feeds&method=editCats";
 
                if (dijit.byId("feedCatEditDlg"))
                        dijit.byId("feedCatEditDlg").destroyRecursive();
@@ -1181,7 +1181,7 @@ function editFeedCats() {
                                        if (ok) {
                                                notify_progress("Removing selected categories...", true);
 
-                                               var query = "?op=pref-feeds&subop=editCats&action=remove&ids="+
+                                               var query = "?op=pref-feeds&method=editCats&action=remove&ids="+
                                                        param_escape(sel_rows.toString());
 
                                                new Ajax.Request("backend.php", {
@@ -1202,7 +1202,7 @@ function editFeedCats() {
                                if (this.validate()) {
                                        notify_progress("Creating category...");
 
-                                       var query = "?op=pref-feeds&subop=editCats&action=add&cat=" +
+                                       var query = "?op=pref-feeds&method=editCats&action=add&cat=" +
                                                param_escape(this.attr('value').newcat);
 
                                        new Ajax.Request("backend.php", {
@@ -1252,7 +1252,7 @@ function showInactiveFeeds() {
                                        if (ok) {
                                                notify_progress("Removing selected feeds...", true);
 
-                                               var query = "?op=pref-feeds&subop=remove&ids="+
+                                               var query = "?op=pref-feeds&method=remove&ids="+
                                                        param_escape(sel_rows.toString());
 
                                                new Ajax.Request("backend.php", {
@@ -1291,7 +1291,7 @@ function opmlRegenKey() {
 
                        notify_progress("Trying to change address...", true);
 
-                       var query = "?op=rpc&subop=regenOPMLKey";
+                       var query = "?op=rpc&method=regenOPMLKey";
 
                        new Ajax.Request("backend.php", {
                                parameters: query,
@@ -1376,7 +1376,7 @@ function clearFeedArticles(feed_id) {
 
        notify_progress("Clearing feed...");
 
-       var query = "?op=pref-feeds&quiet=1&subop=clear&id=" + feed_id;
+       var query = "?op=pref-feeds&quiet=1&method=clear&id=" + feed_id;
 
        new Ajax.Request("backend.php", {
                parameters: query,
@@ -1399,7 +1399,7 @@ function rescoreSelectedFeeds() {
                if (ok) {
                        notify_progress("Rescoring selected feeds...", true);
 
-                       var query = "?op=pref-feeds&subop=rescore&quiet=1&ids="+
+                       var query = "?op=pref-feeds&method=rescore&quiet=1&ids="+
                                param_escape(sel_rows.toString());
 
                        new Ajax.Request("backend.php", {
@@ -1422,7 +1422,7 @@ function rescore_all_feeds() {
        if (ok) {
                notify_progress("Rescoring feeds...", true);
 
-               var query = "?op=pref-feeds&subop=rescoreAll&quiet=1";
+               var query = "?op=pref-feeds&method=rescoreAll&quiet=1";
 
                new Ajax.Request("backend.php", {
                        parameters: query,
@@ -1440,7 +1440,7 @@ function labelColorReset() {
                        var ok = confirm(__("Reset selected labels to default colors?"));
 
                        if (ok) {
-                               var query = "?op=pref-labels&subop=color-reset&ids="+
+                               var query = "?op=pref-labels&method=color-reset&ids="+
                                        param_escape(labels.toString());
 
                                new Ajax.Request("backend.php", {
@@ -1488,7 +1488,7 @@ function editProfiles() {
                                        if (ok) {
                                                notify_progress("Removing selected profiles...", true);
 
-                                               var query = "?op=rpc&subop=remprofiles&ids="+
+                                               var query = "?op=rpc&method=remprofiles&ids="+
                                                        param_escape(sel_rows.toString());
 
                                                new Ajax.Request("backend.php", {
@@ -1514,7 +1514,7 @@ function editProfiles() {
                                        if (ok) {
                                                notify_progress("Loading, please wait...");
 
-                                               var query = "?op=rpc&subop=setprofile&id="+
+                                               var query = "?op=rpc&method=setprofile&id="+
                                                        param_escape(sel_rows.toString());
 
                                                new Ajax.Request("backend.php", {
@@ -1532,7 +1532,7 @@ function editProfiles() {
                                if (this.validate()) {
                                        notify_progress("Creating profile...", true);
 
-                                       var query = "?op=rpc&subop=addprofile&title=" +
+                                       var query = "?op=rpc&method=addprofile&title=" +
                                                param_escape(dialog.attr('value').newprofile);
 
                                        new Ajax.Request("backend.php", {
@@ -1567,7 +1567,7 @@ function activatePrefProfile() {
                if (ok) {
                        notify_progress("Loading, please wait...");
 
-                       var query = "?op=rpc&subop=setprofile&id="+
+                       var query = "?op=rpc&method=setprofile&id="+
                                param_escape(sel_rows.toString());
 
                        new Ajax.Request("backend.php", {
@@ -1591,7 +1591,7 @@ function clearFeedAccessKeys() {
        if (ok) {
                notify_progress("Clearing URLs...");
 
-               var query = "?op=rpc&subop=clearKeys";
+               var query = "?op=rpc&method=clearKeys";
 
                new Ajax.Request("backend.php", {
                        parameters: query,
@@ -1610,7 +1610,7 @@ function clearArticleAccessKeys() {
        if (ok) {
                notify_progress("Clearing URLs...");
 
-               var query = "?op=rpc&subop=clearArticleKeys";
+               var query = "?op=rpc&method=clearArticleKeys";
 
                new Ajax.Request("backend.php", {
                        parameters: query,
@@ -1626,7 +1626,7 @@ function resetFeedOrder() {
                notify_progress("Loading, please wait...");
 
                new Ajax.Request("backend.php", {
-                       parameters: "?op=pref-feeds&subop=feedsortreset",
+                       parameters: "?op=pref-feeds&method=feedsortreset",
                        onComplete: function(transport) {
                                updateFeedList();
                        } });
@@ -1642,7 +1642,7 @@ function resetCatOrder() {
                notify_progress("Loading, please wait...");
 
                new Ajax.Request("backend.php", {
-                       parameters: "?op=pref-feeds&subop=catsortreset",
+                       parameters: "?op=pref-feeds&method=catsortreset",
                        onComplete: function(transport) {
                                updateFeedList();
                        } });
@@ -1664,7 +1664,7 @@ function editCat(id, item, event) {
                        new Ajax.Request("backend.php", {
                        parameters: {
                                op: 'pref-feeds',
-                               subop: 'renamecat',
+                               method: 'renamecat',
                                id: id,
                                title: new_name,
                        },
@@ -1680,7 +1680,7 @@ function editCat(id, item, event) {
 
 function editLabel(id, event) {
        try {
-               var query = "backend.php?op=pref-labels&subop=edit&id=" +
+               var query = "backend.php?op=pref-labels&method=edit&id=" +
                        param_escape(id);
 
                if (dijit.byId("labelEditDlg"))
@@ -1705,7 +1705,7 @@ function editLabel(id, event) {
                                        color = bg;
                                }
 
-                               var query = "?op=pref-labels&subop=color-set&kind="+kind+
+                               var query = "?op=pref-labels&method=color-set&kind="+kind+
                                        "&ids=" + param_escape(id) + "&fg=" + param_escape(fg) +
                                        "&bg=" + param_escape(bg) + "&color=" + param_escape(color);
 
@@ -1756,7 +1756,7 @@ function clearTwitterCredentials() {
                if (ok) {
                        notify_progress("Clearing credentials...");
 
-                       var query = "?op=pref-feeds&subop=remtwitterinfo";
+                       var query = "?op=pref-feeds&method=remtwitterinfo";
 
                        new Ajax.Request("backend.php", {
                                parameters: query,
@@ -1826,7 +1826,7 @@ function addInstance() {
                        style: "width: 600px",
                        regenKey: function() {
                                new Ajax.Request("backend.php", {
-                                       parameters: "?op=rpc&subop=genHash",
+                                       parameters: "?op=rpc&method=genHash",
                                        onComplete: function(transport) {
                                                var reply = JSON.parse(transport.responseText);
                                                if (reply)
@@ -1865,7 +1865,7 @@ function editInstance(id, event) {
                selectTableRows('prefInstanceList', 'none');
                selectTableRowById('LIRR-'+id, 'LICHK-'+id, true);
 
-               var query = "backend.php?op=pref-instances&subop=edit&id=" +
+               var query = "backend.php?op=pref-instances&method=edit&id=" +
                        param_escape(id);
 
                if (dijit.byId("instanceEditDlg"))
@@ -1877,7 +1877,7 @@ function editInstance(id, event) {
                        style: "width: 600px",
                        regenKey: function() {
                                new Ajax.Request("backend.php", {
-                                       parameters: "?op=rpc&subop=genHash",
+                                       parameters: "?op=rpc&method=genHash",
                                        onComplete: function(transport) {
                                                var reply = JSON.parse(transport.responseText);
                                                if (reply)
@@ -1927,7 +1927,7 @@ function removeSelectedInstances() {
                        if (ok) {
                                notify_progress("Removing selected instances...");
 
-                               var query = "?op=pref-instances&subop=remove&ids="+
+                               var query = "?op=pref-instances&method=remove&ids="+
                                        param_escape(sel_rows.toString());
 
                                new Ajax.Request("backend.php", {
index 589091959c1a94252cdedb9a3b95b7127d7cf516..96147b3d3a8baacdd87eab73ac8d8df35ed13677 100644 (file)
@@ -82,7 +82,7 @@ function updateFeedList() {
                        var cat_id = id.substr(id.indexOf(":")+1);
 
                        new Ajax.Request("backend.php",
-                               { parameters: "backend.php?op=feeds&subop=collapse&cid=" +
+                               { parameters: "backend.php?op=feeds&method=collapse&cid=" +
                                        param_escape(cat_id) + "&mode=0" } );
           },
                onClose: function (item, node) {
@@ -90,7 +90,7 @@ function updateFeedList() {
                        var cat_id = id.substr(id.indexOf(":")+1);
 
                        new Ajax.Request("backend.php",
-                               { parameters: "backend.php?op=feeds&subop=collapse&cid=" +
+                               { parameters: "backend.php?op=feeds&method=collapse&cid=" +
                                        param_escape(cat_id) + "&mode=1" } );
 
           },
@@ -148,7 +148,7 @@ function catchupAllFeeds() {
 
        if (getInitParam("confirm_feed_catchup") != 1 || confirm(str)) {
 
-               var query_str = "backend.php?op=feeds&subop=catchupAll";
+               var query_str = "backend.php?op=feeds&method=catchupAll";
 
                notify_progress("Marking all feeds as read...");
 
@@ -165,10 +165,10 @@ function catchupAllFeeds() {
        }
 }
 
-function viewCurrentFeed(subop) {
+function viewCurrentFeed(method) {
 
        if (getActiveFeedId() != undefined) {
-               viewfeed(getActiveFeedId(), subop, activeFeedIsCat());
+               viewfeed(getActiveFeedId(), method, activeFeedIsCat());
        }
        return false; // block unneeded form submits
 }
@@ -186,7 +186,7 @@ function timeout() {
 
                        window.clearTimeout(counter_timeout_id);
 
-                       var query_str = "?op=rpc&subop=getAllCounters&seq=" + next_seq();
+                       var query_str = "?op=rpc&method=getAllCounters&seq=" + next_seq();
 
                        var omode;
 
@@ -302,7 +302,7 @@ function init() {
                var hasAudio = !!((myAudioTag = document.createElement('audio')).canPlayType);
 
                new Ajax.Request("backend.php", {
-                       parameters: {op: "rpc", subop: "sanityCheck", hasAudio: hasAudio},
+                       parameters: {op: "rpc", method: "sanityCheck", hasAudio: hasAudio},
                        onComplete: function(transport) {
                                        backend_sanity_check_callback(transport);
                                } });
@@ -454,7 +454,7 @@ function toggleDispRead() {
 
                hideOrShowFeeds(hide);
 
-               var query = "?op=rpc&subop=setpref&key=HIDE_READ_FEEDS&value=" +
+               var query = "?op=rpc&method=setpref&key=HIDE_READ_FEEDS&value=" +
                        param_escape(hide);
 
                setInitParam("hide_read_feeds", hide);
@@ -555,7 +555,7 @@ function collapse_feedlist() {
 
                dijit.byId("main").resize();
 
-               query = "?op=rpc&subop=setpref&key=_COLLAPSED_FEEDLIST&value=true";
+               query = "?op=rpc&method=setpref&key=_COLLAPSED_FEEDLIST&value=true";
                new Ajax.Request("backend.php", { parameters: query });
 
        } catch (e) {
@@ -577,7 +577,7 @@ function viewLimitChanged() {
                var pr = prompt(__("Assign score to article:"), score);
 
                if (pr != undefined) {
-                       var query = "?op=rpc&subop=setScore&id=" + id + "&score=" + pr;
+                       var query = "?op=rpc&method=setScore&id=" + id + "&score=" + pr;
 
                        new Ajax.Request("backend.php", {
                        parameters: query,
@@ -611,7 +611,7 @@ function rescoreCurrentFeed() {
        if (confirm(pr)) {
                notify_progress("Rescoring articles...");
 
-               var query = "?op=pref-feeds&subop=rescore&quiet=1&ids=" + actid;
+               var query = "?op=pref-feeds&method=rescore&quiet=1&ids=" + actid;
 
                new Ajax.Request("backend.php", {
                        parameters: query,
@@ -1024,7 +1024,7 @@ function inPreferences() {
 function reverseHeadlineOrder() {
        try {
 
-               var query_str = "?op=rpc&subop=togglepref&key=REVERSE_HEADLINES";
+               var query_str = "?op=rpc&method=togglepref&key=REVERSE_HEADLINES";
 
                new Ajax.Request("backend.php", {
                        parameters: query_str,
@@ -1049,7 +1049,7 @@ function scheduleFeedUpdate(id, is_cat) {
                        return;
                }
 
-               var query = "?op=rpc&subop=scheduleFeedUpdate&id=" +
+               var query = "?op=rpc&method=scheduleFeedUpdate&id=" +
                        param_escape(id) +
                        "&is_cat=" + param_escape(is_cat);
 
index 9cb902315a714bb5ca4cd8972551ce09993547d3..363121b198b54a90bd81c1b9a97695c6f24c6926 100644 (file)
@@ -406,7 +406,7 @@ function view(id) {
 
 function toggleMark(id, client_only) {
        try {
-               var query = "?op=rpc&id=" + id + "&subop=mark";
+               var query = "?op=rpc&id=" + id + "&method=mark";
 
                var img = $("FMPIC-" + id);
 
@@ -440,7 +440,7 @@ function toggleMark(id, client_only) {
 
 function togglePub(id, client_only, no_effects, note) {
        try {
-               var query = "?op=rpc&id=" + id + "&subop=publ";
+               var query = "?op=rpc&id=" + id + "&method=publ";
 
                if (note != undefined) {
                        query = query + "&note=" + param_escape(note);
@@ -601,7 +601,7 @@ function toggleUnread(id, cmode, effect) {
 
                        if (cmode == undefined) cmode = 2;
 
-                       var query = "?op=rpc&subop=catchupSelected" +
+                       var query = "?op=rpc&method=catchupSelected" +
                                "&cmode=" + param_escape(cmode) + "&ids=" + param_escape(id);
 
 //                     notify_progress("Loading, please wait...");
@@ -629,7 +629,7 @@ function selectionRemoveLabel(id, ids) {
                        return;
                }
 
-               var query = "?op=rpc&subop=removeFromLabel&ids=" +
+               var query = "?op=rpc&method=removeFromLabel&ids=" +
                        param_escape(ids.toString()) + "&lid=" + param_escape(id);
 
                console.log(query);
@@ -657,7 +657,7 @@ function selectionAssignLabel(id, ids) {
                        return;
                }
 
-               var query = "?op=rpc&subop=assignToLabel&ids=" +
+               var query = "?op=rpc&method=assignToLabel&ids=" +
                        param_escape(ids.toString()) + "&lid=" + param_escape(id);
 
                console.log(query);
@@ -717,7 +717,7 @@ function selectionToggleUnread(set_state, callback, no_error) {
                                cmode = "0";
                        }
 
-                       var query = "?op=rpc&subop=catchupSelected" +
+                       var query = "?op=rpc&method=catchupSelected" +
                                "&cmode=" + cmode + "&ids=" + param_escape(rows.toString());
 
                        notify_progress("Loading, please wait...");
@@ -752,7 +752,7 @@ function selectionToggleMarked() {
 
                if (rows.length > 0) {
 
-                       var query = "?op=rpc&subop=markSelected&ids=" +
+                       var query = "?op=rpc&method=markSelected&ids=" +
                                param_escape(rows.toString()) + "&cmode=2";
 
                        new Ajax.Request("backend.php", {
@@ -784,7 +784,7 @@ function selectionTogglePublished() {
 
                if (rows.length > 0) {
 
-                       var query = "?op=rpc&subop=publishSelected&ids=" +
+                       var query = "?op=rpc&method=publishSelected&ids=" +
                                param_escape(rows.toString()) + "&cmode=2";
 
                        new Ajax.Request("backend.php", {
@@ -910,7 +910,7 @@ function deleteSelection() {
                        return;
                }
 
-               query = "?op=rpc&subop=delete&ids=" + param_escape(rows);
+               query = "?op=rpc&method=delete&ids=" + param_escape(rows);
 
                console.log(query);
 
@@ -956,7 +956,7 @@ function archiveSelection() {
                        return;
                }
 
-               query = "?op=rpc&subop="+op+"&ids=" + param_escape(rows);
+               query = "?op=rpc&method="+op+"&ids=" + param_escape(rows);
 
                console.log(query);
 
@@ -1052,7 +1052,7 @@ function editArticleTags(id) {
                dojo.disconnect(tmph);
 
                        new Ajax.Autocompleter('tags_str', 'tags_choices',
-                          "backend.php?op=rpc&subop=completeTags",
+                          "backend.php?op=rpc&method=completeTags",
                           { tokens: ',', paramName: "search" });
                });
 
@@ -1141,7 +1141,7 @@ function catchupBatchedArticles() {
        try {
                if (catchup_id_batch.length > 0 && !_infscroll_request_sent) {
 
-                       var query = "?op=rpc&subop=catchupSelected" +
+                       var query = "?op=rpc&method=catchupSelected" +
                                "&cmode=0&ids=" + param_escape(catchup_id_batch.toString());
 
                        new Ajax.Request("backend.php", {
@@ -1216,7 +1216,7 @@ function catchupRelativeToArticle(below, id) {
                                        e.removeClassName("Unread");
                                }
 
-                               var query = "?op=rpc&subop=catchupSelected" +
+                               var query = "?op=rpc&method=catchupSelected" +
                                        "&cmode=0" + "&ids=" + param_escape(ids_to_mark.toString());
 
                                new Ajax.Request("backend.php", {
@@ -1275,7 +1275,7 @@ function cdmExpandArticle(id) {
                                $("CWRAP-" + id).innerHTML = "<div class=\"insensitive\">" +
                                        __("Loading, please wait...") + "</div>";
 
-                               var query = "?op=rpc&subop=cdmGetArticle&id=" + param_escape(id);
+                               var query = "?op=rpc&method=cdmGetArticle&id=" + param_escape(id);
 
                                var neighbor_ids = getRelativePostIds(id);
 
@@ -1386,7 +1386,7 @@ function zoomToArticle(event, id) {
 
                } else {
 
-                       var query = "?op=rpc&subop=getArticles&ids=" + param_escape(id);
+                       var query = "?op=rpc&method=getArticles&ids=" + param_escape(id);
 
                        notify_progress("Loading, please wait...", true);
 
@@ -1547,7 +1547,7 @@ function emailArticle(id) {
                dojo.disconnect(tmph);
 
                   new Ajax.Autocompleter('emailArticleDlg_destination', 'emailArticleDlg_dst_choices',
-                          "backend.php?op=rpc&subop=completeEmails",
+                          "backend.php?op=rpc&method=completeEmails",
                           { tokens: '', paramName: "search" });
                });
 
@@ -1558,7 +1558,7 @@ function emailArticle(id) {
                                document.forms['article_email_form'].destination.focus();
 
                           new Ajax.Autocompleter('destination', 'destination_choices',
-                                  "backend.php?op=rpc&subop=completeEmails",
+                                  "backend.php?op=rpc&method=completeEmails",
                                   { tokens: '', paramName: "search" });
 
                        }); */
@@ -1685,7 +1685,7 @@ function cdmClicked(event, id) {
 
                                active_post_id = id;
 
-                               var query = "?op=rpc&subop=catchupSelected" +
+                               var query = "?op=rpc&method=catchupSelected" +
                                        "&cmode=0&ids=" + param_escape(id);
 
                                new Ajax.Request("backend.php", {
@@ -1996,7 +1996,7 @@ function initHeadlinesMenu() {
 
 function tweetArticle(id) {
        try {
-               var query = "?op=rpc&subop=getTweetInfo&id=" + param_escape(id);
+               var query = "?op=rpc&method=getTweetInfo&id=" + param_escape(id);
 
                console.log(query);
 
index 34adc8f914f13366ca09c0d0502d298237daa9b5..341353480a504d2deeda70fdbb17fa9ca214a514 100644 (file)
@@ -1,11 +1,11 @@
 <?php
        function handle_rpc_request($link) {
 
-               $subop = $_REQUEST["subop"];
+               $method = $_REQUEST["method"];
                $seq = (int) $_REQUEST["seq"];
 
                // Silent
-               if ($subop == "setprofile") {
+               if ($method == "setprofile") {
                        $id = db_escape_string($_REQUEST["id"]);
 
                        $_SESSION["profile"] = $id;
@@ -14,7 +14,7 @@
                }
 
                // Silent
-               if ($subop == "remprofiles") {
+               if ($method == "remprofiles") {
                        $ids = explode(",", db_escape_string(trim($_REQUEST["ids"])));
 
                        foreach ($ids as $id) {
@@ -27,7 +27,7 @@
                }
 
                // Silent
-               if ($subop == "addprofile") {
+               if ($method == "addprofile") {
                        $title = db_escape_string(trim($_REQUEST["title"]));
                        if ($title) {
                                db_query($link, "BEGIN");
@@ -58,7 +58,7 @@
                }
 
                // Silent
-               if ($subop == "saveprofile") {
+               if ($method == "saveprofile") {
                        $id = db_escape_string($_REQUEST["id"]);
                        $title = db_escape_string(trim($_REQUEST["value"]));
 
@@ -90,7 +90,7 @@
                }
 
                // Silent
-               if ($subop == "remarchive") {
+               if ($method == "remarchive") {
                        $ids = explode(",", db_escape_string($_REQUEST["ids"]));
 
                        foreach ($ids as $id) {
                        return;
                }
 
-               if ($subop == "addfeed") {
+               if ($method == "addfeed") {
                        $feed = db_escape_string($_REQUEST['feed']);
                        $cat = db_escape_string($_REQUEST['cat']);
                        $login = db_escape_string($_REQUEST['login']);
 
                }
 
-               if ($subop == "extractfeedurls") {
+               if ($method == "extractfeedurls") {
 
                        $urls = get_feeds_from_html($_REQUEST['url']);
 
                        return;
                }
 
-               if ($subop == "togglepref") {
+               if ($method == "togglepref") {
                        $key = db_escape_string($_REQUEST["key"]);
                        set_pref($link, $key, !get_pref($link, $key));
                        $value = get_pref($link, $key);
                        return;
                }
 
-               if ($subop == "setpref") {
+               if ($method == "setpref") {
                        $value = str_replace("\n", "<br/>", $_REQUEST['value']);
 
                        $key = db_escape_string($_REQUEST["key"]);
                        return;
                }
 
-               if ($subop == "mark") {
+               if ($method == "mark") {
                        $mark = $_REQUEST["mark"];
                        $id = db_escape_string($_REQUEST["id"]);
 
                        return;
                }
 
-               if ($subop == "delete") {
+               if ($method == "delete") {
                        $ids = db_escape_string($_REQUEST["ids"]);
 
                        $result = db_query($link, "DELETE FROM ttrss_user_entries
                        return;
                }
 
-               if ($subop == "unarchive") {
+               if ($method == "unarchive") {
                        $ids = db_escape_string($_REQUEST["ids"]);
 
                        $result = db_query($link, "UPDATE ttrss_user_entries
                        return;
                }
 
-               if ($subop == "archive") {
+               if ($method == "archive") {
                        $ids = explode(",", db_escape_string($_REQUEST["ids"]));
 
                        foreach ($ids as $id) {
                        return;
                }
 
-               if ($subop == "publ") {
+               if ($method == "publ") {
                        $pub = $_REQUEST["pub"];
                        $id = db_escape_string($_REQUEST["id"]);
                        $note = trim(strip_tags(db_escape_string($_REQUEST["note"])));
                }
 
                // Silent
-               /* if ($subop == "update") {
+               /* if ($method == "update") {
                        $feed_id = db_escape_string($_REQUEST["feed"]);
                        update_rss_feed($link, $feed_id);
                        return;
                } */
 
-               if ($subop == "updateAllFeeds" || $subop == "getAllCounters") {
+               if ($method == "updateAllFeeds" || $method == "getAllCounters") {
                        $last_article_id = (int) $_REQUEST["last_article_id"];
 
                        $reply = array();
                }
 
                /* GET["cmode"] = 0 - mark as read, 1 - as unread, 2 - toggle */
-               if ($subop == "catchupSelected") {
+               if ($method == "catchupSelected") {
                        $ids = explode(",", db_escape_string($_REQUEST["ids"]));
                        $cmode = sprintf("%d", $_REQUEST["cmode"]);
 
                        return;
                }
 
-               if ($subop == "markSelected") {
+               if ($method == "markSelected") {
                        $ids = explode(",", db_escape_string($_REQUEST["ids"]));
                        $cmode = sprintf("%d", $_REQUEST["cmode"]);
 
                        return;
                }
 
-               if ($subop == "publishSelected") {
+               if ($method == "publishSelected") {
                        $ids = explode(",", db_escape_string($_REQUEST["ids"]));
                        $cmode = sprintf("%d", $_REQUEST["cmode"]);
 
                        return;
                }
 
-               if ($subop == "sanityCheck") {
+               if ($method == "sanityCheck") {
                        $_SESSION["hasAudio"] = $_REQUEST["hasAudio"] === "true";
 
                        $reply = array();
                        return;
                }
 
-               if ($subop == "setArticleTags") {
+               if ($method == "setArticleTags") {
                        global $memcache;
 
                        $id = db_escape_string($_REQUEST["id"]);
                        return;
                }
 
-               if ($subop == "regenOPMLKey") {
+               if ($method == "regenOPMLKey") {
                        update_feed_access_key($link, 'OPML:Publish',
                                false, $_SESSION["uid"]);
 
                        return;
                }
 
-               if ($subop == "completeTags") {
+               if ($method == "completeTags") {
                        $search = db_escape_string($_REQUEST["search"]);
 
                        $result = db_query($link, "SELECT DISTINCT tag_name FROM ttrss_tags
                        return;
                }
 
-               if ($subop == "purge") {
+               if ($method == "purge") {
                        $ids = explode(",", db_escape_string($_REQUEST["ids"]));
                        $days = sprintf("%d", $_REQUEST["days"]);
 
                        return;
                }
 
-/*             if ($subop == "setScore") {
+/*             if ($method == "setScore") {
                        $id = db_escape_string($_REQUEST["id"]);
                        $score = sprintf("%d", $_REQUEST["score"]);
 
 
                } */
 
-               if ($subop == "getArticles") {
+               if ($method == "getArticles") {
                        $ids = explode(",", db_escape_string($_REQUEST["ids"]));
                        $articles = array();
 
                        return;
                }
 
-               if ($subop == "checkDate") {
+               if ($method == "checkDate") {
                        $date = db_escape_string($_REQUEST["date"]);
                        $date_parsed = strtotime($date);
 
                        return;
                }
 
-               if ($subop == "assignToLabel" || $subop == "removeFromLabel") {
+               if ($method == "assignToLabel" || $method == "removeFromLabel") {
                        $reply = array();
 
                        $ids = explode(",", db_escape_string($_REQUEST["ids"]));
 
                                foreach ($ids as $id) {
 
-                                       if ($subop == "assignToLabel")
+                                       if ($method == "assignToLabel")
                                                label_add_article($link, $id, $label, $_SESSION["uid"]);
                                        else
                                                label_remove_article($link, $id, $label, $_SESSION["uid"]);
                        return;
                }
 
-               if ($subop == "updateFeedBrowser") {
+               if ($method == "updateFeedBrowser") {
                        $search = db_escape_string($_REQUEST["search"]);
                        $limit = db_escape_string($_REQUEST["limit"]);
                        $mode = (int) db_escape_string($_REQUEST["mode"]);
                }
 
                // Silent
-               if ($subop == "massSubscribe") {
+               if ($method == "massSubscribe") {
 
                        $payload = json_decode($_REQUEST["payload"], false);
                        $mode = $_REQUEST["mode"];
                        return;
                }
 
-               if ($subop == "digest-get-contents") {
+               if ($method == "digest-get-contents") {
                        $article_id = db_escape_string($_REQUEST['article_id']);
 
                        $result = db_query($link, "SELECT content,title,link,marked,published
                        return;
                }
 
-               if ($subop == "digest-update") {
+               if ($method == "digest-update") {
                        $feed_id = db_escape_string($_REQUEST['feed_id']);
                        $offset = db_escape_string($_REQUEST['offset']);
                        $seq = db_escape_string($_REQUEST['seq']);
                        return;
                }
 
-               if ($subop == "digest-init") {
+               if ($method == "digest-init") {
                        $tmp_feeds = api_get_feeds($link, -4, true, false, 0);
 
                        $feeds = array();
                        return;
                }
 
-               if ($subop == "catchupFeed") {
+               if ($method == "catchupFeed") {
                        $feed_id = db_escape_string($_REQUEST['feed_id']);
                        $is_cat = db_escape_string($_REQUEST['is_cat']) == "true";
 
                        return;
                }
 
-               if ($subop == "sendEmail") {
+               if ($method == "sendEmail") {
                        $secretkey = $_REQUEST['secretkey'];
 
                        require_once 'lib/phpmailer/class.phpmailer.php';
                        return;
                }
 
-               if ($subop == "completeEmails") {
+               if ($method == "completeEmails") {
                        $search = db_escape_string($_REQUEST["search"]);
 
                        print "<ul>";
                        return;
                }
 
-               if ($subop == "quickAddCat") {
+               if ($method == "quickAddCat") {
                        $cat = db_escape_string($_REQUEST["cat"]);
 
                        add_feed_category($link, $cat);
                        return;
                }
 
-               if ($subop == "regenFeedKey") {
+               if ($method == "regenFeedKey") {
                        $feed_id = db_escape_string($_REQUEST['id']);
                        $is_cat = db_escape_string($_REQUEST['is_cat']) == "true";
 
                }
 
                // Silent
-               if ($subop == "clearKeys") {
+               if ($method == "clearKeys") {
                        db_query($link, "DELETE FROM ttrss_access_keys WHERE
                                owner_uid = " . $_SESSION["uid"]);
 
                }
 
                // Silent
-               if ($subop == "clearArticleKeys") {
+               if ($method == "clearArticleKeys") {
                        db_query($link, "UPDATE ttrss_user_entries SET uuid = '' WHERE
                                owner_uid = " . $_SESSION["uid"]);
 
                }
 
 
-               if ($subop == "verifyRegexp") {
+               if ($method == "verifyRegexp") {
                        $reg_exp = $_REQUEST["reg_exp"];
 
                        $status = @preg_match("/$reg_exp/i", "TEST") !== false;
                }
 
                // TODO: unify with digest-get-contents?
-               if ($subop == "cdmGetArticle") {
+               if ($method == "cdmGetArticle") {
                        $ids = array(db_escape_string($_REQUEST["id"]));
                        $cids = explode(",", $_REQUEST["cids"]);
 
                        return;
                }
 
-               if ($subop == "scheduleFeedUpdate") {
+               if ($method == "scheduleFeedUpdate") {
                        $feed_id = db_escape_string($_REQUEST["id"]);
                        $is_cat =  db_escape_string($_REQUEST['is_cat']) == 'true';
 
                        return;
                }
 
-               if ($subop == "getTweetInfo") {
+               if ($method == "getTweetInfo") {
                        $id = db_escape_string($_REQUEST['id']);
 
                        $result = db_query($link, "SELECT title, link
                        return;
                }
 
-               if ($subop == "setNote") {
+               if ($method == "setNote") {
                        $id = db_escape_string($_REQUEST["id"]);
                        $note = trim(strip_tags(db_escape_string($_REQUEST["note"])));
 
                        return;
                }
 
-               if ($subop == "genHash") {
+               if ($method == "genHash") {
                        $hash = sha1(uniqid(rand(), true));
 
                        print json_encode(array("hash" => $hash));
                }
 
                print json_encode(array("error" => array("code" => 7,
-                       "message" => "Unknown method: $subop")));
+                       "message" => "Unknown method: $method")));
        }
 ?>
index 26b2e7cf6de396ff262b7b0253e8c16ccdd2815f..13abc947f1febcfca57b7b9844f3f4a76d94721d 100644 (file)
                                                var elem = this;
                                                dojo.xhrPost({
                                                        url: 'backend.php',
-                                                       content: {op: 'rpc', subop: 'saveprofile',
+                                                       content: {op: 'rpc', method: 'saveprofile',
                                                                value: this.value,
                                                                id: this.srcNodeRef.getAttribute('profile-id')},
                                                                load: function(response) {
                if ($id == "quickAddFeed") {
 
                        print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"op\" value=\"rpc\">";
-                       print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"subop\" value=\"addfeed\">";
+                       print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"method\" value=\"addfeed\">";
 
                        print "<div class=\"dlgSec\">".__("Feed")."</div>";
                        print "<div class=\"dlgSecCont\">";
 #                              name='feed_browser' id='feed_browser'>";
 
                        print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"op\" value=\"rpc\">";
-                       print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"subop\" value=\"updateFeedBrowser\">";
+                       print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"method\" value=\"updateFeedBrowser\">";
 
                        print "<div dojoType=\"dijit.Toolbar\">
                                <div style='float : right'>
 
                        print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"op\" value=\"pref-filters\">";
                        print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"quiet\" value=\"1\">";
-                       print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"subop\" value=\"add\">";
+                       print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"method\" value=\"add\">";
 
                        $result = db_query($link, "SELECT id,description
                                FROM ttrss_filter_types ORDER BY description");
 
                        print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"id\" value=\"$param\">";
                        print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"op\" value=\"rpc\">";
-                       print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"subop\" value=\"setArticleTags\">";
+                       print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"method\" value=\"setArticleTags\">";
 
                        print "<table width='100%'><tr><td>";
 
 
                        print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"secretkey\" value=\"$secretkey\">";
                        print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"op\" value=\"rpc\">";
-                       print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"subop\" value=\"sendEmail\">";
+                       print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"method\" value=\"sendEmail\">";
 
                        $result = db_query($link, "SELECT email, full_name FROM ttrss_users WHERE
                                id = " . $_SESSION["uid"]);
                        print T_sprintf("You can override colors, fonts and layout of your currently selected theme with custom CSS declarations here. <a target=\"_blank\" class=\"visibleLink\" href=\"%s\">This file</a> can be used as a baseline.", "tt-rss.css");
 
                        print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"op\" value=\"rpc\">";
-                       print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"subop\" value=\"setpref\">";
+                       print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"method\" value=\"setpref\">";
                        print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"key\" value=\"USER_STYLESHEET\">";
 
                        print "<table width='100%'><tr><td>";
 
                        print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"id\" value=\"$param\">";
                        print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"op\" value=\"rpc\">";
-                       print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"subop\" value=\"setNote\">";
+                       print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"method\" value=\"setNote\">";
 
                        print "<table width='100%'><tr><td>";
                        print "<textarea dojoType=\"dijit.form.SimpleTextarea\"
                if ($id == "addInstance") {
 
                        print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\"  name=\"op\" value=\"pref-instances\">";
-                       print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\"  name=\"subop\" value=\"add\">";
+                       print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\"  name=\"method\" value=\"add\">";
 
                        print "<div class=\"dlgSec\">".__("Instance")."</div>";
 
index bbae468bf01450498ab6a227269dd8b00a85a953..089ee23610c65326bd27a05e2b4e50c92fd437e7 100644 (file)
                global $purge_intervals;
                global $update_methods;
 
-               $subop = $_REQUEST["subop"];
+               $method = $_REQUEST["method"];
                $quiet = $_REQUEST["quiet"];
                $mode = $_REQUEST["mode"];
 
-               if ($subop == "renamecat") {
+               if ($method == "renamecat") {
                        $title = db_escape_string($_REQUEST['title']);
                        $id = db_escape_string($_REQUEST['id']);
 
@@ -26,7 +26,7 @@
                        return;
                }
 
-               if ($subop == "remtwitterinfo") {
+               if ($method == "remtwitterinfo") {
 
                        db_query($link, "UPDATE ttrss_users SET twitter_oauth = NULL
                                WHERE id = " . $_SESSION['uid']);
@@ -34,7 +34,7 @@
                        return;
                }
 
-               if ($subop == "getfeedtree") {
+               if ($method == "getfeedtree") {
 
                        $search = $_SESSION["prefs_feed_search"];
 
                        return;
                }
 
-               if ($subop == "catsortreset") {
+               if ($method == "catsortreset") {
                        db_query($link, "UPDATE ttrss_feed_categories
                                        SET order_id = 0 WHERE owner_uid = " . $_SESSION["uid"]);
                        return;
                }
 
-               if ($subop == "feedsortreset") {
+               if ($method == "feedsortreset") {
                        db_query($link, "UPDATE ttrss_feeds
                                        SET order_id = 0 WHERE owner_uid = " . $_SESSION["uid"]);
                        return;
                }
 
-               if ($subop == "savefeedorder") {
+               if ($method == "savefeedorder") {
 #                      if ($_POST['payload']) {
 #                              file_put_contents("/tmp/blahblah.txt", $_POST['payload']);
 #                              $data = json_decode($_POST['payload'], true);
                        return;
                }
 
-               if ($subop == "removeicon") {
+               if ($method == "removeicon") {
                        $feed_id = db_escape_string($_REQUEST["feed_id"]);
 
                        $result = db_query($link, "SELECT id FROM ttrss_feeds
                        return;
                }
 
-               if ($subop == "uploadicon") {
+               if ($method == "uploadicon") {
                        $icon_file = $_FILES['icon_file']['tmp_name'];
                        $feed_id = db_escape_string($_REQUEST["feed_id"]);
 
                        return;
                }
 
-               if ($subop == "editfeed") {
+               if ($method == "editfeed") {
 
                        $feed_id = db_escape_string($_REQUEST["id"]);
 
 
                        print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"id\" value=\"$feed_id\">";
                        print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"op\" value=\"pref-feeds\">";
-                       print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"subop\" value=\"editSave\">";
+                       print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"method\" value=\"editSave\">";
 
                        print "<div class=\"dlgSec\">".__("Feed")."</div>";
                        print "<div class=\"dlgSecCont\">";
                                <input id=\"icon_file\" size=\"10\" name=\"icon_file\" type=\"file\">
                                <input type=\"hidden\" name=\"op\" value=\"pref-feeds\">
                                <input type=\"hidden\" name=\"feed_id\" value=\"$feed_id\">
-                               <input type=\"hidden\" name=\"subop\" value=\"uploadicon\">
+                               <input type=\"hidden\" name=\"method\" value=\"uploadicon\">
                                <button dojoType=\"dijit.form.Button\" onclick=\"return uploadFeedIcon();\"
                                        type=\"submit\">".__('Replace')."</button>
                                <button dojoType=\"dijit.form.Button\" onclick=\"return removeFeedIcon($feed_id);\"
                        return;
                }
 
-               if ($subop == "editfeeds") {
+               if ($method == "editfeeds") {
 
                        $feed_ids = db_escape_string($_REQUEST["ids"]);
 
                        print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"ids\" value=\"$feed_ids\">";
                        print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"op\" value=\"pref-feeds\">";
-                       print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"subop\" value=\"batchEditSave\">";
+                       print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"method\" value=\"batchEditSave\">";
 
                        print "<div class=\"dlgSec\">".__("Feed")."</div>";
                        print "<div class=\"dlgSecCont\">";
                        return;
                }
 
-               if ($subop == "editSave" || $subop == "batchEditSave") {
+               if ($method == "editSave" || $method == "batchEditSave") {
 
                        $feed_title = db_escape_string(trim($_POST["title"]));
                        $feed_link = db_escape_string(trim($_POST["feed_url"]));
                                $cache_images_qpart = "";
                        }
 
-                       if ($subop == "editSave") {
+                       if ($method == "editSave") {
 
                                $result = db_query($link, "UPDATE ttrss_feeds SET
                                        $category_qpart
                                        update_method = '$update_method'
                                        WHERE id = '$feed_id' AND owner_uid = " . $_SESSION["uid"]);
 
-                       } else if ($subop == "batchEditSave") {
+                       } else if ($method == "batchEditSave") {
                                $feed_data = array();
 
                                foreach (array_keys($_POST) as $k) {
-                                       if ($k != "op" && $k != "subop" && $k != "ids") {
+                                       if ($k != "op" && $k != "method" && $k != "ids") {
                                                $feed_data[$k] = $_POST[$k];
                                        }
                                }
                        return;
                }
 
-               if ($subop == "resetPubSub") {
+               if ($method == "resetPubSub") {
 
                        $ids = db_escape_string($_REQUEST["ids"]);
 
                        return;
                }
 
-               if ($subop == "remove") {
+               if ($method == "remove") {
 
                        $ids = split(",", db_escape_string($_REQUEST["ids"]));
 
                        return;
                }
 
-               if ($subop == "clear") {
+               if ($method == "clear") {
                        $id = db_escape_string($_REQUEST["id"]);
                        clear_feed_articles($link, $id);
                }
 
-               if ($subop == "rescore") {
+               if ($method == "rescore") {
                        $ids = split(",", db_escape_string($_REQUEST["ids"]));
 
                        foreach ($ids as $id) {
 
                }
 
-               if ($subop == "rescoreAll") {
+               if ($method == "rescoreAll") {
 
                        $result = db_query($link,
                                "SELECT id FROM ttrss_feeds WHERE owner_uid = " . $_SESSION['uid']);
 
                }
 
-               if ($subop == "add") {
+               if ($method == "add") {
 
                        $feed_url = db_escape_string(trim($_REQUEST["feed_url"]));
                        $cat_id = db_escape_string($_REQUEST["cat_id"]);
                                        print "<form action=\"backend.php\">";
                                        print "<input type=\"hidden\" name=\"op\" value=\"pref-feeds\">";
                                        print "<input type=\"hidden\" name=\"quiet\" value=\"1\">";
-                                       print "<input type=\"hidden\" name=\"subop\" value=\"add\">";
+                                       print "<input type=\"hidden\" name=\"method\" value=\"add\">";
 
                                        print "<select name=\"feed_url\">";
 
                                        print "<form method=\"GET\" style='display: inline'
                                                action=\"$tp_uri\">
                                                <input type=\"hidden\" name=\"tab\" value=\"feedConfig\">
-                                               <input type=\"hidden\" name=\"subop\" value=\"editFeed\">
-                                               <input type=\"hidden\" name=\"subopparam\" value=\"$feed_id\">
+                                               <input type=\"hidden\" name=\"method\" value=\"editFeed\">
+                                               <input type=\"hidden\" name=\"methodparam\" value=\"$feed_id\">
                                                <input type=\"submit\" value=\"".__("Edit subscription options")."\">
                                                </form>";
                                }
                        }
                }
 
-               if ($subop == "categorize") {
+               if ($method == "categorize") {
 
 
                        $ids = split(",", db_escape_string($_REQUEST["ids"]));
 
                }
 
-               if ($subop == "editCats") {
+               if ($method == "editCats") {
 
                        $action = $_REQUEST["action"];
 
                                                        var elem = this;
                                                        dojo.xhrPost({
                                                                url: 'backend.php',
-                                                               content: {op: 'pref-feeds', subop: 'editCats',
+                                                               content: {op: 'pref-feeds', method: 'editCats',
                                                                        action: 'save',
                                                                        value: this.value,
                                                                        cid: this.srcNodeRef.getAttribute('cat-id')},
                 __("Loading, please wait...")."</div>";
 
                print "<div dojoType=\"fox.PrefFeedStore\" jsId=\"feedStore\"
-                       url=\"backend.php?op=pref-feeds&subop=getfeedtree\">
+                       url=\"backend.php?op=pref-feeds&method=getfeedtree\">
                </div>
                <div dojoType=\"lib.CheckBoxStoreModel\" jsId=\"feedModel\" store=\"feedStore\"
                query=\"{id:'root'}\" rootId=\"root\" rootLabel=\"Feeds\"
index cc30dd2855c9a079f0bc60be579b2d234c5fd43e..a218511e49771080618034d0249124614e2c4a9a 100644 (file)
        }
 
        function module_pref_filters($link) {
-               $subop = $_REQUEST["subop"];
+               $method = $_REQUEST["method"];
                $quiet = $_REQUEST["quiet"];
 
-               if ($subop == "getfiltertree") {
+               if ($method == "getfiltertree") {
                        $root = array();
                        $root['id'] = 'root';
                        $root['name'] = __('Filters');
                        return;
                }
 
-               if ($subop == "edit") {
+               if ($method == "edit") {
 
                        $filter_id = db_escape_string($_REQUEST["id"]);
 
 
                        print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"op\" value=\"pref-filters\">";
                        print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"id\" value=\"$filter_id\">";
-                       print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"subop\" value=\"editSave\">";
+                       print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"method\" value=\"editSave\">";
 
                        $result = db_query($link, "SELECT id,description
                                FROM ttrss_filter_types ORDER BY description");
                }
 
 
-               if ($subop == "editSave") {
+               if ($method == "editSave") {
 
                        global $memcache;
 
                        return;
                }
 
-               if ($subop == "remove") {
+               if ($method == "remove") {
 
                        if ($memcache) $memcache->flush();
 
                        return;
                }
 
-               if ($subop == "add") {
+               if ($method == "add") {
 
                        if ($memcache) $memcache->flush();
 
                 __("Loading, please wait...")."</div>";
 
                print "<div dojoType=\"dojo.data.ItemFileWriteStore\" jsId=\"filterStore\"
-                       url=\"backend.php?op=pref-filters&subop=getfiltertree\">
+                       url=\"backend.php?op=pref-filters&method=getfiltertree\">
                </div>
                <div dojoType=\"lib.CheckBoxStoreModel\" jsId=\"filterModel\" store=\"filterStore\"
                query=\"{id:'root'}\" rootId=\"root\" rootLabel=\"Feeds\"
index 463dc70c4caaafec44b7193e81a4a4f2e0eb911a..ca9a011e191cfb28f98c349edb8944031fd353ff 100644 (file)
@@ -6,9 +6,9 @@
                        return;
                }
 
-               $subop = $_REQUEST['subop'];
+               $method = $_REQUEST['method'];
 
-               if ($subop == "remove") {
+               if ($method == "remove") {
                        $ids = db_escape_string($_REQUEST['ids']);
 
                        db_query($link, "DELETE FROM ttrss_linked_instances WHERE
@@ -17,7 +17,7 @@
                        return;
                }
 
-               if ($subop == "add") {
+               if ($method == "add") {
                        $id = db_escape_string($_REQUEST["id"]);
                        $access_url = db_escape_string($_REQUEST["access_url"]);
                        $access_key = db_escape_string($_REQUEST["access_key"]);
@@ -40,7 +40,7 @@
                        return;
                }
 
-               if ($subop == "edit") {
+               if ($method == "edit") {
 
                        $id = db_escape_string($_REQUEST["id"]);
 
@@ -49,7 +49,7 @@
 
                        print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\"  name=\"id\" value=\"$id\">";
                        print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\"  name=\"op\" value=\"pref-instances\">";
-                       print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\"  name=\"subop\" value=\"editSave\">";
+                       print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\"  name=\"method\" value=\"editSave\">";
 
                        print "<div class=\"dlgSec\">".__("Instance")."</div>";
 
                        return;
                }
 
-               if ($subop == "editSave") {
+               if ($method == "editSave") {
                        $id = db_escape_string($_REQUEST["id"]);
                        $access_url = db_escape_string($_REQUEST["access_url"]);
                        $access_key = db_escape_string($_REQUEST["access_key"]);
index 72e6dd1e3197ae9189132544a64efbf613b1185f..f9f2c19e333dbdc6fca8c01c28758c67dcd1a158 100644 (file)
@@ -1,9 +1,9 @@
 <?php
        function module_pref_labels($link) {
 
-               $subop = $_REQUEST["subop"];
+               $method = $_REQUEST["method"];
 
-               if ($subop == "edit") {
+               if ($method == "edit") {
                        $label_id = db_escape_string($_REQUEST['id']);
 
                        $result = db_query($link, "SELECT * FROM ttrss_labels2 WHERE
@@ -16,7 +16,7 @@
 
                        print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"id\" value=\"$label_id\">";
                        print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"op\" value=\"pref-labels\">";
-                       print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"subop\" value=\"save\">";
+                       print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"method\" value=\"save\">";
 
                        print "<div class=\"dlgSec\">".__("Caption")."</div>";
 
@@ -83,7 +83,7 @@
                        return;
                }
 
-               if ($subop == "getlabeltree") {
+               if ($method == "getlabeltree") {
                        $root = array();
                        $root['id'] = 'root';
                        $root['name'] = __('Labels');
                        return;
                }
 
-               if ($subop == "color-set") {
+               if ($method == "color-set") {
                        $kind = db_escape_string($_REQUEST["kind"]);
                        $ids = split(',', db_escape_string($_REQUEST["ids"]));
                        $color = db_escape_string($_REQUEST["color"]);
                        return;
                }
 
-               if ($subop == "color-reset") {
+               if ($method == "color-reset") {
                        $ids = split(',', db_escape_string($_REQUEST["ids"]));
 
                        foreach ($ids as $id) {
 
                }
 
-               if ($subop == "save") {
+               if ($method == "save") {
 
                        $id = db_escape_string($_REQUEST["id"]);
                        $caption = db_escape_string(trim($_REQUEST["caption"]));
                        return;
                }
 
-               if ($subop == "remove") {
+               if ($method == "remove") {
 
                        $ids = split(",", db_escape_string($_REQUEST["ids"]));
 
 
                }
 
-               if ($subop == "add") {
+               if ($method == "add") {
                        $caption = db_escape_string($_REQUEST["caption"]);
                        $output = db_escape_string($_REQUEST["output"]);
 
                 __("Loading, please wait...")."</div>";
 
                print "<div dojoType=\"dojo.data.ItemFileWriteStore\" jsId=\"labelStore\" 
-                       url=\"backend.php?op=pref-labels&subop=getlabeltree\">
+                       url=\"backend.php?op=pref-labels&method=getlabeltree\">
                </div>
                <div dojoType=\"lib.CheckBoxStoreModel\" jsId=\"labelModel\" store=\"labelStore\"
                query=\"{id:'root'}\" rootId=\"root\"
index 838c722c39ac672e900eb7ae36209eef4264b29d..15fa5349015105d046046e610110b7af826714d9 100644 (file)
@@ -3,7 +3,7 @@
 
                global $access_level_names;
 
-               $subop = $_REQUEST["subop"];
+               $method = $_REQUEST["method"];
 
                $prefs_blacklist = array("HIDE_READ_FEEDS", "FEEDS_SORT_BY_UNREAD",
                        "STRIP_UNSAFE_TAGS");
@@ -19,7 +19,7 @@
                        array_push($prefs_blacklist, "PURGE_UNREAD_ARTICLES");
                } */
 
-               if ($subop == "change-password") {
+               if ($method == "change-password") {
 
                        $old_pw = $_POST["old_password"];
                        $new_pw = $_POST["new_password"];
@@ -68,7 +68,7 @@
 
                        return;
 
-               } else if ($subop == "save-config") {
+               } else if ($method == "save-config") {
 
 #                      $_SESSION["prefs_op_result"] = "save-config";
 
@@ -95,7 +95,7 @@
 
                        return;
 
-               } else if ($subop == "getHelp") {
+               } else if ($method == "getHelp") {
 
                        $pref_name = db_escape_string($_REQUEST["pn"]);
 
                                printf(__("Unknown option: %s"), $pref_name);
                        }
 
-               } else if ($subop == "change-email") {
+               } else if ($method == "change-email") {
 
                        $email = db_escape_string($_POST["email"]);
                        $full_name = db_escape_string($_POST["full_name"]);
 
                        return;
 
-               } else if ($subop == "reset-config") {
+               } else if ($method == "reset-config") {
 
                        $_SESSION["prefs_op_result"] = "reset-to-defaults";
 
                                print "</table>";
 
                                print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"op\" value=\"pref-prefs\">";
-                               print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"subop\" value=\"change-email\">";
+                               print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"method\" value=\"change-email\">";
 
                                print "<p><button dojoType=\"dijit.form.Button\" type=\"submit\">".
                                        __("Save data")."</button>";
                                print "</table>";
 
                                print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"op\" value=\"pref-prefs\">";
-                               print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"subop\" value=\"change-password\">";
+                               print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"method\" value=\"change-password\">";
 
                                print "<p><button dojoType=\"dijit.form.Button\" type=\"submit\">".
                                        __("Change password")."</button>";
                        print '<div dojoType="dijit.layout.ContentPane" region="bottom">';
 
                        print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"op\" value=\"pref-prefs\">";
-                       print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"subop\" value=\"save-config\">";
+                       print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"method\" value=\"save-config\">";
 
                        print "<button dojoType=\"dijit.form.Button\" type=\"submit\">".
                                __('Save configuration')."</button> ";
index 7be4eb437b952ce331658bf3e51931297fcc3d47..8f6ba10a2627cb377594653f561176954af69231 100644 (file)
@@ -8,12 +8,12 @@
                        return;
                }
 
-               $subop = $_REQUEST["subop"];
+               $method = $_REQUEST["method"];
 
-               if ($subop == "user-details") {
+               if ($method == "user-details") {
 
                        header("Content-Type: text/xml");
-                       print "<dlg id=\"$subop\">";
+                       print "<dlg id=\"$method\">";
 
                        $uid = sprintf("%d", $_REQUEST["id"]);
 
                        return;
                }
 
-               if ($subop == "edit") {
+               if ($method == "edit") {
 
                        header("Content-Type: text/xml");
 
                        $id = db_escape_string($_REQUEST["id"]);
 
-                       print "<dlg id=\"$subop\">";
+                       print "<dlg id=\"$method\">";
                        print "<title>".__('User Editor')."</title>";
                        print "<content><![CDATA[";
 
 
                        print "<input type=\"hidden\" name=\"id\" value=\"$id\">";
                        print "<input type=\"hidden\" name=\"op\" value=\"pref-users\">";
-                       print "<input type=\"hidden\" name=\"subop\" value=\"editSave\">";
+                       print "<input type=\"hidden\" name=\"method\" value=\"editSave\">";
 
                        $result = db_query($link, "SELECT * FROM ttrss_users WHERE id = '$id'");
 
                        return;
                }
 
-               if ($subop == "editSave") {
+               if ($method == "editSave") {
 
                        if ($_SESSION["access_level"] >= 10) {
 
                                        access_level = '$access_level', email = '$email' WHERE id = '$uid'");
 
                        }
-               } else if ($subop == "remove") {
+               } else if ($method == "remove") {
 
                        if ($_SESSION["access_level"] >= 10) {
 
                                        }
                                }
                        }
-               } else if ($subop == "add") {
+               } else if ($method == "add") {
 
                        if ($_SESSION["access_level"] >= 10) {
 
                                        $status_msg = format_warning(T_sprintf("User <b>%s</b> already exists.", $login));
                                }
                        }
-               } else if ($subop == "resetPass") {
+               } else if ($method == "resetPass") {
 
                        if ($_SESSION["access_level"] >= 10) {
 
                        $uid = $line["id"];
                        $edit_uid = $_REQUEST["id"];
 
-                       if ($subop == "edit" && $uid != $edit_uid) {
+                       if ($method == "edit" && $uid != $edit_uid) {
                                $class .= " Grayed";
                                $this_row_id = "";
                        } else {
index c2de2185fd0cd6c91861cf5c278ef5c18d6849c8..5fd9beabdfb6c5bb425f68453d6a44bfc9063b9d 100644 (file)
@@ -42,7 +42,7 @@
 
        init_connection($link);
 
-       $subop = $_REQUEST["subop"];
+       $method = $_REQUEST["method"];
        $mode = $_REQUEST["mode"];
 
        if ((!$op || $op == "rss" || $op == "dlg") && !$_REQUEST["noxml"]) {