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