Commit 814483b7 authored by Sebastian Reichel's avatar Sebastian Reichel

Imported Upstream version 1.12+dfsg

parent 9c1293d9
......@@ -77,6 +77,7 @@ class API extends Handler {
$this->wrap(self::STATUS_OK, array("session_id" => session_id(),
"api_level" => self::API_LEVEL));
} else { // else we are not logged in
user_error("Failed login attempt for $login from {$_SERVER['REMOTE_ADDR']}", E_USER_WARNING);
$this->wrap(self::STATUS_ERR, array("error" => "LOGIN_ERROR"));
}
} else {
......@@ -516,7 +517,7 @@ class API extends Handler {
if ($unread || !$unread_only) {
$row = array(
"id" => $cv["id"],
"id" => (int) $cv["id"],
"title" => $cv["description"],
"unread" => $cv["counter"],
"cat_id" => -2,
......@@ -562,7 +563,7 @@ class API extends Handler {
if ($unread || !$unread_only) {
$row = array(
"id" => $line["id"],
"id" => (int) $line["id"],
"title" => $line["title"],
"unread" => $unread,
"is_cat" => true,
......
......@@ -30,7 +30,6 @@ class Article extends Handler_Protected {
$id = $this->dbh->escape_string($_REQUEST["id"]);
$cids = explode(",", $this->dbh->escape_string($_REQUEST["cids"]));
$mode = $this->dbh->escape_string($_REQUEST["mode"]);
$omode = $this->dbh->escape_string($_REQUEST["omode"]);
// in prefetch mode we only output requested cids, main article
// just gets marked as read (it already exists in client cache)
......
......@@ -16,7 +16,6 @@ class Dlg extends Handler_Protected {
print __("If you have imported labels and/or filters, you might need to reload preferences to see your new data.") . "</p>";
print "<div class=\"prefFeedOPMLHolder\">";
$owner_uid = $_SESSION["uid"];
$this->dbh->query("BEGIN");
......
......@@ -43,9 +43,9 @@ class FeedItem_Atom extends FeedItem_Common {
$base = $this->xpath->evaluate("string(ancestor-or-self::*[@xml:base][1]/@xml:base)", $link);
if ($base)
return rewrite_relative_url($base, $link->getAttribute("href"));
return rewrite_relative_url($base, trim($link->getAttribute("href")));
else
return $link->getAttribute("href");
return trim($link->getAttribute("href"));
}
}
......@@ -55,7 +55,7 @@ class FeedItem_Atom extends FeedItem_Common {
$title = $this->elem->getElementsByTagName("title")->item(0);
if ($title) {
return $title->nodeValue;
return trim($title->nodeValue);
}
}
......@@ -106,13 +106,13 @@ class FeedItem_Atom extends FeedItem_Common {
foreach ($categories as $cat) {
if ($cat->hasAttribute("term"))
array_push($cats, $cat->getAttribute("term"));
array_push($cats, trim($cat->getAttribute("term")));
}
$categories = $this->xpath->query("dc:subject", $this->elem);
foreach ($categories as $cat) {
array_push($cats, $cat->nodeValue);
array_push($cats, trim($cat->nodeValue));
}
return $cats;
......@@ -160,19 +160,21 @@ class FeedItem_Atom extends FeedItem_Common {
$content = $this->xpath->query("media:content", $enclosure)->item(0);
$enc->type = $content->getAttribute("type");
$enc->link = $content->getAttribute("url");
$enc->length = $content->getAttribute("length");
if ($content) {
$enc->type = $content->getAttribute("type");
$enc->link = $content->getAttribute("url");
$enc->length = $content->getAttribute("length");
$desc = $this->xpath->query("media:description", $content)->item(0);
if ($desc) {
$enc->title = strip_tags($desc->nodeValue);
} else {
$desc = $this->xpath->query("media:description", $enclosure)->item(0);
if ($desc) $enc->title = strip_tags($desc->nodeValue);
}
$desc = $this->xpath->query("media:description", $content)->item(0);
if ($desc) {
$enc->title = strip_tags($desc->nodeValue);
} else {
$desc = $this->xpath->query("media:description", $enclosure)->item(0);
if ($desc) $enc->title = strip_tags($desc->nodeValue);
array_push($encs, $enc);
}
array_push($encs, $enc);
}
$enclosures = $this->xpath->query("media:thumbnail", $this->elem);
......
......@@ -44,13 +44,26 @@ abstract class FeedItem_Common extends FeedItem {
}
}
// todo
function get_comments_url() {
//RSS only. Use a query here to avoid namespace clashes (e.g. with slash).
//might give a wrong result if a default namespace was declared (possible with XPath 2.0)
$com_url = $this->xpath->query("comments", $this->elem)->item(0);
if($com_url)
return $com_url->nodeValue;
//Atom Threading Extension (RFC 4685) stuff. Could be used in RSS feeds, so it's in common.
//'text/html' for type is too restrictive?
$com_url = $this->xpath->query("atom:link[@rel='replies' and contains(@type,'text/html')]/@href", $this->elem)->item(0);
if($com_url)
return $com_url->nodeValue;
}
function get_comments_count() {
$comments = $this->xpath->query("slash:comments", $this->elem)->item(0);
//also query for ATE stuff here
$query = "slash:comments|thread:total|atom:link[@rel='replies']/@thread:count";
$comments = $this->xpath->query($query, $this->elem)->item(0);
if ($comments) {
return $comments->nodeValue;
......
......@@ -33,20 +33,20 @@ class FeedItem_RSS extends FeedItem_Common {
|| $link->getAttribute("rel") == "alternate"
|| $link->getAttribute("rel") == "standout")) {
return $link->getAttribute("href");
return trim($link->getAttribute("href"));
}
}
$link = $this->elem->getElementsByTagName("guid")->item(0);
if ($link && $link->hasAttributes() && $link->getAttribute("isPermaLink") == "true") {
return $link->nodeValue;
return trim($link->nodeValue);
}
$link = $this->elem->getElementsByTagName("link")->item(0);
if ($link) {
return $link->nodeValue;
return trim($link->nodeValue);
}
}
......@@ -54,21 +54,26 @@ class FeedItem_RSS extends FeedItem_Common {
$title = $this->elem->getElementsByTagName("title")->item(0);
if ($title) {
return $title->nodeValue;
return trim($title->nodeValue);
}
}
function get_content() {
$content = $this->xpath->query("content:encoded", $this->elem)->item(0);
$contentA = $this->xpath->query("content:encoded", $this->elem)->item(0);
$contentB = $this->elem->getElementsByTagName("description")->item(0);
if ($content) {
return $content->nodeValue;
if ($contentA && !$contentB) {
return $contentA->nodeValue;
}
$content = $this->elem->getElementsByTagName("description")->item(0);
if ($content) {
return $content->nodeValue;
if ($contentB && !$contentA) {
return $contentB->nodeValue;
}
if ($contentA && $contentB) {
return mb_strlen($contentA->nodeValue) > mb_strlen($contentB->nodeValue) ?
$contentA->nodeValue : $contentB->nodeValue;
}
}
......@@ -85,13 +90,13 @@ class FeedItem_RSS extends FeedItem_Common {
$cats = array();
foreach ($categories as $cat) {
array_push($cats, $cat->nodeValue);
array_push($cats, trim($cat->nodeValue));
}
$categories = $this->xpath->query("dc:subject", $this->elem);
foreach ($categories as $cat) {
array_push($cats, $cat->nodeValue);
array_push($cats, trim($cat->nodeValue));
}
return $cats;
......@@ -135,19 +140,21 @@ class FeedItem_RSS extends FeedItem_Common {
$content = $this->xpath->query("media:content", $enclosure)->item(0);
$enc->type = $content->getAttribute("type");
$enc->link = $content->getAttribute("url");
$enc->length = $content->getAttribute("length");
if ($content) {
$enc->type = $content->getAttribute("type");
$enc->link = $content->getAttribute("url");
$enc->length = $content->getAttribute("length");
$desc = $this->xpath->query("media:description", $content)->item(0);
if ($desc) {
$enc->title = strip_tags($desc->nodeValue);
} else {
$desc = $this->xpath->query("media:description", $enclosure)->item(0);
if ($desc) $enc->title = strip_tags($desc->nodeValue);
}
$desc = $this->xpath->query("media:description", $content)->item(0);
if ($desc) {
$enc->title = strip_tags($desc->nodeValue);
} else {
$desc = $this->xpath->query("media:description", $enclosure)->item(0);
if ($desc) $enc->title = strip_tags($desc->nodeValue);
}
array_push($encs, $enc);
array_push($encs, $enc);
}
}
$enclosures = $this->xpath->query("media:thumbnail", $this->elem);
......
......@@ -97,6 +97,7 @@ class FeedParser {
$xpath->registerNamespace('slash', 'http://purl.org/rss/1.0/modules/slash/');
$xpath->registerNamespace('dc', 'http://purl.org/dc/elements/1.1/');
$xpath->registerNamespace('content', 'http://purl.org/rss/1.0/modules/content/');
$xpath->registerNamespace('thread', 'http://purl.org/syndication/thread/1.0');
$this->xpath = $xpath;
......@@ -204,6 +205,10 @@ class FeedParser {
break;
}
if ($this->title) $this->title = trim($this->title);
if ($this->link) $this->link = trim($this->link);
} else {
if( !isset($this->error) ){
$this->error = "Unknown/unsupported feed type";
......@@ -251,7 +256,7 @@ class FeedParser {
foreach ($links as $link) {
if (!$rel || $link->hasAttribute('rel') && $link->getAttribute('rel') == $rel) {
array_push($rv, $link->getAttribute('href'));
array_push($rv, trim($link->getAttribute('href')));
}
}
break;
......@@ -260,7 +265,7 @@ class FeedParser {
foreach ($links as $link) {
if (!$rel || $link->hasAttribute('rel') && $link->getAttribute('rel') == $rel) {
array_push($rv, $link->getAttribute('href'));
array_push($rv, trim($link->getAttribute('href')));
}
}
break;
......
......@@ -13,12 +13,6 @@ class Feeds extends Handler_Protected {
$feed_id, $is_cat, $search,
$search_mode, $view_mode, $error, $feed_last_updated) {
$page_prev_link = "viewFeedGoPage(-1)";
$page_next_link = "viewFeedGoPage(1)";
$page_first_link = "viewFeedGoPage(0)";
$catchup_page_link = "catchupPage()";
$catchup_feed_link = "catchupCurrentFeed()";
$catchup_sel_link = "catchupSelection()";
$archive_sel_link = "archiveSelection()";
......@@ -43,6 +37,8 @@ class Feeds extends Handler_Protected {
$search_q = "";
}
$reply .= "<span class=\"holder\">";
$rss_link = htmlspecialchars(get_self_url_prefix() .
"/public.php?op=rss&id=$feed_id$cat_q$search_q");
......@@ -50,8 +46,14 @@ class Feeds extends Handler_Protected {
$error_class = $error ? "error" : "";
$reply .= "<span class='r'>";
$reply .= "<span id='selected_prompt'></span>";
$reply .= "<span class='r'>
<a href=\"#\"
title=\"".__("View as RSS feed")."\"
onclick=\"displayDlg('".__("View as RSS")."','generatedFeed', '$feed_id:$is_cat:$rss_link')\">
<img class=\"noborder\" src=\"images/pub_set.png\"></a>";
# $reply .= "<span>";
$reply .= "<span id='feed_title' class='$error_class'>";
if ($feed_site_url) {
......@@ -60,7 +62,7 @@ class Feeds extends Handler_Protected {
$target = "target=\"_blank\"";
$reply .= "<a title=\"$last_updated\" $target href=\"$feed_site_url\">".
truncate_string($feed_title,30)."</a>";
truncate_string($feed_title, 30)."</a>";
if ($error) {
$error = htmlspecialchars($error);
......@@ -73,17 +75,16 @@ class Feeds extends Handler_Protected {
$reply .= "</span>";
$reply .= "
<a href=\"#\"
title=\"".__("View as RSS feed")."\"
onclick=\"displayDlg('".__("View as RSS")."','generatedFeed', '$feed_id:$is_cat:$rss_link')\">
<img class=\"noborder\" style=\"vertical-align : middle\" src=\"images/pub_set.png\"></a>";
$reply .= "</span>";
# $reply .= "</span>";
// left part
$reply .= __('Select:')."
$reply .= "<span class=\"main\">";
$reply .= "<span id='selected_prompt'></span>";
$reply .= "
<a href=\"#\" onclick=\"$sel_all_link\">".__('All')."</a>,
<a href=\"#\" onclick=\"$sel_unread_link\">".__('Unread')."</a>,
<a href=\"#\" onclick=\"$sel_inv_link\">".__('Invert')."</a>,
......@@ -132,14 +133,14 @@ class Feeds extends Handler_Protected {
$reply .= "</select>";
//$reply .= "</div>";
//$reply .= "</h2";
foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_HEADLINE_TOOLBAR_BUTTON) as $p) {
echo $p->hook_headline_toolbar_button($feed_id, $is_cat);
}
$reply .= "</span></span>";
return $reply;
}
......@@ -247,6 +248,8 @@ class Feeds extends Handler_Protected {
false, 0, $include_children);
}
$vfeed_group_enabled = get_pref("VFEED_GROUP_BY_FEED") && $feed != -6;
if ($_REQUEST["debug"]) $timing_info = print_checkpoint("H1", $timing_info);
$result = $qfh_ret[0];
......@@ -285,8 +288,6 @@ class Feeds extends Handler_Protected {
$num_unread = 0;
$cur_feed_title = '';
$fresh_intl = get_pref("FRESH_ARTICLE_MAX_AGE") * 60 * 60;
if ($_REQUEST["debug"]) $timing_info = print_checkpoint("PS", $timing_info);
$expand_cdm = get_pref('CDM_EXPANDED');
......@@ -422,7 +423,7 @@ class Feeds extends Handler_Protected {
if (!get_pref('COMBINED_DISPLAY_MODE')) {
if (get_pref('VFEED_GROUP_BY_FEED')) {
if ($vfeed_group_enabled) {
if ($feed_id != $vgroup_last_feed && $line["feed_title"]) {
$cur_feed_title = $line["feed_title"];
......@@ -473,17 +474,18 @@ class Feeds extends Handler_Protected {
$reply['content'] .= "</div>";
$reply['content'] .= "<span class=\"hlUpdated\">";
if (!get_pref('VFEED_GROUP_BY_FEED')) {
if (!$vfeed_group_enabled) {
if (@$line["feed_title"]) {
$rgba = @$rgba_cache[$feed_id];
$reply['content'] .= "<a class=\"hlFeed\" style=\"background : rgba($rgba, 0.3)\" href=\"#\" onclick=\"viewfeed($feed_id)\">".
truncate_string($line["feed_title"],30)."</a>";
$reply['content'] .= "<span class=\"hlFeed\"><a style=\"background : rgba($rgba, 0.3)\" href=\"#\" onclick=\"viewfeed($feed_id)\">".
truncate_string($line["feed_title"],30)."</a></span>";
}
}
$reply['content'] .= "<span class=\"hlUpdated\">";
$reply['content'] .= "<div title='$date_entered_fmt'>$updated_fmt</div>
</span>";
......@@ -491,7 +493,7 @@ class Feeds extends Handler_Protected {
$reply['content'] .= $score_pic;
if ($line["feed_title"] && !get_pref('VFEED_GROUP_BY_FEED')) {
if ($line["feed_title"] && !$vfeed_group_enabled) {
$reply['content'] .= "<span onclick=\"viewfeed($feed_id)\"
style=\"cursor : pointer\"
......@@ -516,7 +518,7 @@ class Feeds extends Handler_Protected {
$line = $p->hook_render_article_cdm($line);
}
if (get_pref('VFEED_GROUP_BY_FEED') && $line["feed_title"]) {
if ($vfeed_group_enabled && $line["feed_title"]) {
if ($feed_id != $vgroup_last_feed) {
$cur_feed_title = $line["feed_title"];
......@@ -549,7 +551,7 @@ class Feeds extends Handler_Protected {
$reply['content'] .= "<div class=\"cdm $hlc_suffix $expanded_class $class\"
id=\"RROW-$id\" orig-feed-id='$feed_id' $mouseover_attrs>";
$reply['content'] .= "<div class=\"cdmHeader\" style=\"$row_background\">";
$reply['content'] .= "<div class=\"cdmHeader\">";
$reply['content'] .= "<div style=\"vertical-align : middle\">";
$reply['content'] .= "<input dojoType=\"dijit.form.CheckBox\"
......@@ -592,7 +594,7 @@ class Feeds extends Handler_Protected {
$reply['content'] .= "</span>";
if (!get_pref('VFEED_GROUP_BY_FEED')) {
if (!$vfeed_group_enabled) {
if (@$line["feed_title"]) {
$rgba = @$rgba_cache[$feed_id];
......@@ -725,7 +727,7 @@ class Feeds extends Handler_Protected {
$reply['content'] .= "</div>";
$reply['content'] .= "</div>";
$reply['content'] .= "</div><hr/>";
$reply['content'] .= "</div>";
$reply['content'] .= "</div>";
......@@ -803,8 +805,6 @@ class Feeds extends Handler_Protected {
if ($_REQUEST["debug"]) $timing_info = print_checkpoint("0", $timing_info);
$omode = $this->dbh->escape_string($_REQUEST["omode"]);
$feed = $this->dbh->escape_string($_REQUEST["feed"]);
$method = $this->dbh->escape_string($_REQUEST["m"]);
$view_mode = $this->dbh->escape_string($_REQUEST["view_mode"]);
......@@ -897,7 +897,7 @@ class Feeds extends Handler_Protected {
//$topmost_article_ids = $ret[0];
$headlines_count = $ret[1];
$returned_feed = $ret[2];
/* $returned_feed = $ret[2]; */
$disable_cache = $ret[3];
$vgroup_last_feed = $ret[4];
......@@ -1077,20 +1077,18 @@ class Feeds extends Handler_Protected {
print " <select dojoType=\"dijit.form.Select\" name=\"limit\" onchange=\"dijit.byId('feedBrowserDlg').update()\">";
foreach (array(25, 50, 100, 200) as $l) {
$issel = ($l == $limit) ? "selected=\"1\"" : "";
print "<option $issel value=\"$l\">$l</option>";
//$issel = ($l == $limit) ? "selected=\"1\"" : "";
print "<option value=\"$l\">$l</option>";
}
print "</select> ";
print "</div>";
$owner_uid = $_SESSION["uid"];
require_once "feedbrowser.php";
print "<ul class='browseFeedList' id='browseFeedList'>";
print make_feed_browser($search, 25);
print make_feed_browser("", 25);
print "</ul>";
print "<div align='center'>
......
This diff is collapsed.
......@@ -257,8 +257,8 @@ class Opml extends Handler_Protected {
$feed_title = $this->dbh->escape_string(mb_substr($attrs->getNamedItem('text')->nodeValue, 0, 250));
if (!$feed_title) $feed_title = $this->dbh->escape_string(mb_substr($attrs->getNamedItem('title')->nodeValue, 0, 250));
$feed_url = $this->dbh->escape_string(mb_substr($attrs->getNamedItem('xmlUrl')->nodeValue, 0, 250));
if (!$feed_url) $feed_url = $this->dbh->escape_string(mb_substr($attrs->getNamedItem('xmlURL')->nodeValue, 0, 250));
$feed_url = $this->dbh->escape_string($attrs->getNamedItem('xmlUrl')->nodeValue);
if (!$feed_url) $feed_url = $this->dbh->escape_string($attrs->getNamedItem('xmlURL')->nodeValue);
$site_url = $this->dbh->escape_string(mb_substr($attrs->getNamedItem('htmlUrl')->nodeValue, 0, 250));
......
......@@ -75,6 +75,16 @@ class PluginHost {
return $this->dbh;
}
function get_plugin_names() {
$names = array();
foreach ($this->plugins as $p) {
array_push($names, get_class($p));
}
return $names;
}
function get_plugins() {
return $this->plugins;
}
......@@ -99,7 +109,7 @@ class PluginHost {
function del_hook($type, $sender) {
if (is_array($this->hooks[$type])) {
$key = array_Search($this->hooks[$type], $sender);
$key = array_Search($sender, $this->hooks[$type]);
if ($key !== FALSE) {
unset($this->hooks[$type][$key]);
}
......
......@@ -395,7 +395,7 @@ class Pref_Feeds extends Handler_Protected {
# print_r($data['items']);
if (is_array($data) && is_array($data['items'])) {
$cat_order_id = 0;
# $cat_order_id = 0;
$data_map = array();
$root_item = false;
......@@ -962,7 +962,7 @@ class Pref_Feeds extends Handler_Protected {
if (!$batch) {
$result = $this->dbh->query("UPDATE ttrss_feeds SET
$this->dbh->query("UPDATE ttrss_feeds SET
$category_qpart
title = '$feed_title', feed_url = '$feed_link',
update_interval = '$upd_intl',
......@@ -1573,8 +1573,6 @@ class Pref_Feeds extends Handler_Protected {
# class needed for selectTableRows()
print "<tr class=\"placeholder\" $this_row_id>";
$edit_title = htmlspecialchars($line["title"]);
# id needed for selectTableRows()
print "<td width='5%' align='center'><input
onclick='toggleSelectRow2(this);' dojoType=\"dijit.form.CheckBox\"
......@@ -1639,8 +1637,6 @@ class Pref_Feeds extends Handler_Protected {
# class needed for selectTableRows()
print "<tr class=\"placeholder\" $this_row_id>";
$edit_title = htmlspecialchars($line["title"]);
# id needed for selectTableRows()
print "<td width='5%' align='center'><input
onclick='toggleSelectRow2(this);' dojoType=\"dijit.form.CheckBox\"
......@@ -1891,7 +1887,7 @@ class Pref_Feeds extends Handler_Protected {
AND owner_uid = " . $owner_uid);
if ($this->dbh->num_rows($result) == 1) {
$key = $this->dbh->escape_string(sha1(uniqid(rand(), true)));
$key = $this->dbh->escape_string(uniqid(base_convert(rand(), 10, 36)));
$this->dbh->query("UPDATE ttrss_access_keys SET access_key = '$key'
WHERE feed_id = '$feed_id' AND is_cat = $sql_is_cat
......
......@@ -88,7 +88,6 @@ class Pref_Filters extends Handler_Protected {
$result = $qfh_ret[0];
$articles = array();
$found = 0;
print __("Articles matching this filter:");
......@@ -103,9 +102,6 @@ class Pref_Filters extends Handler_Protected {
$line = $p->hook_query_headlines($line, 100);
}
$entry_timestamp = strtotime($line["updated"]);
$entry_tags = get_article_tags($line["id"], $_SESSION["uid"]);
$content_preview = $line["content_preview"];
if ($line["feed_title"])
......@@ -174,24 +170,11 @@ class Pref_Filters extends Handler_Protected {
owner_uid = ".$_SESSION["uid"]." ORDER BY order_id, title");
$action_id = -1;
$folder = array();
$folder['items'] = array();
while ($line = $this->dbh->fetch_assoc($result)) {
/* if ($action_id != $line["action_id"]) {
if (count($folder['items']) > 0) {
array_push($root['items'], $folder);
}
$folder = array();
$folder['id'] = $line["action_id"];
$folder['name'] = __($line["action_name"]);
$folder['items'] = array();
$action_id = $line["action_id"];
} */
$name = $this->getFilterName($line["id"]);
$match_ok = false;
......@@ -471,7 +454,7 @@ class Pref_Filters extends Handler_Protected {
$inverse = checkbox_to_sql_bool($this->dbh->escape_string($_REQUEST["inverse"]));
$title = $this->dbh->escape_string($_REQUEST["title"]);
$result = $this->dbh->query("UPDATE ttrss_filters2 SET enabled = $enabled,
$this->dbh->query("UPDATE ttrss_filters2 SET enabled = $enabled,
match_any_rule = $match_any_rule,
inverse = $inverse,
title = '$title'
......
......@@ -887,8 +887,9 @@ class Pref_Prefs extends Handler_Protected {
if (!$otp_enabled) {
$secret = $base32->encode(sha1($this->dbh->fetch_result($result, 0, "salt")));
$topt = new \OTPHP\TOTP($secret);
print QRcode::png($topt->provisioning_uri($login));
print QRcode::png("otpauth://totp/".urlencode($login).
"?secret=$secret&issuer=".urlencode("Tiny Tiny RSS"));
}
}
......
......@@ -258,7 +258,7 @@ class Pref_Users extends Handler_Protected {
$pwd_hash = encrypt_password($tmp_user_pwd, $new_salt, true);
db_query("UPDATE ttrss_users SET pwd_hash = '$pwd_hash', salt = '$new_salt'
db_query("UPDATE ttrss_users SET pwd_hash = '$pwd_hash', salt = '$new_salt', otp_enabled = false
WHERE id = '$uid'");
if ($show_password) {
......
......@@ -95,7 +95,7 @@ class RPC extends Handler_Protected {
WHERE orig_feed_id = '$id') = 0 AND
id = '$id' AND owner_uid = ".$_SESSION["uid"]);
$rc = $this->dbh->affected_rows($result);
$this->dbh->affected_rows($result);
}
}
......@@ -138,7 +138,7 @@ class RPC extends Handler_Protected {
$mark = "false";
}
$result = $this->dbh->query("UPDATE ttrss_user_entries SET marked = $mark,
$this->dbh->query("UPDATE ttrss_user_entries SET marked = $mark,
last_marked = NOW()
WHERE ref_id = '$id' AND owner_uid = " . $_SESSION["uid"]);
......@@ -148,8 +148,8 @@ class RPC extends Handler_Protected {
function delete() {
$ids = $this->dbh->escape_string($_REQUEST["ids"]);
$result = $this->dbh->query("DELETE FROM ttrss_user_entries
WHERE ref_id IN ($ids) AND owner_uid = " . $_SESSION["uid"]);
$this->dbh->query("DELETE FROM ttrss_user_entries
WHERE ref_id IN ($ids) AND owner_uid = " . $_SESSION["uid"]);
purge_orphans();