diff options
author | Thomas Citharel <tcit@tcit.fr> | 2015-06-06 17:02:55 +0200 |
---|---|---|
committer | Thomas Citharel <tcit@tcit.fr> | 2015-06-06 17:02:55 +0200 |
commit | c56d1f21e3138212d00d7343665a8f3e65cf594a (patch) | |
tree | 48ae67bc8688e08cabc5b60a78072a81d903c1f4 /inc/poche/Database.class.php | |
parent | 22a46267beef273f8602d569a22281af2207fdbe (diff) | |
parent | 63fc40ff8465cd14b6221636ccbd2d9d9c07787e (diff) | |
download | wallabag-c56d1f21e3138212d00d7343665a8f3e65cf594a.tar.gz wallabag-c56d1f21e3138212d00d7343665a8f3e65cf594a.tar.zst wallabag-c56d1f21e3138212d00d7343665a8f3e65cf594a.zip |
Merge pull request #1207 from vpmalley/dev
issue #1203: fixing tag export
Diffstat (limited to 'inc/poche/Database.class.php')
-rwxr-xr-x | inc/poche/Database.class.php | 15 |
1 files changed, 15 insertions, 0 deletions
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 { | |||
323 | return $entries; | 323 | return $entries; |
324 | } | 324 | } |
325 | 325 | ||
326 | public function retrieveAllWithTags($user_id) | ||
327 | { | ||
328 | $entries = $this->retrieveAll($user_id); | ||
329 | $count = count($entries); | ||
330 | for ($i = 0; $i < $count; $i++) { | ||
331 | $tag_entries = $this->retrieveTagsByEntry($entries[$i]['id']); | ||
332 | $tags = []; | ||
333 | foreach ($tag_entries as $tag) { | ||
334 | $tags[] = $tag[1]; | ||
335 | } | ||
336 | $entries[$i]['tags'] = implode(',', $tags); | ||
337 | } | ||
338 | return $entries; | ||
339 | } | ||
340 | |||
326 | public function retrieveOneById($id, $user_id) | 341 | public function retrieveOneById($id, $user_id) |
327 | { | 342 | { |
328 | $entry = NULL; | 343 | $entry = NULL; |