]> git.wh0rd.org - tt-rss.git/blobdiff - classes/rpc.php
remove obsolete checkDate stuff
[tt-rss.git] / classes / rpc.php
index 34f623b061b594ec043a433d660b659f779cbafc..64e09d1e7f8d0511a76639a6ad520ea23500a8af 100644 (file)
@@ -480,14 +480,6 @@ class RPC extends Handler_Protected {
                print json_encode($articles);
        }
 
-       function checkDate() {
-               $date = db_escape_string($this->link, $_REQUEST["date"]);
-               $date_parsed = strtotime($date);
-
-               print json_encode(array("result" => (bool)$date_parsed,
-                       "date" => date("c", $date_parsed)));
-       }
-
        function assigntolabel() {
                return $this->labelops(true);
        }
@@ -640,68 +632,6 @@ class RPC extends Handler_Protected {
                return;
        }
 
-       function verifyRegexp() {
-               $reg_exp = $_REQUEST["reg_exp"];
-
-               $status = @preg_match("/$reg_exp/i", "TEST") !== false;
-
-               print json_encode(array("status" => $status));
-       }
-
-       /* function buttonPlugin() {
-               $pclass = "button_" . basename($_REQUEST['plugin']);
-               $method = $_REQUEST['plugin_method'];
-
-               if (class_exists($pclass)) {
-                       $plugin = new $pclass($this->link);
-                       if (method_exists($plugin, $method)) {
-                               return $plugin->$method();
-                       }
-               }
-       } */
-
-       function genHash() {
-               $hash = sha1(uniqid(rand(), true));
-
-               print json_encode(array("hash" => $hash));
-       }
-
-       function batchAddFeeds() {
-               $cat_id = db_escape_string($this->link, $_REQUEST['cat']);
-               $feeds = explode("\n", db_escape_string($this->link, $_REQUEST['feeds']));
-               $login = db_escape_string($this->link, $_REQUEST['login']);
-               $pass = db_escape_string($this->link, $_REQUEST['pass']);
-
-               foreach ($feeds as $feed) {
-                       $feed = trim($feed);
-
-                       if (validate_feed_url($feed)) {
-
-                               db_query($this->link, "BEGIN");
-
-                               if ($cat_id == "0" || !$cat_id) {
-                                       $cat_qpart = "NULL";
-                               } else {
-                                       $cat_qpart = "'$cat_id'";
-                               }
-
-                               $result = db_query($this->link,
-                                       "SELECT id FROM ttrss_feeds
-                                       WHERE feed_url = '$feed' AND owner_uid = ".$_SESSION["uid"]);
-
-                               if (db_num_rows($result) == 0) {
-                                       $result = db_query($this->link,
-                                               "INSERT INTO ttrss_feeds
-                                                       (owner_uid,feed_url,title,cat_id,auth_login,auth_pass,update_method)
-                                               VALUES ('".$_SESSION["uid"]."', '$feed',
-                                                       '[Unknown]', $cat_qpart, '$login', '$pass', 0)");
-                               }
-
-                               db_query($this->link, "COMMIT");
-                       }
-               }
-       }
-
        function setScore() {
                $ids = db_escape_string($this->link, $_REQUEST['id']);
                $score = (int)db_escape_string($this->link, $_REQUEST['score']);
@@ -896,32 +826,5 @@ class RPC extends Handler_Protected {
                }
        }
 
-       function cdmArticlePreview() {
-               $id = db_escape_string($this->link, $_REQUEST['id']);
-
-               $result = db_query($this->link, "SELECT link,
-                       ttrss_entries.title, content, feed_url
-                       FROM
-                       ttrss_entries, ttrss_user_entries
-                               LEFT JOIN ttrss_feeds ON (ttrss_user_entries.feed_id = ttrss_feeds.id)
-                       WHERE ref_id = '$id' AND ref_id = ttrss_entries.id AND
-                               ttrss_user_entries.owner_uid = ". $_SESSION["uid"]);
-
-               if (db_num_rows($result) != 0) {
-                       $link = db_fetch_result($result, 0, "link");
-                       $title = db_fetch_result($result, 0, "title");
-                       $feed_url = db_fetch_result($result, 0, "feed_url");
-
-                       $content = sanitize($this->link,
-                               db_fetch_result($result, 0, "content"), false, false, $feed_url);
-
-                       print "<div class='content'>".$content."</content>";
-
-               } else {
-                       print "Article not found.";
-               }
-
-       }
-
 }
 ?>