backend/la: properly handle situation when article has multiple ref_ids on one account (closes #342)

This commit is contained in:
Andrew Dolgov 2011-05-04 14:56:49 +04:00
parent decf742ebd
commit bfedfe697b

View file

@ -181,7 +181,8 @@
$id = db_escape_string($_REQUEST['id']); $id = db_escape_string($_REQUEST['id']);
$result = db_query($link, "SELECT link FROM ttrss_entries, ttrss_user_entries $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) { if (db_num_rows($result) == 1) {
$article_url = db_fetch_result($result, 0, 'link'); $article_url = db_fetch_result($result, 0, 'link');