init_connection($link);
- $subop = $_REQUEST["subop"];
+ $method = $_REQUEST["method"];
$mode = $_REQUEST["mode"];
if ((!$op || $op == "rss" || $op == "dlg") && !$_REQUEST["noxml"]) {
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);
// }
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") {
}
- 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
dojo.xhrPost({
url: "backend.php",
- content: {op: "pref-feeds", subop: "savefeedorder",
+ content: {op: "pref-feeds", method: "savefeedorder",
payload: newFileContentString},
error: saveFailedCallback,
load: saveCompleteCallback});
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", {
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", {
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", {
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);
}, 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);
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;
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");
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);
} });
try {
- var query = "?op=rpc&id=" + id + "&subop=mark";
+ var query = "?op=rpc&id=" + id + "&method=mark";
if (!img) return;
try {
- var query = "?op=rpc&id=" + id + "&subop=publ";
+ var query = "?op=rpc&id=" + id + "&method=publ";
if (note != undefined) {
query = query + "¬e=" + param_escape(note);
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);
}
-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;
_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;
}
}
- if (offset != 0 && !subop) {
+ if (offset != 0 && !method) {
var date = new Date();
var timestamp = Math.round(date.getTime() / 1000);
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) {
_search_query = false;
}
- if (subop == "MarkAllRead") {
+ if (method == "MarkAllRead") {
var show_next_feed = getInitParam("on_catchup_show_next_feed") == "1";
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);
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";
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);
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,
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);
return false;
}
- var query = "?op=pref-labels&subop=add&caption=" +
+ var query = "?op=pref-labels&method=add&caption=" +
param_escape(caption);
if (select)
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('');
execute: function() {
if (this.validate()) {
- var query = "?op=rpc&subop=verifyRegexp®_exp=" +
+ var query = "?op=rpc&method=verifyRegexp®_exp=" +
param_escape(dialog.attr('value').reg_exp);
notify_progress("Verifying regular expression...");
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,
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,
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);
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", {
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);
// 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);
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", {
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", {
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", {
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", {
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();
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", {
execute: function() {
if (this.validate()) {
- var query = "?op=rpc&subop=verifyRegexp®_exp=" +
+ var query = "?op=rpc&method=verifyRegexp®_exp=" +
param_escape(dialog.attr('value').reg_exp);
notify_progress("Verifying regular expression...");
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", {
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", {
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", {
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);
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);
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", {
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,
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);
} });
}
-function selectTab(id, noupdate, subop) {
+function selectTab(id, noupdate, method) {
try {
if (!noupdate) {
notify_progress("Loading, please wait...");
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);
}
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);
} });
if (ok) {
- query = "?op=pref-prefs&subop=reset-config";
+ query = "?op=pref-prefs&method=reset-config";
console.log(query);
new Ajax.Request("backend.php", {
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();
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", {
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", {
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", {
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,
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,
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", {
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,
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", {
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", {
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", {
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", {
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", {
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,
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,
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();
} });
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();
} });
new Ajax.Request("backend.php", {
parameters: {
op: 'pref-feeds',
- subop: 'renamecat',
+ method: 'renamecat',
id: id,
title: new_name,
},
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"))
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);
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,
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)
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"))
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)
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", {
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) {
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" } );
},
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...");
}
}
-function viewCurrentFeed(subop) {
+function viewCurrentFeed(method) {
if (getActiveFeedId() != undefined) {
- viewfeed(getActiveFeedId(), subop, activeFeedIsCat());
+ viewfeed(getActiveFeedId(), method, activeFeedIsCat());
}
return false; // block unneeded form submits
}
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;
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);
} });
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);
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) {
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,
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,
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,
return;
}
- var query = "?op=rpc&subop=scheduleFeedUpdate&id=" +
+ var query = "?op=rpc&method=scheduleFeedUpdate&id=" +
param_escape(id) +
"&is_cat=" + param_escape(is_cat);
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);
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 + "¬e=" + param_escape(note);
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...");
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);
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);
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...");
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", {
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", {
return;
}
- query = "?op=rpc&subop=delete&ids=" + param_escape(rows);
+ query = "?op=rpc&method=delete&ids=" + param_escape(rows);
console.log(query);
return;
}
- query = "?op=rpc&subop="+op+"&ids=" + param_escape(rows);
+ query = "?op=rpc&method="+op+"&ids=" + param_escape(rows);
console.log(query);
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" });
});
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", {
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", {
$("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);
} 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);
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" });
});
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" });
}); */
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", {
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);
<?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;
}
// Silent
- if ($subop == "remprofiles") {
+ if ($method == "remprofiles") {
$ids = explode(",", db_escape_string(trim($_REQUEST["ids"])));
foreach ($ids as $id) {
}
// Silent
- if ($subop == "addprofile") {
+ if ($method == "addprofile") {
$title = db_escape_string(trim($_REQUEST["title"]));
if ($title) {
db_query($link, "BEGIN");
}
// Silent
- if ($subop == "saveprofile") {
+ if ($method == "saveprofile") {
$id = db_escape_string($_REQUEST["id"]);
$title = db_escape_string(trim($_REQUEST["value"]));
}
// 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")));
}
?>
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>";
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']);
return;
}
- if ($subop == "remtwitterinfo") {
+ if ($method == "remtwitterinfo") {
db_query($link, "UPDATE ttrss_users SET twitter_oauth = NULL
WHERE id = " . $_SESSION['uid']);
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\"
}
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\"
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
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"]);
return;
}
- if ($subop == "edit") {
+ if ($method == "edit") {
$id = db_escape_string($_REQUEST["id"]);
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"]);
<?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
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>";
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\"
global $access_level_names;
- $subop = $_REQUEST["subop"];
+ $method = $_REQUEST["method"];
$prefs_blacklist = array("HIDE_READ_FEEDS", "FEEDS_SORT_BY_UNREAD",
"STRIP_UNSAFE_TAGS");
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"];
return;
- } else if ($subop == "save-config") {
+ } else if ($method == "save-config") {
# $_SESSION["prefs_op_result"] = "save-config";
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> ";
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 {
init_connection($link);
- $subop = $_REQUEST["subop"];
+ $method = $_REQUEST["method"];
$mode = $_REQUEST["mode"];
if ((!$op || $op == "rss" || $op == "dlg") && !$_REQUEST["noxml"]) {