X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=inc%2Fpoche%2FDatabase.class.php;h=7be7a394ae8887ba9c6030ba6d0b89c49fcc4494;hb=f9c8087f787b6ac38ca2c3b6a876a803860b8991;hp=1a88d7d9d24cfe5a61cd94ff8cb233b6fd242c7e;hpb=727c35d8096c7690f66f2a815af3e8cabae00399;p=github%2Fwallabag%2Fwallabag.git diff --git a/inc/poche/Database.class.php b/inc/poche/Database.class.php index 1a88d7d9..7be7a394 100755 --- a/inc/poche/Database.class.php +++ b/inc/poche/Database.class.php @@ -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;