]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - inc/poche/Database.class.php
[1203] fixing tag export
[github/wallabag/wallabag.git] / inc / poche / Database.class.php
index 1a88d7d9d24cfe5a61cd94ff8cb233b6fd242c7e..7be7a394ae8887ba9c6030ba6d0b89c49fcc4494 100755 (executable)
@@ -323,6 +323,21 @@ class Database {
         return $entries;
     }
 
+    public function retrieveAllWithTags($user_id)
+    {
+        $entries = $this->retrieveAll($user_id);
+        $count = count($entries);
+        for ($i = 0; $i < $count; $i++) {
+          $tag_entries = $this->retrieveTagsByEntry($entries[$i]['id']);
+          $tags = [];
+          foreach ($tag_entries as $tag) {
+            $tags[] = $tag[1];
+          }
+          $entries[$i]['tags'] = implode(',', $tags);
+        }
+        return $entries;
+    }
+
     public function retrieveOneById($id, $user_id)
     {
         $entry  = NULL;