mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2026-02-10 16:01:33 +00:00
subop -> method
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
<?php
|
||||
function handle_rpc_request($link) {
|
||||
|
||||
$subop = $_REQUEST["subop"];
|
||||
$method = $_REQUEST["method"];
|
||||
$seq = (int) $_REQUEST["seq"];
|
||||
|
||||
// Silent
|
||||
if ($subop == "setprofile") {
|
||||
if ($method == "setprofile") {
|
||||
$id = db_escape_string($_REQUEST["id"]);
|
||||
|
||||
$_SESSION["profile"] = $id;
|
||||
@@ -14,7 +14,7 @@
|
||||
}
|
||||
|
||||
// Silent
|
||||
if ($subop == "remprofiles") {
|
||||
if ($method == "remprofiles") {
|
||||
$ids = explode(",", db_escape_string(trim($_REQUEST["ids"])));
|
||||
|
||||
foreach ($ids as $id) {
|
||||
@@ -27,7 +27,7 @@
|
||||
}
|
||||
|
||||
// Silent
|
||||
if ($subop == "addprofile") {
|
||||
if ($method == "addprofile") {
|
||||
$title = db_escape_string(trim($_REQUEST["title"]));
|
||||
if ($title) {
|
||||
db_query($link, "BEGIN");
|
||||
@@ -58,7 +58,7 @@
|
||||
}
|
||||
|
||||
// Silent
|
||||
if ($subop == "saveprofile") {
|
||||
if ($method == "saveprofile") {
|
||||
$id = db_escape_string($_REQUEST["id"]);
|
||||
$title = db_escape_string(trim($_REQUEST["value"]));
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
}
|
||||
|
||||
// Silent
|
||||
if ($subop == "remarchive") {
|
||||
if ($method == "remarchive") {
|
||||
$ids = explode(",", db_escape_string($_REQUEST["ids"]));
|
||||
|
||||
foreach ($ids as $id) {
|
||||
@@ -104,7 +104,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
if ($subop == "addfeed") {
|
||||
if ($method == "addfeed") {
|
||||
$feed = db_escape_string($_REQUEST['feed']);
|
||||
$cat = db_escape_string($_REQUEST['cat']);
|
||||
$login = db_escape_string($_REQUEST['login']);
|
||||
@@ -118,7 +118,7 @@
|
||||
|
||||
}
|
||||
|
||||
if ($subop == "extractfeedurls") {
|
||||
if ($method == "extractfeedurls") {
|
||||
|
||||
$urls = get_feeds_from_html($_REQUEST['url']);
|
||||
|
||||
@@ -126,7 +126,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
if ($subop == "togglepref") {
|
||||
if ($method == "togglepref") {
|
||||
$key = db_escape_string($_REQUEST["key"]);
|
||||
set_pref($link, $key, !get_pref($link, $key));
|
||||
$value = get_pref($link, $key);
|
||||
@@ -135,7 +135,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
if ($subop == "setpref") {
|
||||
if ($method == "setpref") {
|
||||
$value = str_replace("\n", "<br/>", $_REQUEST['value']);
|
||||
|
||||
$key = db_escape_string($_REQUEST["key"]);
|
||||
@@ -147,7 +147,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
if ($subop == "mark") {
|
||||
if ($method == "mark") {
|
||||
$mark = $_REQUEST["mark"];
|
||||
$id = db_escape_string($_REQUEST["id"]);
|
||||
|
||||
@@ -164,7 +164,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
if ($subop == "delete") {
|
||||
if ($method == "delete") {
|
||||
$ids = db_escape_string($_REQUEST["ids"]);
|
||||
|
||||
$result = db_query($link, "DELETE FROM ttrss_user_entries
|
||||
@@ -174,7 +174,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
if ($subop == "unarchive") {
|
||||
if ($method == "unarchive") {
|
||||
$ids = db_escape_string($_REQUEST["ids"]);
|
||||
|
||||
$result = db_query($link, "UPDATE ttrss_user_entries
|
||||
@@ -185,7 +185,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
if ($subop == "archive") {
|
||||
if ($method == "archive") {
|
||||
$ids = explode(",", db_escape_string($_REQUEST["ids"]));
|
||||
|
||||
foreach ($ids as $id) {
|
||||
@@ -196,7 +196,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
if ($subop == "publ") {
|
||||
if ($method == "publ") {
|
||||
$pub = $_REQUEST["pub"];
|
||||
$id = db_escape_string($_REQUEST["id"]);
|
||||
$note = trim(strip_tags(db_escape_string($_REQUEST["note"])));
|
||||
@@ -229,13 +229,13 @@
|
||||
}
|
||||
|
||||
// Silent
|
||||
/* if ($subop == "update") {
|
||||
/* if ($method == "update") {
|
||||
$feed_id = db_escape_string($_REQUEST["feed"]);
|
||||
update_rss_feed($link, $feed_id);
|
||||
return;
|
||||
} */
|
||||
|
||||
if ($subop == "updateAllFeeds" || $subop == "getAllCounters") {
|
||||
if ($method == "updateAllFeeds" || $method == "getAllCounters") {
|
||||
$last_article_id = (int) $_REQUEST["last_article_id"];
|
||||
|
||||
$reply = array();
|
||||
@@ -259,7 +259,7 @@
|
||||
}
|
||||
|
||||
/* GET["cmode"] = 0 - mark as read, 1 - as unread, 2 - toggle */
|
||||
if ($subop == "catchupSelected") {
|
||||
if ($method == "catchupSelected") {
|
||||
$ids = explode(",", db_escape_string($_REQUEST["ids"]));
|
||||
$cmode = sprintf("%d", $_REQUEST["cmode"]);
|
||||
|
||||
@@ -269,7 +269,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
if ($subop == "markSelected") {
|
||||
if ($method == "markSelected") {
|
||||
$ids = explode(",", db_escape_string($_REQUEST["ids"]));
|
||||
$cmode = sprintf("%d", $_REQUEST["cmode"]);
|
||||
|
||||
@@ -279,7 +279,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
if ($subop == "publishSelected") {
|
||||
if ($method == "publishSelected") {
|
||||
$ids = explode(",", db_escape_string($_REQUEST["ids"]));
|
||||
$cmode = sprintf("%d", $_REQUEST["cmode"]);
|
||||
|
||||
@@ -289,7 +289,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
if ($subop == "sanityCheck") {
|
||||
if ($method == "sanityCheck") {
|
||||
$_SESSION["hasAudio"] = $_REQUEST["hasAudio"] === "true";
|
||||
|
||||
$reply = array();
|
||||
@@ -305,7 +305,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
if ($subop == "setArticleTags") {
|
||||
if ($method == "setArticleTags") {
|
||||
global $memcache;
|
||||
|
||||
$id = db_escape_string($_REQUEST["id"]);
|
||||
@@ -377,7 +377,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
if ($subop == "regenOPMLKey") {
|
||||
if ($method == "regenOPMLKey") {
|
||||
update_feed_access_key($link, 'OPML:Publish',
|
||||
false, $_SESSION["uid"]);
|
||||
|
||||
@@ -387,7 +387,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
if ($subop == "completeTags") {
|
||||
if ($method == "completeTags") {
|
||||
$search = db_escape_string($_REQUEST["search"]);
|
||||
|
||||
$result = db_query($link, "SELECT DISTINCT tag_name FROM ttrss_tags
|
||||
@@ -404,7 +404,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
if ($subop == "purge") {
|
||||
if ($method == "purge") {
|
||||
$ids = explode(",", db_escape_string($_REQUEST["ids"]));
|
||||
$days = sprintf("%d", $_REQUEST["days"]);
|
||||
|
||||
@@ -421,7 +421,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
/* if ($subop == "setScore") {
|
||||
/* if ($method == "setScore") {
|
||||
$id = db_escape_string($_REQUEST["id"]);
|
||||
$score = sprintf("%d", $_REQUEST["score"]);
|
||||
|
||||
@@ -434,7 +434,7 @@
|
||||
|
||||
} */
|
||||
|
||||
if ($subop == "getArticles") {
|
||||
if ($method == "getArticles") {
|
||||
$ids = explode(",", db_escape_string($_REQUEST["ids"]));
|
||||
$articles = array();
|
||||
|
||||
@@ -448,7 +448,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
if ($subop == "checkDate") {
|
||||
if ($method == "checkDate") {
|
||||
$date = db_escape_string($_REQUEST["date"]);
|
||||
$date_parsed = strtotime($date);
|
||||
|
||||
@@ -457,7 +457,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
if ($subop == "assignToLabel" || $subop == "removeFromLabel") {
|
||||
if ($method == "assignToLabel" || $method == "removeFromLabel") {
|
||||
$reply = array();
|
||||
|
||||
$ids = explode(",", db_escape_string($_REQUEST["ids"]));
|
||||
@@ -472,7 +472,7 @@
|
||||
|
||||
foreach ($ids as $id) {
|
||||
|
||||
if ($subop == "assignToLabel")
|
||||
if ($method == "assignToLabel")
|
||||
label_add_article($link, $id, $label, $_SESSION["uid"]);
|
||||
else
|
||||
label_remove_article($link, $id, $label, $_SESSION["uid"]);
|
||||
@@ -492,7 +492,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
if ($subop == "updateFeedBrowser") {
|
||||
if ($method == "updateFeedBrowser") {
|
||||
$search = db_escape_string($_REQUEST["search"]);
|
||||
$limit = db_escape_string($_REQUEST["limit"]);
|
||||
$mode = (int) db_escape_string($_REQUEST["mode"]);
|
||||
@@ -504,7 +504,7 @@
|
||||
}
|
||||
|
||||
// Silent
|
||||
if ($subop == "massSubscribe") {
|
||||
if ($method == "massSubscribe") {
|
||||
|
||||
$payload = json_decode($_REQUEST["payload"], false);
|
||||
$mode = $_REQUEST["mode"];
|
||||
@@ -592,7 +592,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
if ($subop == "digest-get-contents") {
|
||||
if ($method == "digest-get-contents") {
|
||||
$article_id = db_escape_string($_REQUEST['article_id']);
|
||||
|
||||
$result = db_query($link, "SELECT content,title,link,marked,published
|
||||
@@ -614,7 +614,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
if ($subop == "digest-update") {
|
||||
if ($method == "digest-update") {
|
||||
$feed_id = db_escape_string($_REQUEST['feed_id']);
|
||||
$offset = db_escape_string($_REQUEST['offset']);
|
||||
$seq = db_escape_string($_REQUEST['seq']);
|
||||
@@ -640,7 +640,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
if ($subop == "digest-init") {
|
||||
if ($method == "digest-init") {
|
||||
$tmp_feeds = api_get_feeds($link, -4, true, false, 0);
|
||||
|
||||
$feeds = array();
|
||||
@@ -654,7 +654,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
if ($subop == "catchupFeed") {
|
||||
if ($method == "catchupFeed") {
|
||||
$feed_id = db_escape_string($_REQUEST['feed_id']);
|
||||
$is_cat = db_escape_string($_REQUEST['is_cat']) == "true";
|
||||
|
||||
@@ -664,7 +664,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
if ($subop == "sendEmail") {
|
||||
if ($method == "sendEmail") {
|
||||
$secretkey = $_REQUEST['secretkey'];
|
||||
|
||||
require_once 'lib/phpmailer/class.phpmailer.php';
|
||||
@@ -723,7 +723,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
if ($subop == "completeEmails") {
|
||||
if ($method == "completeEmails") {
|
||||
$search = db_escape_string($_REQUEST["search"]);
|
||||
|
||||
print "<ul>";
|
||||
@@ -739,7 +739,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
if ($subop == "quickAddCat") {
|
||||
if ($method == "quickAddCat") {
|
||||
$cat = db_escape_string($_REQUEST["cat"]);
|
||||
|
||||
add_feed_category($link, $cat);
|
||||
@@ -758,7 +758,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
if ($subop == "regenFeedKey") {
|
||||
if ($method == "regenFeedKey") {
|
||||
$feed_id = db_escape_string($_REQUEST['id']);
|
||||
$is_cat = db_escape_string($_REQUEST['is_cat']) == "true";
|
||||
|
||||
@@ -769,7 +769,7 @@
|
||||
}
|
||||
|
||||
// Silent
|
||||
if ($subop == "clearKeys") {
|
||||
if ($method == "clearKeys") {
|
||||
db_query($link, "DELETE FROM ttrss_access_keys WHERE
|
||||
owner_uid = " . $_SESSION["uid"]);
|
||||
|
||||
@@ -777,7 +777,7 @@
|
||||
}
|
||||
|
||||
// Silent
|
||||
if ($subop == "clearArticleKeys") {
|
||||
if ($method == "clearArticleKeys") {
|
||||
db_query($link, "UPDATE ttrss_user_entries SET uuid = '' WHERE
|
||||
owner_uid = " . $_SESSION["uid"]);
|
||||
|
||||
@@ -785,7 +785,7 @@
|
||||
}
|
||||
|
||||
|
||||
if ($subop == "verifyRegexp") {
|
||||
if ($method == "verifyRegexp") {
|
||||
$reg_exp = $_REQUEST["reg_exp"];
|
||||
|
||||
$status = @preg_match("/$reg_exp/i", "TEST") !== false;
|
||||
@@ -795,7 +795,7 @@
|
||||
}
|
||||
|
||||
// TODO: unify with digest-get-contents?
|
||||
if ($subop == "cdmGetArticle") {
|
||||
if ($method == "cdmGetArticle") {
|
||||
$ids = array(db_escape_string($_REQUEST["id"]));
|
||||
$cids = explode(",", $_REQUEST["cids"]);
|
||||
|
||||
@@ -829,7 +829,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
if ($subop == "scheduleFeedUpdate") {
|
||||
if ($method == "scheduleFeedUpdate") {
|
||||
$feed_id = db_escape_string($_REQUEST["id"]);
|
||||
$is_cat = db_escape_string($_REQUEST['is_cat']) == 'true';
|
||||
|
||||
@@ -865,7 +865,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
if ($subop == "getTweetInfo") {
|
||||
if ($method == "getTweetInfo") {
|
||||
$id = db_escape_string($_REQUEST['id']);
|
||||
|
||||
$result = db_query($link, "SELECT title, link
|
||||
@@ -884,7 +884,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
if ($subop == "setNote") {
|
||||
if ($method == "setNote") {
|
||||
$id = db_escape_string($_REQUEST["id"]);
|
||||
$note = trim(strip_tags(db_escape_string($_REQUEST["note"])));
|
||||
|
||||
@@ -898,7 +898,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
if ($subop == "genHash") {
|
||||
if ($method == "genHash") {
|
||||
$hash = sha1(uniqid(rand(), true));
|
||||
|
||||
print json_encode(array("hash" => $hash));
|
||||
@@ -906,6 +906,6 @@
|
||||
}
|
||||
|
||||
print json_encode(array("error" => array("code" => 7,
|
||||
"message" => "Unknown method: $subop")));
|
||||
"message" => "Unknown method: $method")));
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -141,7 +141,7 @@
|
||||
var elem = this;
|
||||
dojo.xhrPost({
|
||||
url: 'backend.php',
|
||||
content: {op: 'rpc', subop: 'saveprofile',
|
||||
content: {op: 'rpc', method: 'saveprofile',
|
||||
value: this.value,
|
||||
id: this.srcNodeRef.getAttribute('profile-id')},
|
||||
load: function(response) {
|
||||
@@ -242,7 +242,7 @@
|
||||
if ($id == "quickAddFeed") {
|
||||
|
||||
print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"op\" value=\"rpc\">";
|
||||
print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"subop\" value=\"addfeed\">";
|
||||
print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"method\" value=\"addfeed\">";
|
||||
|
||||
print "<div class=\"dlgSec\">".__("Feed")."</div>";
|
||||
print "<div class=\"dlgSecCont\">";
|
||||
@@ -312,7 +312,7 @@
|
||||
# name='feed_browser' id='feed_browser'>";
|
||||
|
||||
print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"op\" value=\"rpc\">";
|
||||
print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"subop\" value=\"updateFeedBrowser\">";
|
||||
print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"method\" value=\"updateFeedBrowser\">";
|
||||
|
||||
print "<div dojoType=\"dijit.Toolbar\">
|
||||
<div style='float : right'>
|
||||
@@ -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=\"quiet\" value=\"1\">";
|
||||
print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"subop\" value=\"add\">";
|
||||
print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"method\" value=\"add\">";
|
||||
|
||||
$result = db_query($link, "SELECT id,description
|
||||
FROM ttrss_filter_types ORDER BY description");
|
||||
@@ -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=\"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>";
|
||||
|
||||
@@ -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=\"op\" value=\"rpc\">";
|
||||
print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"subop\" value=\"sendEmail\">";
|
||||
print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"method\" value=\"sendEmail\">";
|
||||
|
||||
$result = db_query($link, "SELECT email, full_name FROM ttrss_users WHERE
|
||||
id = " . $_SESSION["uid"]);
|
||||
@@ -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 "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"op\" value=\"rpc\">";
|
||||
print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"subop\" value=\"setpref\">";
|
||||
print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"method\" value=\"setpref\">";
|
||||
print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"key\" value=\"USER_STYLESHEET\">";
|
||||
|
||||
print "<table width='100%'><tr><td>";
|
||||
@@ -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=\"op\" value=\"rpc\">";
|
||||
print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"subop\" value=\"setNote\">";
|
||||
print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"method\" value=\"setNote\">";
|
||||
|
||||
print "<table width='100%'><tr><td>";
|
||||
print "<textarea dojoType=\"dijit.form.SimpleTextarea\"
|
||||
@@ -1025,7 +1025,7 @@
|
||||
if ($id == "addInstance") {
|
||||
|
||||
print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"op\" value=\"pref-instances\">";
|
||||
print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"subop\" value=\"add\">";
|
||||
print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"method\" value=\"add\">";
|
||||
|
||||
print "<div class=\"dlgSec\">".__("Instance")."</div>";
|
||||
|
||||
|
||||
@@ -11,11 +11,11 @@
|
||||
global $purge_intervals;
|
||||
global $update_methods;
|
||||
|
||||
$subop = $_REQUEST["subop"];
|
||||
$method = $_REQUEST["method"];
|
||||
$quiet = $_REQUEST["quiet"];
|
||||
$mode = $_REQUEST["mode"];
|
||||
|
||||
if ($subop == "renamecat") {
|
||||
if ($method == "renamecat") {
|
||||
$title = db_escape_string($_REQUEST['title']);
|
||||
$id = db_escape_string($_REQUEST['id']);
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
if ($subop == "remtwitterinfo") {
|
||||
if ($method == "remtwitterinfo") {
|
||||
|
||||
db_query($link, "UPDATE ttrss_users SET twitter_oauth = NULL
|
||||
WHERE id = " . $_SESSION['uid']);
|
||||
@@ -34,7 +34,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
if ($subop == "getfeedtree") {
|
||||
if ($method == "getfeedtree") {
|
||||
|
||||
$search = $_SESSION["prefs_feed_search"];
|
||||
|
||||
@@ -160,19 +160,19 @@
|
||||
return;
|
||||
}
|
||||
|
||||
if ($subop == "catsortreset") {
|
||||
if ($method == "catsortreset") {
|
||||
db_query($link, "UPDATE ttrss_feed_categories
|
||||
SET order_id = 0 WHERE owner_uid = " . $_SESSION["uid"]);
|
||||
return;
|
||||
}
|
||||
|
||||
if ($subop == "feedsortreset") {
|
||||
if ($method == "feedsortreset") {
|
||||
db_query($link, "UPDATE ttrss_feeds
|
||||
SET order_id = 0 WHERE owner_uid = " . $_SESSION["uid"]);
|
||||
return;
|
||||
}
|
||||
|
||||
if ($subop == "savefeedorder") {
|
||||
if ($method == "savefeedorder") {
|
||||
# if ($_POST['payload']) {
|
||||
# file_put_contents("/tmp/blahblah.txt", $_POST['payload']);
|
||||
# $data = json_decode($_POST['payload'], true);
|
||||
@@ -239,7 +239,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
if ($subop == "removeicon") {
|
||||
if ($method == "removeicon") {
|
||||
$feed_id = db_escape_string($_REQUEST["feed_id"]);
|
||||
|
||||
$result = db_query($link, "SELECT id FROM ttrss_feeds
|
||||
@@ -252,7 +252,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
if ($subop == "uploadicon") {
|
||||
if ($method == "uploadicon") {
|
||||
$icon_file = $_FILES['icon_file']['tmp_name'];
|
||||
$feed_id = db_escape_string($_REQUEST["feed_id"]);
|
||||
|
||||
@@ -282,7 +282,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
if ($subop == "editfeed") {
|
||||
if ($method == "editfeed") {
|
||||
|
||||
$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=\"op\" value=\"pref-feeds\">";
|
||||
print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"subop\" value=\"editSave\">";
|
||||
print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"method\" value=\"editSave\">";
|
||||
|
||||
print "<div class=\"dlgSec\">".__("Feed")."</div>";
|
||||
print "<div class=\"dlgSecCont\">";
|
||||
@@ -513,7 +513,7 @@
|
||||
<input id=\"icon_file\" size=\"10\" name=\"icon_file\" type=\"file\">
|
||||
<input type=\"hidden\" name=\"op\" value=\"pref-feeds\">
|
||||
<input type=\"hidden\" name=\"feed_id\" value=\"$feed_id\">
|
||||
<input type=\"hidden\" name=\"subop\" value=\"uploadicon\">
|
||||
<input type=\"hidden\" name=\"method\" value=\"uploadicon\">
|
||||
<button dojoType=\"dijit.form.Button\" onclick=\"return uploadFeedIcon();\"
|
||||
type=\"submit\">".__('Replace')."</button>
|
||||
<button dojoType=\"dijit.form.Button\" onclick=\"return removeFeedIcon($feed_id);\"
|
||||
@@ -550,13 +550,13 @@
|
||||
return;
|
||||
}
|
||||
|
||||
if ($subop == "editfeeds") {
|
||||
if ($method == "editfeeds") {
|
||||
|
||||
$feed_ids = db_escape_string($_REQUEST["ids"]);
|
||||
|
||||
print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"ids\" value=\"$feed_ids\">";
|
||||
print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"op\" value=\"pref-feeds\">";
|
||||
print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"subop\" value=\"batchEditSave\">";
|
||||
print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"method\" value=\"batchEditSave\">";
|
||||
|
||||
print "<div class=\"dlgSec\">".__("Feed")."</div>";
|
||||
print "<div class=\"dlgSecCont\">";
|
||||
@@ -707,7 +707,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
if ($subop == "editSave" || $subop == "batchEditSave") {
|
||||
if ($method == "editSave" || $method == "batchEditSave") {
|
||||
|
||||
$feed_title = db_escape_string(trim($_POST["title"]));
|
||||
$feed_link = db_escape_string(trim($_POST["feed_url"]));
|
||||
@@ -754,7 +754,7 @@
|
||||
$cache_images_qpart = "";
|
||||
}
|
||||
|
||||
if ($subop == "editSave") {
|
||||
if ($method == "editSave") {
|
||||
|
||||
$result = db_query($link, "UPDATE ttrss_feeds SET
|
||||
$category_qpart
|
||||
@@ -773,11 +773,11 @@
|
||||
update_method = '$update_method'
|
||||
WHERE id = '$feed_id' AND owner_uid = " . $_SESSION["uid"]);
|
||||
|
||||
} else if ($subop == "batchEditSave") {
|
||||
} else if ($method == "batchEditSave") {
|
||||
$feed_data = array();
|
||||
|
||||
foreach (array_keys($_POST) as $k) {
|
||||
if ($k != "op" && $k != "subop" && $k != "ids") {
|
||||
if ($k != "op" && $k != "method" && $k != "ids") {
|
||||
$feed_data[$k] = $_POST[$k];
|
||||
}
|
||||
}
|
||||
@@ -864,7 +864,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
if ($subop == "resetPubSub") {
|
||||
if ($method == "resetPubSub") {
|
||||
|
||||
$ids = db_escape_string($_REQUEST["ids"]);
|
||||
|
||||
@@ -874,7 +874,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
if ($subop == "remove") {
|
||||
if ($method == "remove") {
|
||||
|
||||
$ids = split(",", db_escape_string($_REQUEST["ids"]));
|
||||
|
||||
@@ -885,12 +885,12 @@
|
||||
return;
|
||||
}
|
||||
|
||||
if ($subop == "clear") {
|
||||
if ($method == "clear") {
|
||||
$id = db_escape_string($_REQUEST["id"]);
|
||||
clear_feed_articles($link, $id);
|
||||
}
|
||||
|
||||
if ($subop == "rescore") {
|
||||
if ($method == "rescore") {
|
||||
$ids = split(",", db_escape_string($_REQUEST["ids"]));
|
||||
|
||||
foreach ($ids as $id) {
|
||||
@@ -943,7 +943,7 @@
|
||||
|
||||
}
|
||||
|
||||
if ($subop == "rescoreAll") {
|
||||
if ($method == "rescoreAll") {
|
||||
|
||||
$result = db_query($link,
|
||||
"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"]));
|
||||
$cat_id = db_escape_string($_REQUEST["cat_id"]);
|
||||
@@ -1052,7 +1052,7 @@
|
||||
print "<form action=\"backend.php\">";
|
||||
print "<input type=\"hidden\" name=\"op\" value=\"pref-feeds\">";
|
||||
print "<input type=\"hidden\" name=\"quiet\" value=\"1\">";
|
||||
print "<input type=\"hidden\" name=\"subop\" value=\"add\">";
|
||||
print "<input type=\"hidden\" name=\"method\" value=\"add\">";
|
||||
|
||||
print "<select name=\"feed_url\">";
|
||||
|
||||
@@ -1086,8 +1086,8 @@
|
||||
print "<form method=\"GET\" style='display: inline'
|
||||
action=\"$tp_uri\">
|
||||
<input type=\"hidden\" name=\"tab\" value=\"feedConfig\">
|
||||
<input type=\"hidden\" name=\"subop\" value=\"editFeed\">
|
||||
<input type=\"hidden\" name=\"subopparam\" value=\"$feed_id\">
|
||||
<input type=\"hidden\" name=\"method\" value=\"editFeed\">
|
||||
<input type=\"hidden\" name=\"methodparam\" value=\"$feed_id\">
|
||||
<input type=\"submit\" value=\"".__("Edit subscription options")."\">
|
||||
</form>";
|
||||
}
|
||||
@@ -1101,7 +1101,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
if ($subop == "categorize") {
|
||||
if ($method == "categorize") {
|
||||
|
||||
|
||||
$ids = split(",", db_escape_string($_REQUEST["ids"]));
|
||||
@@ -1128,7 +1128,7 @@
|
||||
|
||||
}
|
||||
|
||||
if ($subop == "editCats") {
|
||||
if ($method == "editCats") {
|
||||
|
||||
$action = $_REQUEST["action"];
|
||||
|
||||
@@ -1232,7 +1232,7 @@
|
||||
var elem = this;
|
||||
dojo.xhrPost({
|
||||
url: 'backend.php',
|
||||
content: {op: 'pref-feeds', subop: 'editCats',
|
||||
content: {op: 'pref-feeds', method: 'editCats',
|
||||
action: 'save',
|
||||
value: this.value,
|
||||
cid: this.srcNodeRef.getAttribute('cat-id')},
|
||||
@@ -1401,7 +1401,7 @@
|
||||
__("Loading, please wait...")."</div>";
|
||||
|
||||
print "<div dojoType=\"fox.PrefFeedStore\" jsId=\"feedStore\"
|
||||
url=\"backend.php?op=pref-feeds&subop=getfeedtree\">
|
||||
url=\"backend.php?op=pref-feeds&method=getfeedtree\">
|
||||
</div>
|
||||
<div dojoType=\"lib.CheckBoxStoreModel\" jsId=\"feedModel\" store=\"feedStore\"
|
||||
query=\"{id:'root'}\" rootId=\"root\" rootLabel=\"Feeds\"
|
||||
|
||||
@@ -81,10 +81,10 @@
|
||||
}
|
||||
|
||||
function module_pref_filters($link) {
|
||||
$subop = $_REQUEST["subop"];
|
||||
$method = $_REQUEST["method"];
|
||||
$quiet = $_REQUEST["quiet"];
|
||||
|
||||
if ($subop == "getfiltertree") {
|
||||
if ($method == "getfiltertree") {
|
||||
$root = array();
|
||||
$root['id'] = 'root';
|
||||
$root['name'] = __('Filters');
|
||||
@@ -183,7 +183,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
if ($subop == "edit") {
|
||||
if ($method == "edit") {
|
||||
|
||||
$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=\"id\" value=\"$filter_id\">";
|
||||
print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"subop\" value=\"editSave\">";
|
||||
print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"method\" value=\"editSave\">";
|
||||
|
||||
$result = db_query($link, "SELECT id,description
|
||||
FROM ttrss_filter_types ORDER BY description");
|
||||
@@ -345,7 +345,7 @@
|
||||
}
|
||||
|
||||
|
||||
if ($subop == "editSave") {
|
||||
if ($method == "editSave") {
|
||||
|
||||
global $memcache;
|
||||
|
||||
@@ -410,7 +410,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
if ($subop == "remove") {
|
||||
if ($method == "remove") {
|
||||
|
||||
if ($memcache) $memcache->flush();
|
||||
|
||||
@@ -422,7 +422,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
if ($subop == "add") {
|
||||
if ($method == "add") {
|
||||
|
||||
if ($memcache) $memcache->flush();
|
||||
|
||||
@@ -550,7 +550,7 @@
|
||||
__("Loading, please wait...")."</div>";
|
||||
|
||||
print "<div dojoType=\"dojo.data.ItemFileWriteStore\" jsId=\"filterStore\"
|
||||
url=\"backend.php?op=pref-filters&subop=getfiltertree\">
|
||||
url=\"backend.php?op=pref-filters&method=getfiltertree\">
|
||||
</div>
|
||||
<div dojoType=\"lib.CheckBoxStoreModel\" jsId=\"filterModel\" store=\"filterStore\"
|
||||
query=\"{id:'root'}\" rootId=\"root\" rootLabel=\"Feeds\"
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
return;
|
||||
}
|
||||
|
||||
$subop = $_REQUEST['subop'];
|
||||
$method = $_REQUEST['method'];
|
||||
|
||||
if ($subop == "remove") {
|
||||
if ($method == "remove") {
|
||||
$ids = db_escape_string($_REQUEST['ids']);
|
||||
|
||||
db_query($link, "DELETE FROM ttrss_linked_instances WHERE
|
||||
@@ -17,7 +17,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
if ($subop == "add") {
|
||||
if ($method == "add") {
|
||||
$id = db_escape_string($_REQUEST["id"]);
|
||||
$access_url = db_escape_string($_REQUEST["access_url"]);
|
||||
$access_key = db_escape_string($_REQUEST["access_key"]);
|
||||
@@ -40,7 +40,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
if ($subop == "edit") {
|
||||
if ($method == "edit") {
|
||||
|
||||
$id = db_escape_string($_REQUEST["id"]);
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
|
||||
print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"id\" value=\"$id\">";
|
||||
print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"op\" value=\"pref-instances\">";
|
||||
print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"subop\" value=\"editSave\">";
|
||||
print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"method\" value=\"editSave\">";
|
||||
|
||||
print "<div class=\"dlgSec\">".__("Instance")."</div>";
|
||||
|
||||
@@ -100,7 +100,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
if ($subop == "editSave") {
|
||||
if ($method == "editSave") {
|
||||
$id = db_escape_string($_REQUEST["id"]);
|
||||
$access_url = db_escape_string($_REQUEST["access_url"]);
|
||||
$access_key = db_escape_string($_REQUEST["access_key"]);
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
function module_pref_labels($link) {
|
||||
|
||||
$subop = $_REQUEST["subop"];
|
||||
$method = $_REQUEST["method"];
|
||||
|
||||
if ($subop == "edit") {
|
||||
if ($method == "edit") {
|
||||
$label_id = db_escape_string($_REQUEST['id']);
|
||||
|
||||
$result = db_query($link, "SELECT * FROM ttrss_labels2 WHERE
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"id\" value=\"$label_id\">";
|
||||
print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"op\" value=\"pref-labels\">";
|
||||
print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"subop\" value=\"save\">";
|
||||
print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"method\" value=\"save\">";
|
||||
|
||||
print "<div class=\"dlgSec\">".__("Caption")."</div>";
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
if ($subop == "getlabeltree") {
|
||||
if ($method == "getlabeltree") {
|
||||
$root = array();
|
||||
$root['id'] = 'root';
|
||||
$root['name'] = __('Labels');
|
||||
@@ -116,7 +116,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
if ($subop == "color-set") {
|
||||
if ($method == "color-set") {
|
||||
$kind = db_escape_string($_REQUEST["kind"]);
|
||||
$ids = split(',', db_escape_string($_REQUEST["ids"]));
|
||||
$color = db_escape_string($_REQUEST["color"]);
|
||||
@@ -147,7 +147,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
if ($subop == "color-reset") {
|
||||
if ($method == "color-reset") {
|
||||
$ids = split(',', db_escape_string($_REQUEST["ids"]));
|
||||
|
||||
foreach ($ids as $id) {
|
||||
@@ -165,7 +165,7 @@
|
||||
|
||||
}
|
||||
|
||||
if ($subop == "save") {
|
||||
if ($method == "save") {
|
||||
|
||||
$id = db_escape_string($_REQUEST["id"]);
|
||||
$caption = db_escape_string(trim($_REQUEST["caption"]));
|
||||
@@ -210,7 +210,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
if ($subop == "remove") {
|
||||
if ($method == "remove") {
|
||||
|
||||
$ids = split(",", db_escape_string($_REQUEST["ids"]));
|
||||
|
||||
@@ -220,7 +220,7 @@
|
||||
|
||||
}
|
||||
|
||||
if ($subop == "add") {
|
||||
if ($method == "add") {
|
||||
$caption = db_escape_string($_REQUEST["caption"]);
|
||||
$output = db_escape_string($_REQUEST["output"]);
|
||||
|
||||
@@ -293,7 +293,7 @@
|
||||
__("Loading, please wait...")."</div>";
|
||||
|
||||
print "<div dojoType=\"dojo.data.ItemFileWriteStore\" jsId=\"labelStore\"
|
||||
url=\"backend.php?op=pref-labels&subop=getlabeltree\">
|
||||
url=\"backend.php?op=pref-labels&method=getlabeltree\">
|
||||
</div>
|
||||
<div dojoType=\"lib.CheckBoxStoreModel\" jsId=\"labelModel\" store=\"labelStore\"
|
||||
query=\"{id:'root'}\" rootId=\"root\"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
global $access_level_names;
|
||||
|
||||
$subop = $_REQUEST["subop"];
|
||||
$method = $_REQUEST["method"];
|
||||
|
||||
$prefs_blacklist = array("HIDE_READ_FEEDS", "FEEDS_SORT_BY_UNREAD",
|
||||
"STRIP_UNSAFE_TAGS");
|
||||
@@ -19,7 +19,7 @@
|
||||
array_push($prefs_blacklist, "PURGE_UNREAD_ARTICLES");
|
||||
} */
|
||||
|
||||
if ($subop == "change-password") {
|
||||
if ($method == "change-password") {
|
||||
|
||||
$old_pw = $_POST["old_password"];
|
||||
$new_pw = $_POST["new_password"];
|
||||
@@ -68,7 +68,7 @@
|
||||
|
||||
return;
|
||||
|
||||
} else if ($subop == "save-config") {
|
||||
} else if ($method == "save-config") {
|
||||
|
||||
# $_SESSION["prefs_op_result"] = "save-config";
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
|
||||
return;
|
||||
|
||||
} else if ($subop == "getHelp") {
|
||||
} else if ($method == "getHelp") {
|
||||
|
||||
$pref_name = db_escape_string($_REQUEST["pn"]);
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
printf(__("Unknown option: %s"), $pref_name);
|
||||
}
|
||||
|
||||
} else if ($subop == "change-email") {
|
||||
} else if ($method == "change-email") {
|
||||
|
||||
$email = db_escape_string($_POST["email"]);
|
||||
$full_name = db_escape_string($_POST["full_name"]);
|
||||
@@ -123,7 +123,7 @@
|
||||
|
||||
return;
|
||||
|
||||
} else if ($subop == "reset-config") {
|
||||
} else if ($method == "reset-config") {
|
||||
|
||||
$_SESSION["prefs_op_result"] = "reset-to-defaults";
|
||||
|
||||
@@ -194,7 +194,7 @@
|
||||
print "</table>";
|
||||
|
||||
print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"op\" value=\"pref-prefs\">";
|
||||
print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"subop\" value=\"change-email\">";
|
||||
print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"method\" value=\"change-email\">";
|
||||
|
||||
print "<p><button dojoType=\"dijit.form.Button\" type=\"submit\">".
|
||||
__("Save data")."</button>";
|
||||
@@ -252,7 +252,7 @@
|
||||
print "</table>";
|
||||
|
||||
print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"op\" value=\"pref-prefs\">";
|
||||
print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"subop\" value=\"change-password\">";
|
||||
print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"method\" value=\"change-password\">";
|
||||
|
||||
print "<p><button dojoType=\"dijit.form.Button\" type=\"submit\">".
|
||||
__("Change password")."</button>";
|
||||
@@ -488,7 +488,7 @@
|
||||
print '<div dojoType="dijit.layout.ContentPane" region="bottom">';
|
||||
|
||||
print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"op\" value=\"pref-prefs\">";
|
||||
print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"subop\" value=\"save-config\">";
|
||||
print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"method\" value=\"save-config\">";
|
||||
|
||||
print "<button dojoType=\"dijit.form.Button\" type=\"submit\">".
|
||||
__('Save configuration')."</button> ";
|
||||
|
||||
@@ -8,12 +8,12 @@
|
||||
return;
|
||||
}
|
||||
|
||||
$subop = $_REQUEST["subop"];
|
||||
$method = $_REQUEST["method"];
|
||||
|
||||
if ($subop == "user-details") {
|
||||
if ($method == "user-details") {
|
||||
|
||||
header("Content-Type: text/xml");
|
||||
print "<dlg id=\"$subop\">";
|
||||
print "<dlg id=\"$method\">";
|
||||
|
||||
$uid = sprintf("%d", $_REQUEST["id"]);
|
||||
|
||||
@@ -104,13 +104,13 @@
|
||||
return;
|
||||
}
|
||||
|
||||
if ($subop == "edit") {
|
||||
if ($method == "edit") {
|
||||
|
||||
header("Content-Type: text/xml");
|
||||
|
||||
$id = db_escape_string($_REQUEST["id"]);
|
||||
|
||||
print "<dlg id=\"$subop\">";
|
||||
print "<dlg id=\"$method\">";
|
||||
print "<title>".__('User Editor')."</title>";
|
||||
print "<content><![CDATA[";
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
|
||||
print "<input type=\"hidden\" name=\"id\" value=\"$id\">";
|
||||
print "<input type=\"hidden\" name=\"op\" value=\"pref-users\">";
|
||||
print "<input type=\"hidden\" name=\"subop\" value=\"editSave\">";
|
||||
print "<input type=\"hidden\" name=\"method\" value=\"editSave\">";
|
||||
|
||||
$result = db_query($link, "SELECT * FROM ttrss_users WHERE id = '$id'");
|
||||
|
||||
@@ -190,7 +190,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
if ($subop == "editSave") {
|
||||
if ($method == "editSave") {
|
||||
|
||||
if ($_SESSION["access_level"] >= 10) {
|
||||
|
||||
@@ -212,7 +212,7 @@
|
||||
access_level = '$access_level', email = '$email' WHERE id = '$uid'");
|
||||
|
||||
}
|
||||
} else if ($subop == "remove") {
|
||||
} else if ($method == "remove") {
|
||||
|
||||
if ($_SESSION["access_level"] >= 10) {
|
||||
|
||||
@@ -226,7 +226,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if ($subop == "add") {
|
||||
} else if ($method == "add") {
|
||||
|
||||
if ($_SESSION["access_level"] >= 10) {
|
||||
|
||||
@@ -265,7 +265,7 @@
|
||||
$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) {
|
||||
|
||||
@@ -449,7 +449,7 @@
|
||||
$uid = $line["id"];
|
||||
$edit_uid = $_REQUEST["id"];
|
||||
|
||||
if ($subop == "edit" && $uid != $edit_uid) {
|
||||
if ($method == "edit" && $uid != $edit_uid) {
|
||||
$class .= " Grayed";
|
||||
$this_row_id = "";
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user