From: Andrew Dolgov Date: Fri, 22 Mar 2013 05:49:45 +0000 (+0400) Subject: remove PTITLE kludge; use ajax X-Git-Tag: 1.7.5~26 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=5defc29ff832d4c7bfb40cab0df1a34d0664409f;p=tt-rss.git remove PTITLE kludge; use ajax --- diff --git a/classes/feeds.php b/classes/feeds.php index 3a1ac2f5..7f4c1d6c 100644 --- a/classes/feeds.php +++ b/classes/feeds.php @@ -533,9 +533,6 @@ class Feeds extends Handler_Protected { $reply['content'] .= ""; - $reply['content'] .= "
" . - htmlspecialchars(strip_tags($line['title'])) . "
"; - $reply['content'] .= " diff --git a/classes/rpc.php b/classes/rpc.php index 6f906407..ee5a9e68 100644 --- a/classes/rpc.php +++ b/classes/rpc.php @@ -829,16 +829,17 @@ class RPC extends Handler_Protected { } } - function getlinkbyid() { + function getlinktitlebyid() { $id = db_escape_string($this->link, $_REQUEST['id']); - $result = db_query($this->link, "SELECT link FROM ttrss_entries, ttrss_user_entries + $result = db_query($this->link, "SELECT link, title FROM ttrss_entries, ttrss_user_entries WHERE ref_id = '$id' AND ref_id = id AND owner_uid = ". $_SESSION["uid"]); if (db_num_rows($result) != 0) { $link = db_fetch_result($result, 0, "link"); + $title = db_fetch_result($result, 0, "title"); - echo json_encode(array("link" => $link)); + echo json_encode(array("link" => $link, "title" => $title)); } else { echo json_encode(array("error" => "ARTICLE_NOT_FOUND")); } diff --git a/include/functions.php b/include/functions.php index 7d4ce291..238ba012 100644 --- a/include/functions.php +++ b/include/functions.php @@ -2989,11 +2989,6 @@ "; } - $title_escaped = htmlspecialchars($line['title']); - - $rv['content'] .= "
" . - strip_tags($line['title']) . "
"; - $rv['content'] .= "
"; $rv['content'] .= "
"; @@ -3091,31 +3086,6 @@ $rv['content'] .= "
"; - // N-grams - - if (DB_TYPE == "pgsql" and defined('_NGRAM_TITLE_RELATED_THRESHOLD')) { - - $ngram_result = db_query($link, "SELECT id,title FROM - ttrss_entries,ttrss_user_entries - WHERE ref_id = id AND updated >= NOW() - INTERVAL '7 day' - AND similarity(title, '$title_escaped') >= "._NGRAM_TITLE_RELATED_THRESHOLD." - AND title != '$title_escaped' - AND owner_uid = $owner_uid"); - - if (db_num_rows($ngram_result) > 0) { - $rv['content'] .= "
". - "" . __('Related').""; - $rv['content'] .= "
"; - - while ($nline = db_fetch_assoc($ngram_result)) { - $rv['content'] .= "
".$nline['title']."
"; - - } - $rv['content'] .= "