]> git.wh0rd.org Git - tt-rss.git/commitdiff
backend/la: properly handle situation when article has multiple ref_ids on one accoun...
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Wed, 4 May 2011 10:56:49 +0000 (14:56 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Wed, 4 May 2011 10:56:49 +0000 (14:56 +0400)
backend.php

index 58f921e6a304166321823cbc84f7110c6c41ab61..6b93d1b3c5444c55079fa68e8bdc05b1ca3cc40c 100644 (file)
                        $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');