break;
case "updateArticle":
- $article_id = (int) db_escape_string($_GET["article_id"]);
+ $article_id = (int) db_escape_string($_REQUEST["article_id"]);
$mode = (int) db_escape_string($_REQUEST["mode"]);
$field_raw = (int)db_escape_string($_REQUEST["field"]);
/* remove ill effects of magic quotes */
if (get_magic_quotes_gpc()) {
- $_GET = array_map('stripslashes', $_GET);
+ $_REQUEST = array_map('stripslashes', $_REQUEST);
$_POST = array_map('stripslashes', $_POST);
$_REQUEST = array_map('stripslashes', $_REQUEST);
$_COOKIE = array_map('stripslashes', $_COOKIE);
require_once "sessions.php";
require_once "modules/backend-rpc.php";
-/* if ($_GET["debug"]) {
+/* if ($_REQUEST["debug"]) {
define('DEFAULT_ERROR_LEVEL', E_ALL);
} else {
define('DEFAULT_ERROR_LEVEL', E_ERROR | E_WARNING | E_PARSE);
ob_start("ob_gzhandler");
}
- $tags = $_GET["tags"];
+ $tags = $_REQUEST["tags"];
- $subop = $_GET["subop"];
+ $subop = $_REQUEST["subop"];
switch($subop) {
case "catchupAll":
break;
case "collapse":
- $cat_id = db_escape_string($_GET["cid"]);
+ $cat_id = db_escape_string($_REQUEST["cid"]);
toggle_collapse_cat($link, $cat_id);
return;
break;
break;
case "catsort":
- $corder = db_escape_string($_GET["corder"]);
+ $corder = db_escape_string($_REQUEST["corder"]);
$cats = split(",", $corder);
case "view":
- $id = db_escape_string($_GET["id"]);
- $cids = split(",", db_escape_string($_GET["cids"]));
- $mode = db_escape_string($_GET["mode"]);
- $omode = db_escape_string($_GET["omode"]);
+ $id = db_escape_string($_REQUEST["id"]);
+ $cids = split(",", db_escape_string($_REQUEST["cids"]));
+ $mode = db_escape_string($_REQUEST["mode"]);
+ $omode = db_escape_string($_REQUEST["omode"]);
- $csync = $_GET["csync"];
+ $csync = $_REQUEST["csync"];
print "<reply>";
print "<reply>";
- if ($_GET["debug"]) $timing_info = print_checkpoint("0", $timing_info);
+ if ($_REQUEST["debug"]) $timing_info = print_checkpoint("0", $timing_info);
- $omode = db_escape_string($_GET["omode"]);
+ $omode = db_escape_string($_REQUEST["omode"]);
- $feed = db_escape_string($_GET["feed"]);
- $subop = db_escape_string($_GET["subop"]);
- $view_mode = db_escape_string($_GET["view_mode"]);
- $limit = db_escape_string($_GET["limit"]);
- $cat_view = db_escape_string($_GET["cat"]);
- $next_unread_feed = db_escape_string($_GET["nuf"]);
- $offset = db_escape_string($_GET["skip"]);
- $vgroup_last_feed = db_escape_string($_GET["vgrlf"]);
- $csync = $_GET["csync"];
- $order_by = db_escape_string($_GET["order_by"]);
+ $feed = db_escape_string($_REQUEST["feed"]);
+ $subop = db_escape_string($_REQUEST["subop"]);
+ $view_mode = db_escape_string($_REQUEST["view_mode"]);
+ $limit = db_escape_string($_REQUEST["limit"]);
+ $cat_view = db_escape_string($_REQUEST["cat"]);
+ $next_unread_feed = db_escape_string($_REQUEST["nuf"]);
+ $offset = db_escape_string($_REQUEST["skip"]);
+ $vgroup_last_feed = db_escape_string($_REQUEST["vgrlf"]);
+ $csync = $_REQUEST["csync"];
+ $order_by = db_escape_string($_REQUEST["order_by"]);
/* Updating a label ccache means recalculating all of the caches
* so for performance reasons we don't do that here */
print "<headlines-unread value=\"$headlines_unread\"/>";
printf("<disable-cache value=\"%d\"/>", $disable_cache);
- if ($_GET["debug"]) $timing_info = print_checkpoint("10", $timing_info);
+ if ($_REQUEST["debug"]) $timing_info = print_checkpoint("10", $timing_info);
if (is_array($topmost_article_ids) && !get_pref($link, 'COMBINED_DISPLAY_MODE') && !$_SESSION["bw_limit"]) {
print "<articles>";
print "</articles>";
}
- if ($_GET["debug"]) $timing_info = print_checkpoint("20", $timing_info);
+ if ($_REQUEST["debug"]) $timing_info = print_checkpoint("20", $timing_info);
// if (get_pref($link, "SYNC_COUNTERS") ||
}
}
- if ($_GET["debug"]) $timing_info = print_checkpoint("30", $timing_info);
+ if ($_REQUEST["debug"]) $timing_info = print_checkpoint("30", $timing_info);
print_runtime_info($link);
break; // pref-feed-browser
case "publish":
- $key = db_escape_string($_GET["key"]);
- $limit = (int)db_escape_string($_GET["limit"]);
+ $key = db_escape_string($_REQUEST["key"]);
+ $limit = (int)db_escape_string($_REQUEST["limit"]);
$result = db_query($link, "SELECT login, owner_uid
FROM ttrss_user_prefs, ttrss_users WHERE
break; // publish
case "rss":
- $feed = db_escape_string($_GET["id"]);
- $user = db_escape_string($_GET["user"]);
- $pass = db_escape_string($_GET["pass"]);
- $is_cat = $_GET["is_cat"] != false;
- $limit = (int)db_escape_string($_GET["limit"]);
+ $feed = db_escape_string($_REQUEST["id"]);
+ $user = db_escape_string($_REQUEST["user"]);
+ $pass = db_escape_string($_REQUEST["pass"]);
+ $is_cat = $_REQUEST["is_cat"] != false;
+ $limit = (int)db_escape_string($_REQUEST["limit"]);
- $search = db_escape_string($_GET["q"]);
- $match_on = db_escape_string($_GET["m"]);
- $search_mode = db_escape_string($_GET["smode"]);
+ $search = db_escape_string($_REQUEST["q"]);
+ $match_on = db_escape_string($_REQUEST["m"]);
+ $search_mode = db_escape_string($_REQUEST["smode"]);
if (SINGLE_USER_MODE) {
authenticate_user($link, "admin", null);
break; // rss
case "getUnread":
- $login = db_escape_string($_GET["login"]);
+ $login = db_escape_string($_REQUEST["login"]);
header("Content-Type: text/plain; charset=utf-8");
toolbar_form.query.value = "";
}
- var query = "backend.php?op=viewfeed&feed=" + feed + "&" +
+ var query = "?op=viewfeed&feed=" + feed + "&" +
toolbar_query + "&subop=" + param_escape(subop);
if ($("search_form")) {
}
}
- new Ajax.Request(query, {
+ new Ajax.Request("backend.php", {
+ parameters: query,
onComplete: function(transport) {
headlines_callback2(transport, page_offset);
} });
Effect.toggle('FCATLIST-' + cat, 'blind', { duration: 0.5,
afterFinish: toggleCollapseCat_af });
- new Ajax.Request("backend.php?op=feeds&subop=collapse&cid=" +
- param_escape(cat));
+ new Ajax.Request("backend.php",
+ { parameters: "backend.php?op=feeds&subop=collapse&cid=" +
+ param_escape(cat) } );
local_collapse_cat(cat);
if (ordered_cats.length > 0) {
- var query = "backend.php?op=feeds&subop=catsort&corder=" +
+ var query = "?op=feeds&subop=catsort&corder=" +
param_escape(ordered_cats.toString());
debug(query);
- new Ajax.Request(query);
+ new Ajax.Request("backend.php", { parameters: query });
}
} catch (e) {
debug("requesting counters...");
- var query = "backend.php?op=rpc&subop=getAllCounters";
+ var query = "?op=rpc&subop=getAllCounters";
if (tagsAreDisplayed()) {
query = query + "&omode=tl";
query = query + "&omode=flc";
}
- new Ajax.Request(query, {
+ new Ajax.Request("backend.php", {
+ parameters: query,
onComplete: function(transport) {
try {
all_counters_callback2(transport, true);
disableHotkeys();
- var query = "backend.php?op=dlg&id=" +
+ var query = "?op=dlg&id=" +
param_escape(id) + "¶m=" + param_escape(param);
- new Ajax.Request(query, {
+ new Ajax.Request("backend.php", {
+ parameters: query,
onComplete: function (transport) {
infobox_callback2(transport);
} });
var reg_exp = form.reg_exp.value;
- var query = "backend.php?op=rpc&subop=checkDate&date=" + reg_exp;
+ var query = "?op=rpc&subop=checkDate&date=" + reg_exp;
- new Ajax.Request(query, {
+ new Ajax.Request("backend.php", {
+ parameters: query,
onComplete: function(transport) {
var form = document.forms["filter_add_form"];
try {
debug("openArticleInNewWindow: " + id);
- var query = "backend.php?op=rpc&subop=getArticleLink&id=" + id;
+ var query = "?op=rpc&subop=getArticleLink&id=" + id;
var wname = "ttrss_article_" + id;
debug(query + " " + wname);
if (!w) notify_error("Failed to open window for the article");
- new Ajax.Request(query, {
+ new Ajax.Request("backend.php", {
+ parameters: query,
onComplete: function(transport) {
open_article_callback(transport);
} });
notify_progress("Loading, please wait...");
- var query = "backend.php?op=pref-labels&subop=test&expr=" +
+ var query = "?op=pref-labels&subop=test&expr=" +
param_escape(sql_exp) + "&descr=" + param_escape(description);
- new Ajax.Request(query, {
+ new Ajax.Request("backend.php", {
+ parameters: query,
onComplete: function (transport) {
labeltest_callback(transport);
} });
function updateFeedBrowser() {
try {
- var query = "backend.php?op=rpc&subop=feedBrowser";
+ var query = "?op=rpc&subop=feedBrowser";
var search = $("feed_browser_search");
var limit = $("feed_browser_limit");
Element.show('feed_browser_spinner');
- new Ajax.Request(query, {
+ new Ajax.Request("backend.php", {
+ parameters: query,
onComplete: function(transport) {
notify('');
try {
- var query = "backend.php?op=pref-feeds&subop=browse";
+ var query = "?op=pref-feeds&subop=browse";
notify_progress("Loading, please wait...", true);
- new Ajax.Request(query, {
+ new Ajax.Request("backend.php", {
+ parameters: query,
onComplete: function(transport) {
infobox_callback2(transport);
} });
<?php
-/* if ($_GET["debug"]) {
+/* if ($_REQUEST["debug"]) {
define('DEFAULT_ERROR_LEVEL', E_ALL);
} else {
define('DEFAULT_ERROR_LEVEL', E_ERROR | E_WARNING | E_PARSE);
function update_rss_feed($link, $feed_url, $feed, $ignore_daemon = false) {
- if (!$_GET["daemon"] && !$ignore_daemon) {
+ if (!$_REQUEST["daemon"] && !$ignore_daemon) {
return false;
}
- if (defined('DAEMON_EXTENDED_DEBUG') || $_GET['xdebug']) {
+ if (defined('DAEMON_EXTENDED_DEBUG') || $_REQUEST['xdebug']) {
_debug("update_rss_feed: start");
}
}
if (db_num_rows($result) == 0) {
- if (defined('DAEMON_EXTENDED_DEBUG') || $_GET['xdebug']) {
+ if (defined('DAEMON_EXTENDED_DEBUG') || $_REQUEST['xdebug']) {
_debug("update_rss_feed: feed $feed [$feed_url] NOT FOUND/SKIPPED");
}
return false;
$use_simplepie = ENABLE_SIMPLEPIE;
}
- if (defined('DAEMON_EXTENDED_DEBUG') || $_GET['xdebug']) {
+ if (defined('DAEMON_EXTENDED_DEBUG') || $_REQUEST['xdebug']) {
_debug("use simplepie: $use_simplepie (feed setting: $update_method)\n");
}
}
- if (defined('DAEMON_EXTENDED_DEBUG') || $_GET['xdebug']) {
+ if (defined('DAEMON_EXTENDED_DEBUG') || $_REQUEST['xdebug']) {
_debug("update_rss_feed: fetching [$fetch_url]...");
}
- if (!defined('DAEMON_EXTENDED_DEBUG') && !$_GET['xdebug']) {
+ if (!defined('DAEMON_EXTENDED_DEBUG') && !$_REQUEST['xdebug']) {
error_reporting(0);
}
$rss->set_output_encoding('UTF-8');
if (SIMPLEPIE_CACHE_IMAGES && $cache_images) {
- if (defined('DAEMON_EXTENDED_DEBUG') || $_GET['xdebug']) {
+ if (defined('DAEMON_EXTENDED_DEBUG') || $_REQUEST['xdebug']) {
_debug("enabling image cache");
}
$rss->set_image_handler('./image.php', 'i');
}
- if (defined('DAEMON_EXTENDED_DEBUG') || $_GET['xdebug']) {
+ if (defined('DAEMON_EXTENDED_DEBUG') || $_REQUEST['xdebug']) {
_debug("feed update interval (sec): " .
get_feed_update_interval($link, $feed)*60);
}
// print_r($rss);
- if (defined('DAEMON_EXTENDED_DEBUG') || $_GET['xdebug']) {
+ if (defined('DAEMON_EXTENDED_DEBUG') || $_REQUEST['xdebug']) {
_debug("update_rss_feed: fetch done, parsing...");
} else {
error_reporting (DEFAULT_ERROR_LEVEL);
if ($fetch_ok) {
- if (defined('DAEMON_EXTENDED_DEBUG') || $_GET['xdebug']) {
+ if (defined('DAEMON_EXTENDED_DEBUG') || $_REQUEST['xdebug']) {
_debug("update_rss_feed: processing feed data...");
}
}
if (get_pref($link, 'ENABLE_FEED_ICONS', $owner_uid, false)) {
- if (defined('DAEMON_EXTENDED_DEBUG') || $_GET['xdebug']) {
+ if (defined('DAEMON_EXTENDED_DEBUG') || $_REQUEST['xdebug']) {
_debug("update_rss_feed: checking favicon...");
}
$feed_title = db_escape_string($rss->channel["title"]);
}
- if (defined('DAEMON_EXTENDED_DEBUG') || $_GET['xdebug']) {
+ if (defined('DAEMON_EXTENDED_DEBUG') || $_REQUEST['xdebug']) {
_debug("update_rss_feed: registering title: $feed_title");
}
db_query($link, "UPDATE ttrss_feeds SET icon_url = '$icon_url' WHERE id = '$feed'");
}
- if (defined('DAEMON_EXTENDED_DEBUG') || $_GET['xdebug']) {
+ if (defined('DAEMON_EXTENDED_DEBUG') || $_REQUEST['xdebug']) {
_debug("update_rss_feed: loading filters...");
}
// clear any errors and mark feed as updated if fetched okay
// even if it's blank
- if (defined('DAEMON_EXTENDED_DEBUG') || $_GET['xdebug']) {
+ if (defined('DAEMON_EXTENDED_DEBUG') || $_REQUEST['xdebug']) {
_debug("update_rss_feed: entry iterator is not an array, no articles?");
}
return; // no articles
}
- if (defined('DAEMON_EXTENDED_DEBUG') || $_GET['xdebug']) {
+ if (defined('DAEMON_EXTENDED_DEBUG') || $_REQUEST['xdebug']) {
_debug("update_rss_feed: processing articles...");
}
foreach ($iterator as $item) {
- if ($_GET['xdebug'] == 2) {
+ if ($_REQUEST['xdebug'] == 2) {
print_r($item);
}
if (!$entry_guid) $entry_guid = make_guid_from_title($item["title"]);
}
- if (defined('DAEMON_EXTENDED_DEBUG') || $_GET['xdebug']) {
+ if (defined('DAEMON_EXTENDED_DEBUG') || $_REQUEST['xdebug']) {
_debug("update_rss_feed: guid $entry_guid");
}
$entry_timestamp_fmt = strftime("%Y/%m/%d %H:%M:%S", $entry_timestamp);
- if (defined('DAEMON_EXTENDED_DEBUG') || $_GET['xdebug']) {
+ if (defined('DAEMON_EXTENDED_DEBUG') || $_REQUEST['xdebug']) {
_debug("update_rss_feed: date $entry_timestamp [$entry_timestamp_fmt]");
}
if (!$entry_link) $entry_link = $item["link"];
}
- if (defined('DAEMON_EXTENDED_DEBUG') || $_GET['xdebug']) {
+ if (defined('DAEMON_EXTENDED_DEBUG') || $_REQUEST['xdebug']) {
_debug("update_rss_feed: title $entry_title");
}
}
}
- if ($_GET["xdebug"] == 2) {
+ if ($_REQUEST["xdebug"] == 2) {
print "update_rss_feed: content: ";
print_r(htmlspecialchars($entry_content));
}
}
}
- if (defined('DAEMON_EXTENDED_DEBUG') || $_GET['xdebug']) {
+ if (defined('DAEMON_EXTENDED_DEBUG') || $_REQUEST['xdebug']) {
_debug("update_rss_feed: category tags:");
print_r($additional_tags);
}
$entry_content = sanitize_article_content($entry_content);
$entry_title = sanitize_article_content($entry_title);
- if (defined('DAEMON_EXTENDED_DEBUG') || $_GET['xdebug']) {
+ if (defined('DAEMON_EXTENDED_DEBUG') || $_REQUEST['xdebug']) {
_debug("update_rss_feed: done collecting data [TITLE:$entry_title]");
}
if (db_num_rows($result) == 0) {
- if (defined('DAEMON_EXTENDED_DEBUG') || $_GET['xdebug']) {
+ if (defined('DAEMON_EXTENDED_DEBUG') || $_REQUEST['xdebug']) {
_debug("update_rss_feed: base guid not found");
}
if (db_num_rows($result) == 1) {
- if (defined('DAEMON_EXTENDED_DEBUG') || $_GET['xdebug']) {
+ if (defined('DAEMON_EXTENDED_DEBUG') || $_REQUEST['xdebug']) {
_debug("update_rss_feed: base guid found, checking for user record");
}
$article_filters = get_article_filters($filters, $entry_title,
$entry_content, $entry_link, $entry_timestamp);
- if (defined('DAEMON_EXTENDED_DEBUG') || $_GET['xdebug']) {
+ if (defined('DAEMON_EXTENDED_DEBUG') || $_REQUEST['xdebug']) {
_debug("update_rss_feed: article filters: ");
if (count($article_filters) != 0) {
print_r($article_filters);
$score = calculate_article_score($article_filters);
- if (defined('DAEMON_EXTENDED_DEBUG') || $_GET['xdebug']) {
+ if (defined('DAEMON_EXTENDED_DEBUG') || $_REQUEST['xdebug']) {
_debug("update_rss_feed: initial score: $score");
}
ref_id = '$ref_id' AND owner_uid = '$owner_uid'
$dupcheck_qpart";
-// if ($_GET["xdebug"]) print "$query\n";
+// if ($_REQUEST["xdebug"]) print "$query\n";
$result = db_query($link, $query);
// okay it doesn't exist - create user entry
if (db_num_rows($result) == 0) {
- if (defined('DAEMON_EXTENDED_DEBUG') || $_GET['xdebug']) {
+ if (defined('DAEMON_EXTENDED_DEBUG') || $_REQUEST['xdebug']) {
_debug("update_rss_feed: user record not found, creating...");
}
$entry_int_id = db_fetch_result($result, 0, "int_id");
}
} else {
- if (defined('DAEMON_EXTENDED_DEBUG') || $_GET['xdebug']) {
+ if (defined('DAEMON_EXTENDED_DEBUG') || $_REQUEST['xdebug']) {
_debug("update_rss_feed: user record FOUND");
}
$entry_int_id = db_fetch_result($result, 0, "int_id");
}
- if (defined('DAEMON_EXTENDED_DEBUG') || $_GET['xdebug']) {
+ if (defined('DAEMON_EXTENDED_DEBUG') || $_REQUEST['xdebug']) {
_debug("update_rss_feed: RID: $entry_ref_id, IID: $entry_int_id");
}
db_query($link, "COMMIT");
- if (defined('DAEMON_EXTENDED_DEBUG') || $_GET['xdebug']) {
+ if (defined('DAEMON_EXTENDED_DEBUG') || $_REQUEST['xdebug']) {
_debug("update_rss_feed: assigning labels...");
}
assign_article_to_labels($link, $entry_ref_id, $article_filters,
$owner_uid);
- if (defined('DAEMON_EXTENDED_DEBUG') || $_GET['xdebug']) {
+ if (defined('DAEMON_EXTENDED_DEBUG') || $_REQUEST['xdebug']) {
_debug("update_rss_feed: looking for enclosures...");
}
- if (defined('DAEMON_EXTENDED_DEBUG') || $_GET['xdebug']) {
+ if (defined('DAEMON_EXTENDED_DEBUG') || $_REQUEST['xdebug']) {
print_r($enclosures);
}
db_query($link, "COMMIT");
- if (defined('DAEMON_EXTENDED_DEBUG') || $_GET['xdebug']) {
+ if (defined('DAEMON_EXTENDED_DEBUG') || $_REQUEST['xdebug']) {
_debug("update_rss_feed: looking for tags...");
}
// print "<p>TAGS: "; print_r($entry_tags); print "</p>";
- if (defined('DAEMON_EXTENDED_DEBUG') || $_GET['xdebug']) {
+ if (defined('DAEMON_EXTENDED_DEBUG') || $_REQUEST['xdebug']) {
print_r($entry_tags);
}
db_query($link, "COMMIT");
}
- if (defined('DAEMON_EXTENDED_DEBUG') || $_GET['xdebug']) {
+ if (defined('DAEMON_EXTENDED_DEBUG') || $_REQUEST['xdebug']) {
_debug("update_rss_feed: article processed");
}
}
if (!$last_updated) {
- if (defined('DAEMON_EXTENDED_DEBUG') || $_GET['xdebug']) {
+ if (defined('DAEMON_EXTENDED_DEBUG') || $_REQUEST['xdebug']) {
_debug("update_rss_feed: new feed, catching it up...");
}
catchup_feed($link, $feed, false, $owner_uid);
}
if (!$hidden) {
- if (defined('DAEMON_EXTENDED_DEBUG') || $_GET['xdebug']) {
+ if (defined('DAEMON_EXTENDED_DEBUG') || $_REQUEST['xdebug']) {
_debug("update_rss_feed: updating counters cache...");
}
$error_msg = mb_substr(magpie_error(), 0, 250);
}
- if (defined('DAEMON_EXTENDED_DEBUG') || $_GET['xdebug']) {
+ if (defined('DAEMON_EXTENDED_DEBUG') || $_REQUEST['xdebug']) {
_debug("update_rss_feed: error fetching feed: $error_msg");
}
unset($rss);
}
- if (defined('DAEMON_EXTENDED_DEBUG') || $_GET['xdebug']) {
+ if (defined('DAEMON_EXTENDED_DEBUG') || $_REQUEST['xdebug']) {
_debug("update_rss_feed: done");
}
$query_strategy_part ORDER BY $order_by
$limit_query_part $offset_query_part";
- if ($_GET["debug"]) print $query;
+ if ($_REQUEST["debug"]) print $query;
$result = db_query($link, $query);
$result = db_query($link, $query);
- $actid = $_GET["actid"];
+ $actid = $_REQUEST["actid"];
/* real feeds */
$feed_id = $line["id"];
$unread = $line["unread"];
- $subop = $_GET["subop"];
+ $subop = $_REQUEST["subop"];
if (get_pref($link, 'HEADLINES_SMART_DATE')) {
$last_updated = smart_date_time(strtotime($line["last_updated_noms"]));
$subop_split = split(":", $subop);
if ($subop == "CatchupSelected") {
- $ids = split(",", db_escape_string($_GET["ids"]));
- $cmode = sprintf("%d", $_GET["cmode"]);
+ $ids = split(",", db_escape_string($_REQUEST["ids"]));
+ $cmode = sprintf("%d", $_REQUEST["cmode"]);
catchupArticlesById($link, $ids, $cmode);
}
/// START /////////////////////////////////////////////////////////////////////////////////
- $search = db_escape_string($_GET["query"]);
+ $search = db_escape_string($_REQUEST["query"]);
if ($search) {
$disable_cache = true;
}
- $search_mode = db_escape_string($_GET["search_mode"]);
- $match_on = db_escape_string($_GET["match_on"]);
+ $search_mode = db_escape_string($_REQUEST["search_mode"]);
+ $match_on = db_escape_string($_REQUEST["match_on"]);
if (!$match_on) {
$match_on = "both";
$real_offset = $offset * $limit;
- if ($_GET["debug"]) $timing_info = print_checkpoint("H0", $timing_info);
+ if ($_REQUEST["debug"]) $timing_info = print_checkpoint("H0", $timing_info);
$qfh_ret = queryFeedHeadlines($link, $feed, $limit, $view_mode, $cat_view,
$search, $search_mode, $match_on, $override_order, $real_offset);
- if ($_GET["debug"]) $timing_info = print_checkpoint("H1", $timing_info);
+ if ($_REQUEST["debug"]) $timing_info = print_checkpoint("H1", $timing_info);
$result = $qfh_ret[0];
$feed_title = $qfh_ret[1];
"images/c1.png",
"images/c2.png",
"images/c3.png",
- "images/c4.png",
+ "images/c4.png",
+ "images/archive.png",
"images/cat-collapse.png",
"images/down_arrow.png",
"images/footer.png",
<?php
function handle_rpc_request($link) {
- $subop = $_GET["subop"];
+ $subop = $_REQUEST["subop"];
if ($subop == "setpref") {
if (WEB_DEMO_MODE) {
print "<rpc-reply>";
- $key = db_escape_string($_GET["key"]);
- $value = db_escape_string($_GET["value"]);
+ $key = db_escape_string($_REQUEST["key"]);
+ $value = db_escape_string($_REQUEST["value"]);
set_pref($link, $key, $value);
}
if ($subop == "getLabelCounters") {
- $aid = $_GET["aid"];
+ $aid = $_REQUEST["aid"];
print "<rpc-reply>";
print "<counters>";
getLabelCounters($link);
print "<rpc-reply>";
print "<counters>";
- $omode = $_GET["omode"];
+ $omode = $_REQUEST["omode"];
getAllCounters($link, $omode);
print "</counters>";
}
if ($subop == "mark") {
- $mark = $_GET["mark"];
- $id = db_escape_string($_GET["id"]);
+ $mark = $_REQUEST["mark"];
+ $id = db_escape_string($_REQUEST["id"]);
if ($mark == "1") {
$mark = "true";
}
if ($subop == "delete") {
- $ids = db_escape_string($_GET["ids"]);
+ $ids = db_escape_string($_REQUEST["ids"]);
$result = db_query($link, "DELETE FROM ttrss_user_entries
WHERE ref_id IN ($ids) AND owner_uid = " . $_SESSION["uid"]);
}
if ($subop == "unarchive") {
- $ids = db_escape_string($_GET["ids"]);
+ $ids = db_escape_string($_REQUEST["ids"]);
$result = db_query($link, "UPDATE ttrss_user_entries
SET feed_id = orig_feed_id, orig_feed_id = NULL
}
if ($subop == "archive") {
- $ids = split(",", db_escape_string($_GET["ids"]));
+ $ids = split(",", db_escape_string($_REQUEST["ids"]));
foreach ($ids as $id) {
archive_article($link, $id, $_SESSION["uid"]);
}
if ($subop == "updateFeed") {
- $feed_id = db_escape_string($_GET["feed"]);
+ $feed_id = db_escape_string($_REQUEST["feed"]);
$result = db_query($link,
"SELECT feed_url FROM ttrss_feeds WHERE id = '$feed_id'
if ($subop == "forceUpdateAllFeeds" || $subop == "updateAllFeeds") {
- $global_unread_caller = sprintf("%d", $_GET["uctr"]);
+ $global_unread_caller = sprintf("%d", $_REQUEST["uctr"]);
$global_unread = getGlobalUnread($link);
print "<rpc-reply>";
if ($global_unread_caller != $global_unread) {
- $omode = $_GET["omode"];
+ $omode = $_REQUEST["omode"];
if (!$omode) $omode = "tflc";
print "<rpc-reply>";
print "<counters>";
- getAllCounters($link, $_GET["omode"]);
+ getAllCounters($link, $_REQUEST["omode"]);
print "</counters>";
print_runtime_info($link);
print "</rpc-reply>";
if ($subop == "markSelected") {
- $ids = split(",", db_escape_string($_GET["ids"]));
- $cmode = sprintf("%d", $_GET["cmode"]);
+ $ids = split(",", db_escape_string($_REQUEST["ids"]));
+ $cmode = sprintf("%d", $_REQUEST["cmode"]);
markArticlesById($link, $ids, $cmode);
print "<rpc-reply>";
print "<counters>";
- getAllCounters($link, $_GET["omode"]);
+ getAllCounters($link, $_REQUEST["omode"]);
print "</counters>";
print_runtime_info($link);
print "</rpc-reply>";
if ($subop == "publishSelected") {
- $ids = split(",", db_escape_string($_GET["ids"]));
- $cmode = sprintf("%d", $_GET["cmode"]);
+ $ids = split(",", db_escape_string($_REQUEST["ids"]));
+ $cmode = sprintf("%d", $_REQUEST["cmode"]);
publishArticlesById($link, $ids, $cmode);
print "<rpc-reply>";
print "<counters>";
- getAllCounters($link, $_GET["omode"]);
+ getAllCounters($link, $_REQUEST["omode"]);
print "</counters>";
print_runtime_info($link);
print "</rpc-reply>";
print_runtime_info($link);
# assign client-passed params to session
- $_SESSION["client.userAgent"] = $_GET["ua"];
+ $_SESSION["client.userAgent"] = $_REQUEST["ua"];
}
print "</rpc-reply>";
if ($subop == "getArticleLink") {
- $id = db_escape_string($_GET["id"]);
+ $id = db_escape_string($_REQUEST["id"]);
$result = db_query($link, "SELECT link FROM ttrss_entries, ttrss_user_entries
WHERE id = '$id' AND id = ref_id AND owner_uid = '".$_SESSION['uid']."'");
if ($subop == "setArticleTags") {
- $id = db_escape_string($_GET["id"]);
+ $id = db_escape_string($_REQUEST["id"]);
- $tags_str = db_escape_string($_GET["tags_str"]);
+ $tags_str = db_escape_string($_REQUEST["tags_str"]);
$tags = array_unique(trim_array(split(",", $tags_str)));
}
if ($subop == "purge") {
- $ids = split(",", db_escape_string($_GET["ids"]));
- $days = sprintf("%d", $_GET["days"]);
+ $ids = split(",", db_escape_string($_REQUEST["ids"]));
+ $days = sprintf("%d", $_REQUEST["days"]);
print "<rpc-reply>";
<?php
function module_help($link) {
- if (!$_GET["noheaders"]) {
+ if (!$_REQUEST["noheaders"]) {
print "<html><head>
<title>".__('Help')."</title>
<link rel=\"stylesheet\" href=\"utility.css\" type=\"text/css\">
</head><body>";
}
- $tid = sprintf("%d", $_GET["tid"]);
+ $tid = sprintf("%d", $_REQUEST["tid"]);
if (file_exists("help/$tid.php")) {
include("help/$tid.php");
onclick=\"javascript:window.close()\"
value=\"".__('Close this window')."\"></div>";
- if (!$_GET["noheaders"]) {
+ if (!$_REQUEST["noheaders"]) {
print "</body></html>";
}
}
<?php
function module_popup_dialog($link) {
- $id = $_GET["id"];
- $param = db_escape_string($_GET["param"]);
+ $id = $_REQUEST["id"];
+ $param = db_escape_string($_REQUEST["param"]);
if ($id == "explainError") {
print "<form id='search_form' onsubmit='return false'>";
- #$active_feed_id = db_escape_string($_GET["param"]);
+ #$active_feed_id = db_escape_string($_REQUEST["param"]);
- $params = split(":", db_escape_string($_GET["param"]));
+ $params = split(":", db_escape_string($_REQUEST["param"]));
$active_feed_id = sprintf("%d", $params[0]);
$is_cat = $params[1] == "true";
if ($id == "quickAddFilter") {
- $active_feed_id = db_escape_string($_GET["param"]);
+ $active_feed_id = db_escape_string($_REQUEST["param"]);
print "<div id=\"infoBoxTitle\">".__('Create Filter')."</div>";
print "<div class=\"infoBoxContents\">";
$quiet = $_REQUEST["quiet"];
if ($subop == "massSubscribe") {
- $ids = split(",", db_escape_string($_GET["ids"]));
+ $ids = split(",", db_escape_string($_REQUEST["ids"]));
$subscribed = array();
print "<div class=\"infoBoxContents\">";
- $browser_search = db_escape_string($_GET["search"]);
+ $browser_search = db_escape_string($_REQUEST["search"]);
//print "<p>".__("Showing top 25 registered feeds, sorted by popularity:")."</p>";
if ($subop == "remove") {
- $ids = split(",", db_escape_string($_GET["ids"]));
+ $ids = split(",", db_escape_string($_REQUEST["ids"]));
foreach ($ids as $id) {
remove_feed($link, $id, $_SESSION["uid"]);
}
if ($subop == "clear") {
- $id = db_escape_string($_GET["id"]);
+ $id = db_escape_string($_REQUEST["id"]);
clear_feed_articles($link, $id);
}
if ($subop == "rescore") {
- $ids = split(",", db_escape_string($_GET["ids"]));
+ $ids = split(",", db_escape_string($_REQUEST["ids"]));
foreach ($ids as $id) {
if (!WEB_DEMO_MODE) {
- $ids = split(",", db_escape_string($_GET["ids"]));
+ $ids = split(",", db_escape_string($_REQUEST["ids"]));
- $cat_id = db_escape_string($_GET["cat_id"]);
+ $cat_id = db_escape_string($_REQUEST["cat_id"]);
if ($cat_id == 0) {
$cat_id_qpart = 'NULL';
if ($action == "save") {
$cat_title = db_escape_string(trim($_REQUEST["value"]));
- $cat_id = db_escape_string($_GET["cid"]);
+ $cat_id = db_escape_string($_REQUEST["cid"]);
db_query($link, "BEGIN");
if (!WEB_DEMO_MODE) {
- $feed_cat = db_escape_string(trim($_GET["cat"]));
+ $feed_cat = db_escape_string(trim($_REQUEST["cat"]));
$result = db_query($link,
"SELECT id FROM ttrss_feed_categories
if ($action == "remove") {
- $ids = split(",", db_escape_string($_GET["ids"]));
+ $ids = split(",", db_escape_string($_REQUEST["ids"]));
foreach ($ids as $id) {
remove_feed_category($link, $id, $_SESSION["uid"]);
__('Some feeds have update errors (click for details)')."</a>");
}
- $feed_search = db_escape_string($_GET["search"]);
+ $feed_search = db_escape_string($_REQUEST["search"]);
- if (array_key_exists("search", $_GET)) {
+ if (array_key_exists("search", $_REQUEST)) {
$_SESSION["prefs_feed_search"] = $feed_search;
} else {
$feed_search = $_SESSION["prefs_feed_search"];
onclick=\"javascript:browseFeeds()\" value=\"".__('More Feeds')."\">";
}
- $feeds_sort = db_escape_string($_GET["sort"]);
+ $feeds_sort = db_escape_string($_REQUEST["sort"]);
if (!$feeds_sort || $feeds_sort == "undefined") {
$feeds_sort = $_SESSION["pref_sort_feeds"];
$show_last_article_checked = "";
$show_last_article_qpart = "";
- if ($_GET["slat"] == "true") {
+ if ($_REQUEST["slat"] == "true") {
$show_last_article_info = true;
$show_last_article_checked = "checked";
$show_last_article_qpart = ", (SELECT ".SUBSTRING_FOR_DATE."(MAX(updated),1,16) FROM ttrss_user_entries,
<?php
function module_pref_filters($link) {
- $subop = $_GET["subop"];
- $quiet = $_GET["quiet"];
+ $subop = $_REQUEST["subop"];
+ $quiet = $_REQUEST["quiet"];
if ($subop == "edit") {
- $filter_id = db_escape_string($_GET["id"]);
+ $filter_id = db_escape_string($_REQUEST["id"]);
$result = db_query($link,
"SELECT * FROM ttrss_filters WHERE id = '$filter_id' AND owner_uid = " . $_SESSION["uid"]);
if ($subop == "editSave") {
- $reg_exp = db_escape_string(trim($_GET["reg_exp"]));
- $filter_type = db_escape_string(trim($_GET["filter_type"]));
- $filter_id = db_escape_string($_GET["id"]);
- $feed_id = db_escape_string($_GET["feed_id"]);
- $action_id = db_escape_string($_GET["action_id"]);
- $action_param = db_escape_string($_GET["action_param"]);
- $action_param_label = db_escape_string($_GET["action_param_label"]);
- $enabled = checkbox_to_sql_bool(db_escape_string($_GET["enabled"]));
- $inverse = checkbox_to_sql_bool(db_escape_string($_GET["inverse"]));
+ $reg_exp = db_escape_string(trim($_REQUEST["reg_exp"]));
+ $filter_type = db_escape_string(trim($_REQUEST["filter_type"]));
+ $filter_id = db_escape_string($_REQUEST["id"]);
+ $feed_id = db_escape_string($_REQUEST["feed_id"]);
+ $action_id = db_escape_string($_REQUEST["action_id"]);
+ $action_param = db_escape_string($_REQUEST["action_param"]);
+ $action_param_label = db_escape_string($_REQUEST["action_param_label"]);
+ $enabled = checkbox_to_sql_bool(db_escape_string($_REQUEST["enabled"]));
+ $inverse = checkbox_to_sql_bool(db_escape_string($_REQUEST["inverse"]));
# for the time being, no other filters use params anyway...
- $filter_param = db_escape_string($_GET["filter_date_modifier"]);
+ $filter_param = db_escape_string($_REQUEST["filter_date_modifier"]);
if (!$feed_id) {
$feed_id = 'NULL';
if ($subop == "remove") {
- $ids = split(",", db_escape_string($_GET["ids"]));
+ $ids = split(",", db_escape_string($_REQUEST["ids"]));
foreach ($ids as $id) {
db_query($link, "DELETE FROM ttrss_filters WHERE id = '$id' AND owner_uid = ". $_SESSION["uid"]);
if ($subop == "add") {
- $regexp = db_escape_string(trim($_GET["reg_exp"]));
- $filter_type = db_escape_string(trim($_GET["filter_type"]));
- $feed_id = db_escape_string($_GET["feed_id"]);
- $action_id = db_escape_string($_GET["action_id"]);
- $action_param = db_escape_string($_GET["action_param"]);
- $action_param_label = db_escape_string($_GET["action_param_label"]);
- $inverse = checkbox_to_sql_bool(db_escape_string($_GET["inverse"]));
+ $regexp = db_escape_string(trim($_REQUEST["reg_exp"]));
+ $filter_type = db_escape_string(trim($_REQUEST["filter_type"]));
+ $feed_id = db_escape_string($_REQUEST["feed_id"]);
+ $action_id = db_escape_string($_REQUEST["action_id"]);
+ $action_param = db_escape_string($_REQUEST["action_param"]);
+ $action_param_label = db_escape_string($_REQUEST["action_param_label"]);
+ $inverse = checkbox_to_sql_bool(db_escape_string($_REQUEST["inverse"]));
# for the time being, no other filters use params anyway...
- $filter_param = db_escape_string($_GET["filter_date_modifier"]);
+ $filter_param = db_escape_string($_REQUEST["filter_date_modifier"]);
if (!$regexp) return;
set_pref($link, "_PREFS_ACTIVE_TAB", "filterConfig");
- $sort = db_escape_string($_GET["sort"]);
+ $sort = db_escape_string($_REQUEST["sort"]);
if (!$sort || $sort == "undefined") {
$sort = "reg_exp";
}
- $filter_search = db_escape_string($_GET["search"]);
+ $filter_search = db_escape_string($_REQUEST["search"]);
- if (array_key_exists("search", $_GET)) {
+ if (array_key_exists("search", $_REQUEST)) {
$_SESSION["prefs_filter_search"] = $filter_search;
} else {
$filter_search = $_SESSION["prefs_filter_search"];
$class = ($lnum % 2) ? "even" : "odd";
$filter_id = $line["id"];
- $edit_filter_id = $_GET["id"];
+ $edit_filter_id = $_REQUEST["id"];
$enabled = sql_bool_to_bool($line["enabled"]);
$inverse = sql_bool_to_bool($line["inverse"]);
<?php
function module_pref_labels($link) {
- $subop = $_GET["subop"];
+ $subop = $_REQUEST["subop"];
if ($subop == "color-set") {
$kind = db_escape_string($_REQUEST["kind"]);
if ($subop == "remove") {
- $ids = split(",", db_escape_string($_GET["ids"]));
+ $ids = split(",", db_escape_string($_REQUEST["ids"]));
foreach ($ids as $id) {
label_remove($link, $id, $_SESSION["uid"]);
if ($subop == "add") {
- $caption = db_escape_string($_GET["caption"]);
+ $caption = db_escape_string($_REQUEST["caption"]);
if ($caption) {
set_pref($link, "_PREFS_ACTIVE_TAB", "labelConfig");
- $sort = db_escape_string($_GET["sort"]);
+ $sort = db_escape_string($_REQUEST["sort"]);
if (!$sort || $sort == "undefined") {
$sort = "caption";
}
- $label_search = db_escape_string($_GET["search"]);
+ $label_search = db_escape_string($_REQUEST["search"]);
- if (array_key_exists("search", $_GET)) {
+ if (array_key_exists("search", $_REQUEST)) {
$_SESSION["prefs_label_search"] = $label_search;
} else {
$label_search = $_SESSION["prefs_label_search"];
} else if ($subop == "getHelp") {
- $pref_name = db_escape_string($_GET["pn"]);
+ $pref_name = db_escape_string($_REQUEST["pn"]);
$result = db_query($link, "SELECT help_text FROM ttrss_prefs
WHERE pref_name = '$pref_name'");
if ($subop == "user-details") {
- $uid = sprintf("%d", $_GET["id"]);
+ $uid = sprintf("%d", $_REQUEST["id"]);
print "<div id=\"infoBoxTitle\">".__('User details')."</div>";
if ($subop == "edit") {
- $id = db_escape_string($_GET["id"]);
+ $id = db_escape_string($_REQUEST["id"]);
print "<div id=\"infoBoxTitle\">".__('User Editor')."</div>";
if ($_SESSION["access_level"] >= 10) {
- $ids = split(",", db_escape_string($_GET["ids"]));
+ $ids = split(",", db_escape_string($_REQUEST["ids"]));
foreach ($ids as $id) {
if ($id != $_SESSION["uid"]) {
if ($_SESSION["access_level"] >= 10) {
- $login = db_escape_string(trim($_GET["login"]));
+ $login = db_escape_string(trim($_REQUEST["login"]));
$tmp_user_pwd = make_password(8);
$pwd_hash = encrypt_password($tmp_user_pwd, $login);
if (!WEB_DEMO_MODE && $_SESSION["access_level"] >= 10) {
- $uid = db_escape_string($_GET["id"]);
+ $uid = db_escape_string($_REQUEST["id"]);
$result = db_query($link, "SELECT login,email
FROM ttrss_users WHERE id = '$uid'");
set_pref($link, "_PREFS_ACTIVE_TAB", "userConfig");
- $user_search = db_escape_string($_GET["search"]);
+ $user_search = db_escape_string($_REQUEST["search"]);
- if (array_key_exists("search", $_GET)) {
+ if (array_key_exists("search", $_REQUEST)) {
$_SESSION["prefs_user_search"] = $user_search;
} else {
$user_search = $_SESSION["prefs_user_search"];
onclick=\"javascript:updateUsersList()\" value=\"".__('Search')."\">
</div>";
- $sort = db_escape_string($_GET["sort"]);
+ $sort = db_escape_string($_REQUEST["sort"]);
if (!$sort || $sort == "undefined") {
$sort = "login";
$class = ($lnum % 2) ? "even" : "odd";
$uid = $line["id"];
- $edit_uid = $_GET["id"];
+ $edit_uid = $_REQUEST["id"];
if ($subop == "edit" && $uid != $edit_uid) {
$class .= "Grayed";
if (!db || offline_mode || getInitParam("offline_enabled") != "1") return;
- var query = "backend.php?op=rpc&subop=download";
+ var query = "?op=rpc&subop=download";
var rs = db.execute("SELECT MAX(id), MIN(id) FROM articles");
var to_sync = prepare_local_sync_data();
if (to_sync != "") {
- to_sync = "?sync=" + param_escape(to_sync);
+ to_sync = "&sync=" + param_escape(to_sync);
}
- debug(query + "/" + to_sync);
+ query = query + to_sync;
var pic = $("offlineModePic");
sync_in_progress = true;
- new Ajax.Request(query, {
- parameters: to_sync,
+ debug(query);
+
+ new Ajax.Request("backend.php", {
+ parameters: query,
onComplete: function(transport) {
offline_download_parse(stage, transport);
} });
slat_checked = slat.checked;
}
- var query = "backend.php?op=pref-feeds" +
+ var query = "?op=pref-feeds" +
"&sort=" + param_escape(sort_key) +
"&slat=" + param_escape(slat_checked) +
"&search=" + param_escape(search);
- new Ajax.Request(query, {
+ new Ajax.Request("backend.php", {
+ parameters: query,
onComplete: function(transport) {
feedlist_callback2(transport);
} });
var search = "";
if (user_search) { search = user_search.value; }
- var query = "backend.php?op=pref-users&sort="
+ var query = "?op=pref-users&sort="
+ param_escape(sort_key) +
"&search=" + param_escape(search);
- new Ajax.Request(query, {
+ new Ajax.Request("backend.php", {
+ parameters: query,
onComplete: function(transport) {
userlist_callback2(transport);
} });
// we can be called from some other tab
active_tab = "labelConfig";
- query = "backend.php?op=pref-labels&subop=add&caption=" +
+ query = "?op=pref-labels&subop=add&caption=" +
param_escape(caption);
- new Ajax.Request(query, {
+ new Ajax.Request("backend.php", {
+ parameters: query,
onComplete: function(transport) {
infobox_submit_callback2(transport);
} });
} else {
notify_progress("Adding feed...");
- var query = "backend.php?op=pref-feeds&subop=add&from=tt-rss&feed_url=" +
+ var query = "?op=pref-feeds&subop=add&from=tt-rss&feed_url=" +
param_escape(link.value);
- new Ajax.Request(query, {
+ new Ajax.Request("backend.php", {
+ parameters: query,
onComplete: function(transport) {
feedlist_callback2(transport);
} });
} else {
notify_progress("Adding feed category...");
- var query = "backend.php?op=pref-feeds&subop=editCats&action=add&cat=" +
+ var query = "?op=pref-feeds&subop=editCats&action=add&cat=" +
param_escape(cat.value);
- new Ajax.Request(query, {
+ new Ajax.Request("backend.php", {
+ parameters: query,
onComplete: function(transport) {
infobox_feed_cat_callback2(transport);
} });
notify_progress("Adding user...");
- var query = "backend.php?op=pref-users&subop=add&login=" +
+ var query = "?op=pref-users&subop=add&login=" +
param_escape(login);
- new Ajax.Request(query, {
+ new Ajax.Request("backend.php", {
+ parameters: query,
onComplete: function(transport) {
userlist_callback2(transport);
} });
disableContainerChildren("userOpToolbar", false);
- var query = "backend.php?op=pref-users&subop=edit&id=" +
+ var query = "?op=pref-users&subop=edit&id=" +
param_escape(id);
- new Ajax.Request(query, {
+ new Ajax.Request("backend.php", {
+ parameters: query,
onComplete: function(transport) {
infobox_callback2(transport);
} });
selectTableRowsByIdPrefix('prefFilterList', 'FILRR-', 'FICHK-', false);
selectTableRowById('FILRR-'+id, 'FICHK-'+id, true);
- var query = "backend.php?op=pref-filters&subop=edit&id=" +
+ var query = "?op=pref-filters&subop=edit&id=" +
param_escape(id);
- new Ajax.Request(query, {
+ new Ajax.Request("backend.php", {
+ parameters: query,
onComplete: function(transport) {
infobox_callback2(transport);
} });
disableContainerChildren("feedOpToolbar", false);
- var query = "backend.php?op=pref-feeds&subop=editfeed&id=" +
+ var query = "?op=pref-feeds&subop=editfeed&id=" +
param_escape(feed);
- new Ajax.Request(query, {
+ new Ajax.Request("backend.php", {
+ parameters: query,
onComplete: function(transport) {
infobox_callback2(transport);
} });
if (ok) {
notify_progress("Removing selected labels...");
- var query = "backend.php?op=pref-labels&subop=remove&ids="+
+ var query = "?op=pref-labels&subop=remove&ids="+
param_escape(sel_rows.toString());
- new Ajax.Request(query, {
+ new Ajax.Request("backend.php", {
+ parameters: query,
onComplete: function(transport) {
labellist_callback2(transport);
} });
if (ok) {
notify_progress("Removing selected users...");
- var query = "backend.php?op=pref-users&subop=remove&ids="+
+ var query = "?op=pref-users&subop=remove&ids="+
param_escape(sel_rows.toString());
- new Ajax.Request(query, {
+ new Ajax.Request("backend.php", {
+ parameters: query,
onComplete: function(transport) {
userlist_callback2(transport);
} });
if (ok) {
notify_progress("Removing selected filters...");
- var query = "backend.php?op=pref-filters&subop=remove&ids="+
+ var query = "?op=pref-filters&subop=remove&ids="+
param_escape(sel_rows.toString());
- new Ajax.Request(query, {
+ new Ajax.Request("backend.php", {
+ parameters: query,
onComplete: function(transport) {
filterlist_callback2(transport);
} });
notify_progress("Unsubscribing from selected feeds...");
- var query = "backend.php?op=pref-feeds&subop=remove&ids="+
+ var query = "?op=pref-feeds&subop=remove&ids="+
param_escape(sel_rows.toString());
- new Ajax.Request(query, {
+ new Ajax.Request("backend.php", {
+ parameters: query,
onComplete: function(transport) {
feedlist_callback2(transport);
} });
if (pr != undefined) {
notify_progress("Purging selected feed...");
- var query = "backend.php?op=rpc&subop=purge&ids="+
+ var query = "?op=rpc&subop=purge&ids="+
param_escape(sel_rows.toString()) + "&days=" + pr;
debug(query);
- new Ajax.Request(query, {
+ new Ajax.Request("prefs.php", {
+ parameters: query,
onComplete: function(transport) {
notify('');
} });
if (ok) {
notify_progress("Removing selected categories...");
- var query = "backend.php?op=pref-feeds&subop=editCats&action=remove&ids="+
+ var query = "?op=pref-feeds&subop=editCats&action=remove&ids="+
param_escape(sel_rows.toString());
- new Ajax.Request(query, {
+ new Ajax.Request("backend.php", {
+ parameters: query,
onComplete: function(transport) {
infobox_feed_cat_callback2(transport);
} });
notify_progress("Saving filter...");
- var query = "backend.php?" + Form.serialize("filter_edit_form");
+ var query = "?" + Form.serialize("filter_edit_form");
closeInfoBox();
$("create_filter_btn").disabled = false;
- new Ajax.Request(query, {
+ new Ajax.Request("backend.php", {
+ parameters: query,
onComplete: function(transport) {
filterlist_callback2(transport);
} });
var id = rows[0];
- var query = "backend.php?op=pref-users&subop=resetPass&id=" +
+ var query = "?op=pref-users&subop=resetPass&id=" +
param_escape(id);
- new Ajax.Request(query, {
+ new Ajax.Request("backend.php", {
+ parameters: query,
onComplete: function(transport) {
userlist_callback2(transport);
} });
var id = rows[0];
- var query = "backend.php?op=pref-users&subop=user-details&id=" + id;
+ var query = "?op=pref-users&subop=user-details&id=" + id;
- new Ajax.Request(query, {
+ new Ajax.Request("backend.php", {
+ parameters: query,
onComplete: function(transport) {
infobox_callback2(transport);
} });
notify_progress("Loading, please wait...");
- var query = "backend.php?op=pref-feeds&subop=editfeeds&ids=" +
+ var query = "?op=pref-feeds&subop=editfeeds&ids=" +
param_escape(rows.toString());
- new Ajax.Request(query, {
+ new Ajax.Request("backend.php", {
+ parameters: query,
onComplete: function(transport) {
infobox_callback2(transport);
} });
var search = "";
if (filter_search) { search = filter_search.value; }
- var query = "backend.php?op=pref-filters&sort=" +
+ var query = "?op=pref-filters&sort=" +
param_escape(sort_key) +
"&search=" + param_escape(search);
- new Ajax.Request(query, {
+ new Ajax.Request("backend.php", {
+ parameters: query,
onComplete: function(transport) {
filterlist_callback2(transport);
} });
var search = "";
if (label_search) { search = label_search.value; }
- var query = "backend.php?op=pref-labels&sort=" +
+ var query = "?op=pref-labels&sort=" +
param_escape(sort_key) +
"&search=" + param_escape(search);
- new Ajax.Request(query, {
+ new Ajax.Request("backend.php", {
+ parameters: query,
onComplete: function(transport) {
labellist_callback2(transport);
} });
function updatePrefsList() {
- var query = "backend.php?op=pref-prefs";
+ var query = "?op=pref-prefs";
- new Ajax.Request(query, {
+ new Ajax.Request("backend.php", {
+ parameters: query,
onComplete: function(transport) {
prefslist_callback2(transport);
} });
loading_set_progress(30);
- var query = "backend.php?op=rpc&subop=sanityCheck";
+ var query = "?op=rpc&subop=sanityCheck";
- new Ajax.Request(query, {
+ new Ajax.Request("backend.php", {
+ parameters: query,
onComplete: function(transport) {
backend_sanity_check_callback2(transport);
} });
notify_progress("Changing category of selected feeds...");
- var query = "backend.php?op=pref-feeds&subop=categorize&ids="+
+ var query = "?op=pref-feeds&subop=categorize&ids="+
param_escape(sel_rows.toString()) + "&cat_id=" + param_escape(cat_id);
- new Ajax.Request(query, {
+ new Ajax.Request("backend.php", {
+ parameters: query,
onComplete: function(transport) {
feedlist_callback2(transport);
} });
if (selected.length > 0) {
closeInfoBox();
- var query = "backend.php?op=pref-feeds&subop=massSubscribe&ids="+
+ var query = "?op=pref-feeds&subop=massSubscribe&ids="+
param_escape(selected.toString());
- new Ajax.Request(query, {
+ new Ajax.Request("backend.php", {
+ parameters: query,
onComplete: function(transport) {
feedlist_callback2(transport);
} });
// this button is not always available, no-op if not found
}
- var query = "backend.php?op=pref-feeds&subop=editCats";
+ var query = "?op=pref-feeds&subop=editCats";
- new Ajax.Request(query, {
+ new Ajax.Request("backend.php", {
+ parameters: query,
onComplete: function(transport) {
infobox_feed_cat_callback2(transport);
} });
notify_progress("Trying to change address...");
- var query = "backend.php?op=rpc&subop=regenPubKey";
+ var query = "?op=rpc&subop=regenPubKey";
- new Ajax.Request(query, {
+ new Ajax.Request("backend.php", {
+ parameters: query,
onComplete: function(transport) {
replace_pubkey_callback(transport);
} });
notify_progress("Clearing feed...");
- var query = "backend.php?op=pref-feeds&quiet=1&subop=clear&id=" + feed_id;
+ var query = "?op=pref-feeds&quiet=1&subop=clear&id=" + feed_id;
- new Ajax.Request(query, {
+ new Ajax.Request("backend.php", {
+ parameters: query,
onComplete: function(transport) {
notify('');
} });
if (ok) {
notify_progress("Rescoring selected feeds...", true);
- var query = "backend.php?op=pref-feeds&subop=rescore&quiet=1&ids="+
+ var query = "?op=pref-feeds&subop=rescore&quiet=1&ids="+
param_escape(sel_rows.toString());
- new Ajax.Request(query, {
+ new Ajax.Request("backend.php", {
+ parameters: query,
onComplete: function(transport) {
notify_callback2(transport);
} });
if (ok) {
notify_progress("Rescoring feeds...", true);
- var query = "backend.php?op=pref-feeds&subop=rescoreAll&quiet=1";
+ var query = "?op=pref-feeds&subop=rescoreAll&quiet=1";
- new Ajax.Request(query, {
+ new Ajax.Request("backend.php", {
+ parameters: query,
onComplete: function(transport) {
notify_callback2(transport);
} });
notify_progress("Removing filter...");
- var query = "backend.php?op=pref-filters&subop=remove&ids="+
+ var query = "?op=pref-filters&subop=remove&ids="+
param_escape(id);
- new Ajax.Request(query, {
+ new Ajax.Request("backend.php", {
+ parameters: query,
onComplete: function(transport) {
filterlist_callback2(transport);
} });
notify_progress("Removing feed...");
- var query = "backend.php?op=pref-feeds&subop=remove&ids="+
+ var query = "?op=pref-feeds&subop=remove&ids="+
param_escape(id);
- new Ajax.Request(query, {
+ new Ajax.Request("backend.php", {
+ parameters: query,
onComplete: function(transport) {
feedlist_callback2(transport);
} });
if (ok) {
- var query = "backend.php?op=pref-labels&subop=color-reset&ids="+
+ var query = "?op=pref-labels&subop=color-reset&ids="+
param_escape(labels.toString());
- new Ajax.Request(query, {
+ new Ajax.Request("backend.php", {
+ parameters: query,
onComplete: function(transport) {
labellist_callback2(transport);
} });
if (p != null) {
- var query = "backend.php?op=pref-labels&subop=color-set&kind=" + kind +
+ var query = "?op=pref-labels&subop=color-set&kind=" + kind +
"&ids="+ param_escape(id) + "&color=" + param_escape(p);
selectPrefRows('label', false);
}
}
- new Ajax.Request(query);
+ new Ajax.Request("backend.php", { parameters: query });
}
} catch (e) {
function colorPickerDo(id, fg, bg) {
try {
- var query = "backend.php?op=pref-labels&subop=color-set&kind=both"+
+ var query = "?op=pref-labels&subop=color-set&kind=both"+
"&ids=" + param_escape(id) + "&fg=" + param_escape(fg) +
"&bg=" + param_escape(bg);
e.style.backgroundColor = bg;
}
- new Ajax.Request(query);
+ new Ajax.Request("backend.php", { parameters: query });
} catch (e) {
exception_error("colorPickerDo", e);
debug("REFETCH query: " + query_str);
- new Ajax.Request(query_str, {
+ new Ajax.Request("backend.php", {
+ parameters: query_str,
onComplete: function(transport) {
refetch_callback2(transport);
} });
debug("updateFeedList Q=" + query_str);
- new Ajax.Request(query_str, {
+ new Ajax.Request("backend.php", {
+ parameters: query_str,
onComplete: function(transport) {
feedlist_callback2(transport);
} });
debug("catchupAllFeeds Q=" + query_str);
- new Ajax.Request(query_str, {
+ new Ajax.Request("backend.php", {
+ parameters: query_str,
onComplete: function(transport) {
feedlist_callback2(transport);
} });
loading_set_progress(30);
- new Ajax.Request("backend.php?op=rpc&subop=sanityCheck" + params, {
+ new Ajax.Request("backend.php", {
+ parameters: "backend.php?op=rpc&subop=sanityCheck" + params,
onComplete: function(transport) {
backend_sanity_check_callback(transport);
} });
if (confirm(__("Reset category order?"))) {
- var query = "backend.php?op=feeds&subop=catsortreset";
+ var query = "?op=feeds&subop=catsortreset";
notify_progress("Loading, please wait...", true);
- new Ajax.Request(query, {
+ new Ajax.Request("backend.php", {
+ parameters: query,
onComplete: function(transport) {
window.setTimeout('updateFeedList(false, false)', 50);
} });
if (title == undefined || confirm(msg)) {
notify_progress("Removing feed...");
- var query = "backend.php?op=pref-feeds&quiet=1&subop=remove&ids=" + feed_id;
+ var query = "?op=pref-feeds&quiet=1&subop=remove&ids=" + feed_id;
- new Ajax.Request(query, {
+ new Ajax.Request("backend.php", {
+ parameters: query,
onComplete: function(transport) {
dlg_frefresh_callback(transport, feed_id);
} });
var query = "";
if (feed > 0) {
- query = "backend.php?op=pref-feeds&subop=editfeed&id=" + param_escape(feed);
+ query = "?op=pref-feeds&subop=editfeed&id=" + param_escape(feed);
} else {
- query = "backend.php?op=pref-labels&subop=edit&id=" + param_escape(-feed-11);
+ query = "?op=pref-labels&subop=edit&id=" + param_escape(-feed-11);
}
disableHotkeys();
notify_progress("Loading, please wait...", true);
- new Ajax.Request(query, {
+ new Ajax.Request("backend.php", {
+ parameters: query,
onComplete: function(transport) {
infobox_callback2(transport);
} });
notify_progress("Clearing feed...");
- var query = "backend.php?op=pref-feeds&quiet=1&subop=clear&id=" + feed_id;
+ var query = "?op=pref-feeds&quiet=1&subop=clear&id=" + feed_id;
- new Ajax.Request(query, {
+ new Ajax.Request("backend.php", {
+ parameters: query,
onComplete: function(transport) {
dlg_frefresh_callback(transport, feed_id);
} });
if (fc) fc.style.left = fl.offsetWidth + 40 + "px";
}
- query = "backend.php?op=rpc&subop=setpref&key=_COLLAPSED_FEEDLIST&value=false";
+ query = "?op=rpc&subop=setpref&key=_COLLAPSED_FEEDLIST&value=false";
- new Ajax.Request(query);
+ new Ajax.Request("backend.php", { parameters: query });
} else {
Element.hide(fl);
}
- query = "backend.php?op=rpc&subop=setpref&key=_COLLAPSED_FEEDLIST&value=true";
+ query = "?op=rpc&subop=setpref&key=_COLLAPSED_FEEDLIST&value=true";
- new Ajax.Request(query);
+ new Ajax.Request("backend.php", { parameters: query });
}
} catch (e) {
var pr = prompt(__("Assign score to article:"), score);
if (pr != undefined) {
- var query = "backend.php?op=rpc&subop=setScore&id=" + id + "&score=" + pr;
+ var query = "?op=rpc&subop=setScore&id=" + id + "&score=" + pr;
- new Ajax.Request(query, {
+ new Ajax.Request("backend.php", {
+ parameters: query,
onComplete: function(transport) {
viewCurrentFeed();
} });
if (confirm(pr)) {
notify_progress("Rescoring articles...");
- var query = "backend.php?op=pref-feeds&subop=rescore&quiet=1&ids=" + actid;
+ var query = "?op=pref-feeds&subop=rescore&quiet=1&ids=" + actid;
- new Ajax.Request(query, {
- onComplete: function(transport) {
- viewCurrentFeed();
- } });
+ new Ajax.Request("backend.php", {
+ parameters: query,
+ onComplete: function(transport) {
+ viewCurrentFeed();
+ } });
}
}
return false;
}
- var query = "backend.php?op=pref-labels&subop=add&caption=" +
+ var query = "?op=pref-labels&subop=add&caption=" +
param_escape(caption);
notify_progress("Loading, please wait...", true);
- new Ajax.Request(query, {
+ new Ajax.Request("backend.php", {
+ parameters: query,
onComplete: function(transport) {
updateFeedList();
} });
var query = "backend.php?op=pref-feeds&subop=massSubscribe&ids="+
param_escape(selected.toString());
- new Ajax.Request(query, {
+ new Ajax.Request("backend.php", {
+ parameters: query,
onComplete: function(transport) {
updateFeedList();
} });
//setActiveFeedId(feed_id);
- var query = "backend.php?op=view&id=" + param_escape(id) +
+ var query = "?op=view&id=" + param_escape(id) +
"&feed=" + param_escape(feed_id);
var date = new Date();
last_requested_article = id;
- new Ajax.Request(query, {
+ new Ajax.Request("backend.php", {
+ parameters: query,
onComplete: function(transport) {
article_callback2(transport, id, feed_id);
} });
try {
- var query = "backend.php?op=rpc&id=" + id + "&subop=mark";
+ var query = "?op=rpc&id=" + id + "&subop=mark";
query = query + "&afid=" + getActiveFeedId();
if (!client_only) {
debug(query);
- new Ajax.Request(query, {
+ new Ajax.Request("backend.php", {
+ parameters: query,
onComplete: function(transport) {
all_counters_callback2(transport);
} });
try {
- var query = "backend.php?op=rpc&id=" + id + "&subop=publ";
+ var query = "?op=rpc&id=" + id + "&subop=publ";
query = query + "&afid=" + getActiveFeedId();
}
if (!client_only) {
- new Ajax.Request(query, {
+ new Ajax.Request("backend.php", {
+ parameters: query,
onComplete: function(transport) {
toggle_published_callback(transport);
} });
if (cmode == undefined) cmode = 2;
- var query = "backend.php?op=rpc&subop=catchupSelected" +
- "&cmode=" + param_escape(cmode);
-
- var ids = "?ids=" + param_escape(id);
+ var query = "?op=rpc&subop=catchupSelected" +
+ "&cmode=" + param_escape(cmode) + "&ids=" + param_escape(id);
// notify_progress("Loading, please wait...");
- new Ajax.Request(query, {
- parameters: ids,
+ new Ajax.Request("backend.php", {
+ parameters: query,
onComplete: function(transport) {
all_counters_callback2(transport);
} });
// if (ok) {
- var query = "backend.php?op=rpc&subop=removeFromLabel&ids=" +
+ var query = "?op=rpc&subop=removeFromLabel&ids=" +
param_escape(ids.toString()) + "&lid=" + param_escape(id);
// notify_progress("Loading, please wait...");
cache_invalidate("F:" + (-11 - id));
- new Ajax.Request(query, {
+ new Ajax.Request("backend.php", {
+ parameters: query,
onComplete: function(transport) {
show_labels_in_headlines(transport);
all_counters_callback2(transport);
cache_invalidate("F:" + (-11 - id));
- var query = "backend.php?op=rpc&subop=assignToLabel&ids=" +
+ var query = "?op=rpc&subop=assignToLabel&ids=" +
param_escape(ids.toString()) + "&lid=" + param_escape(id);
// notify_progress("Loading, please wait...");
- new Ajax.Request(query, {
+ new Ajax.Request("backend.php", {
+ parameters: query,
onComplete: function(transport) {
show_labels_in_headlines(transport);
all_counters_callback2(transport);
cmode = "0";
}
- var query = "backend.php?op=rpc&subop=catchupSelected" +
- "&cmode=" + cmode;
-
- var ids = "?ids=" + param_escape(rows.toString());
+ var query = "?op=rpc&subop=catchupSelected" +
+ "&cmode=" + cmode + "&ids=" + param_escape(rows.toString());
notify_progress("Loading, please wait...");
- new Ajax.Request(query, {
- parameters: ids,
+ new Ajax.Request("backend.php", {
+ parameters: query,
onComplete: function(transport) {
catchup_callback2(transport, callback_func);
} });
if (rows.length > 0) {
- var query = "backend.php?op=rpc&subop=markSelected&ids=" +
+ var query = "?op=rpc&subop=markSelected&ids=" +
param_escape(rows.toString()) + "&cmode=2";
query = query + "&afid=" + getActiveFeedId();
query = query + "&omode=lc";
- new Ajax.Request(query, {
+ new Ajax.Request("backend.php", {
+ parameters: query,
onComplete: function(transport) {
all_counters_callback2(transport);
} });
if (rows.length > 0) {
- var query = "backend.php?op=rpc&subop=publishSelected&ids=" +
+ var query = "?op=rpc&subop=publishSelected&ids=" +
param_escape(rows.toString()) + "&cmode=2";
query = query + "&afid=" + getActiveFeedId();
query = query + "&omode=lc";
- new Ajax.Request(query, {
+ new Ajax.Request("backend.php", {
+ parameters: query,
onComplete: function(transport) {
all_counters_callback2(transport);
} });
return;
}
- query = "backend.php?op=rpc&subop=delete&ids=" + param_escape(rows);
+ query = "?op=rpc&subop=delete&ids=" + param_escape(rows);
debug(query);
- new Ajax.Request(query, {
+ new Ajax.Request("backend.php", {
+ parameters: query,
onComplete: function(transport) {
viewCurrentFeed();
} });
return;
}
- query = "backend.php?op=rpc&subop="+op+"&ids=" + param_escape(rows);
+ query = "?op=rpc&subop="+op+"&ids=" + param_escape(rows);
debug(query);
cache_invalidate(rows[i]);
}
- new Ajax.Request(query, {
+ new Ajax.Request("backend.php", {
+ parameters: query,
onComplete: function(transport) {
viewCurrentFeed();
} });
var query = Form.serialize("tag_edit_form");
- query = "backend.php?op=rpc&subop=setArticleTags&" + query;
+ query = "?op=rpc&subop=setArticleTags&" + query;
debug(query);
- new Ajax.Request(query, {
+ new Ajax.Request("backend.php", {
+ parameters: query,
onComplete: function(transport) {
tag_saved_callback(transport);
} });
}
}
- var query = "backend.php?op=rpc&subop=catchupSelected" +
- "&cmode=0";
-
- var ids = "?ids=" + param_escape(ids.toString());
+ var query = "?op=rpc&subop=catchupSelected" +
+ "&cmode=0" + "&ids=" + param_escape(ids.toString());
- new Ajax.Request(query, {
- parameters: ids,
+ new Ajax.Request("backend.php", {
+ parameters: query,
onComplete: function(transport) {
all_counters_callback2(transport);
} });
cids_to_request.push(id);
- var query = "backend.php?op=rpc&subop=getArticles&ids=" +
+ var query = "?op=rpc&subop=getArticles&ids=" +
cids_to_request.toString();
- new Ajax.Request(query, {
+
+ new Ajax.Request("backend.php", {
+ parameters: query,
onComplete: function(transport) {
preload_article_callback(transport);
} });
e.className = e.className.replace("Unread", "");
}
- var query = "backend.php?op=rpc&subop=catchupSelected" +
- "&cmode=0";
-
- var ids = "?ids=" + param_escape(ids_to_mark.toString());
+ var query = "?op=rpc&subop=catchupSelected" +
+ "&cmode=0" + "&ids=" + param_escape(ids_to_mark.toString());
- new Ajax.Request(query, {
- parameters: ids,
+ new Ajax.Request("backend.php", {
+ parameters: query,
onComplete: function(transport) {
catchup_callback2(transport);
} });
function showOriginalArticleInline(id) {
try {
- var query = "backend.php?op=rpc&subop=getArticleLink&id=" + id;
+ var query = "?op=rpc&subop=getArticleLink&id=" + id;
notify_progress("Loading, please wait...", true);
- new Ajax.Request(query, {
+ new Ajax.Request("backend.php", {
+ parameters: query,
onComplete: function(transport) {
if (transport.responseXML) {