From 5d7688fe4310d15b2030693e44c242ac9e5573b5 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 28 Oct 2012 11:04:26 +0400 Subject: [PATCH] rpc: remove unneeded methods --- classes/rpc.php | 71 ------------------------------------------------- 1 file changed, 71 deletions(-) diff --git a/classes/rpc.php b/classes/rpc.php index 018bede2..cb3eeda9 100644 --- a/classes/rpc.php +++ b/classes/rpc.php @@ -681,7 +681,6 @@ class RPC extends Handler_Protected { return; } - function verifyRegexp() { $reg_exp = $_REQUEST["reg_exp"]; @@ -690,76 +689,6 @@ class RPC extends Handler_Protected { print json_encode(array("status" => $status)); } - // TODO: unify with digest-get-contents? - function cdmGetArticle() { - $ids = array(db_escape_string($_REQUEST["id"])); - $cids = explode(",", $_REQUEST["cids"]); - - $ids = array_merge($ids, $cids); - - $rv = array(); - - foreach ($ids as $id) { - $id = (int)$id; - - $result = db_query($this->link, "SELECT content, - ttrss_feeds.site_url AS site_url FROM ttrss_user_entries - LEFT JOIN ttrss_feeds ON (ttrss_feeds.id = ttrss_user_entries.feed_id), - ttrss_entries - WHERE ref_id = '$id' AND - ttrss_entries.id = ref_id AND - ttrss_user_entries.owner_uid = ".$_SESSION["uid"]); - - if (db_num_rows($result) != 0) { - $line = db_fetch_assoc($result); - - $article_content = sanitize($this->link, $line["content"], - false, false, $line['site_url']); - - array_push($rv, - array("id" => $id, "content" => $article_content)); - } - } - - print json_encode($rv); - } - - function scheduleFeedUpdate() { - $feed_id = db_escape_string($_REQUEST["id"]); - $is_cat = db_escape_string($_REQUEST['is_cat']) == 'true'; - - $message = __("Your request could not be completed."); - - if ($feed_id >= 0) { - if (!$is_cat) { - $message = __("Feed update has been scheduled."); - - db_query($this->link, "UPDATE ttrss_feeds SET - last_update_started = '1970-01-01', - last_updated = '1970-01-01' WHERE id = '$feed_id' AND - owner_uid = ".$_SESSION["uid"]); - - } else { - $message = __("Category update has been scheduled."); - - if ($feed_id) - $cat_query = "cat_id = '$feed_id'"; - else - $cat_query = "cat_id IS NULL"; - - db_query($this->link, "UPDATE ttrss_feeds SET - last_update_started = '1970-01-01', - last_updated = '1970-01-01' WHERE $cat_query AND - owner_uid = ".$_SESSION["uid"]); - } - } else { - $message = __("Can't update this kind of feed."); - } - - print json_encode(array("message" => $message)); - return; - } - function buttonPlugin() { $pclass = "button_" . basename($_REQUEST['plugin']); $method = $_REQUEST['plugin_method']; -- 2.39.5