]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
multiple tag entry displayed fix, issue #474 472/head
authorMaryana Rozhankivska <mariroz@mr.lviv.ua>
Thu, 20 Feb 2014 08:41:16 +0000 (10:41 +0200)
committerMaryana Rozhankivska <mariroz@mr.lviv.ua>
Thu, 20 Feb 2014 08:41:16 +0000 (10:41 +0200)
inc/poche/Database.class.php

index 3332b5a39477dab196dbe8c8bd9afbca70592f61..a366e866451be4bb2097290666269402761a1739 100644 (file)
@@ -345,7 +345,7 @@ class Database {
     }
 
     public function retrieveAllTags($user_id) {
-        $sql = "SELECT tags.* FROM tags
+        $sql = "SELECT DISTINCT tags.* FROM tags
           LEFT JOIN tags_entries ON tags_entries.tag_id=tags.id
           LEFT JOIN entries ON tags_entries.entry_id=entries.id
           WHERE entries.user_id=?";
@@ -357,7 +357,7 @@ class Database {
 
     public function retrieveTag($id, $user_id) {
         $tag  = NULL;
-        $sql    = "SELECT tags.* FROM tags
+        $sql    = "SELECT DISTINCT tags.* FROM tags
           LEFT JOIN tags_entries ON tags_entries.tag_id=tags.id
           LEFT JOIN entries ON tags_entries.entry_id=entries.id
           WHERE tags.id=? AND entries.user_id=?";