From: Andrew Dolgov Date: Wed, 4 May 2011 10:56:49 +0000 (+0400) Subject: backend/la: properly handle situation when article has multiple ref_ids on one accoun... X-Git-Tag: 1.5.4~3 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=bfedfe697bb8893473795ec832fb60fec1ed651f;p=tt-rss.git backend/la: properly handle situation when article has multiple ref_ids on one account (closes #342) --- diff --git a/backend.php b/backend.php index 58f921e6..6b93d1b3 100644 --- a/backend.php +++ b/backend.php @@ -181,7 +181,8 @@ $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']."'"); + WHERE id = '$id' AND id = ref_id AND owner_uid = '".$_SESSION['uid']."' + LIMIT 1"); if (db_num_rows($result) == 1) { $article_url = db_fetch_result($result, 0, 'link');