From f30ef1fa1bd76b497b5c0a64a92e2e0ef7116515 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 12 Dec 2011 22:46:25 +0400 Subject: subop -> method --- modules/backend-rpc.php | 98 ++++++++++++++++++++++++------------------------- 1 file changed, 49 insertions(+), 49 deletions(-) (limited to 'modules/backend-rpc.php') diff --git a/modules/backend-rpc.php b/modules/backend-rpc.php index 34adc8f91..341353480 100644 --- a/modules/backend-rpc.php +++ b/modules/backend-rpc.php @@ -1,11 +1,11 @@ ", $_REQUEST['value']); $key = db_escape_string($_REQUEST["key"]); @@ -147,7 +147,7 @@ return; } - if ($subop == "mark") { + if ($method == "mark") { $mark = $_REQUEST["mark"]; $id = db_escape_string($_REQUEST["id"]); @@ -164,7 +164,7 @@ return; } - if ($subop == "delete") { + if ($method == "delete") { $ids = db_escape_string($_REQUEST["ids"]); $result = db_query($link, "DELETE FROM ttrss_user_entries @@ -174,7 +174,7 @@ return; } - if ($subop == "unarchive") { + if ($method == "unarchive") { $ids = db_escape_string($_REQUEST["ids"]); $result = db_query($link, "UPDATE ttrss_user_entries @@ -185,7 +185,7 @@ return; } - if ($subop == "archive") { + if ($method == "archive") { $ids = explode(",", db_escape_string($_REQUEST["ids"])); foreach ($ids as $id) { @@ -196,7 +196,7 @@ 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"]))); @@ -229,13 +229,13 @@ } // 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(); @@ -259,7 +259,7 @@ } /* 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"]); @@ -269,7 +269,7 @@ return; } - if ($subop == "markSelected") { + if ($method == "markSelected") { $ids = explode(",", db_escape_string($_REQUEST["ids"])); $cmode = sprintf("%d", $_REQUEST["cmode"]); @@ -279,7 +279,7 @@ return; } - if ($subop == "publishSelected") { + if ($method == "publishSelected") { $ids = explode(",", db_escape_string($_REQUEST["ids"])); $cmode = sprintf("%d", $_REQUEST["cmode"]); @@ -289,7 +289,7 @@ return; } - if ($subop == "sanityCheck") { + if ($method == "sanityCheck") { $_SESSION["hasAudio"] = $_REQUEST["hasAudio"] === "true"; $reply = array(); @@ -305,7 +305,7 @@ return; } - if ($subop == "setArticleTags") { + if ($method == "setArticleTags") { global $memcache; $id = db_escape_string($_REQUEST["id"]); @@ -377,7 +377,7 @@ return; } - if ($subop == "regenOPMLKey") { + if ($method == "regenOPMLKey") { update_feed_access_key($link, 'OPML:Publish', false, $_SESSION["uid"]); @@ -387,7 +387,7 @@ return; } - if ($subop == "completeTags") { + if ($method == "completeTags") { $search = db_escape_string($_REQUEST["search"]); $result = db_query($link, "SELECT DISTINCT tag_name FROM ttrss_tags @@ -404,7 +404,7 @@ return; } - if ($subop == "purge") { + if ($method == "purge") { $ids = explode(",", db_escape_string($_REQUEST["ids"])); $days = sprintf("%d", $_REQUEST["days"]); @@ -421,7 +421,7 @@ return; } -/* if ($subop == "setScore") { +/* if ($method == "setScore") { $id = db_escape_string($_REQUEST["id"]); $score = sprintf("%d", $_REQUEST["score"]); @@ -434,7 +434,7 @@ } */ - if ($subop == "getArticles") { + if ($method == "getArticles") { $ids = explode(",", db_escape_string($_REQUEST["ids"])); $articles = array(); @@ -448,7 +448,7 @@ return; } - if ($subop == "checkDate") { + if ($method == "checkDate") { $date = db_escape_string($_REQUEST["date"]); $date_parsed = strtotime($date); @@ -457,7 +457,7 @@ return; } - if ($subop == "assignToLabel" || $subop == "removeFromLabel") { + if ($method == "assignToLabel" || $method == "removeFromLabel") { $reply = array(); $ids = explode(",", db_escape_string($_REQUEST["ids"])); @@ -472,7 +472,7 @@ 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"]); @@ -492,7 +492,7 @@ 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"]); @@ -504,7 +504,7 @@ } // Silent - if ($subop == "massSubscribe") { + if ($method == "massSubscribe") { $payload = json_decode($_REQUEST["payload"], false); $mode = $_REQUEST["mode"]; @@ -592,7 +592,7 @@ 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 @@ -614,7 +614,7 @@ 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']); @@ -640,7 +640,7 @@ return; } - if ($subop == "digest-init") { + if ($method == "digest-init") { $tmp_feeds = api_get_feeds($link, -4, true, false, 0); $feeds = array(); @@ -654,7 +654,7 @@ return; } - if ($subop == "catchupFeed") { + if ($method == "catchupFeed") { $feed_id = db_escape_string($_REQUEST['feed_id']); $is_cat = db_escape_string($_REQUEST['is_cat']) == "true"; @@ -664,7 +664,7 @@ return; } - if ($subop == "sendEmail") { + if ($method == "sendEmail") { $secretkey = $_REQUEST['secretkey']; require_once 'lib/phpmailer/class.phpmailer.php'; @@ -723,7 +723,7 @@ return; } - if ($subop == "completeEmails") { + if ($method == "completeEmails") { $search = db_escape_string($_REQUEST["search"]); print "