]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
fix #1209
authorThomas Citharel <tcit@tcit.fr>
Mon, 6 Jul 2015 15:59:09 +0000 (17:59 +0200)
committerThomas Citharel <tcit@tcit.fr>
Mon, 6 Jul 2015 15:59:09 +0000 (17:59 +0200)
inc/poche/Poche.class.php

index baa087886bb506ed073f2b5d1667c7122cb76028..754d7c7e5a64722a19bfeb1c81c9209b9a28163d 100755 (executable)
@@ -266,6 +266,15 @@ class Poche
                 }
                 foreach($entry_ids as $id) {
                     $msg = 'delete link #' . $id;
+
+                    // deleting tags and tags_entries
+                    $tags = $this->store->retrieveTagsByEntry($id);
+                    foreach ($tags as $tag) {
+                        $this->store->removeTagForEntry($id, $tag['id']);
+                        $this->store->cleanUnusedTag($tag['id']);
+                    }
+
+                    // deleting pictures
                     if ($this->store->deleteById($id, $this->user->getId())) {
                         if (DOWNLOAD_PICTURES) {
                             Picture::removeDirectory(ABS_PATH . $id);