aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorThomas Citharel <tcit@tcit.fr>2015-01-19 23:32:01 +0100
committerThomas Citharel <tcit@tcit.fr>2015-01-19 23:32:01 +0100
commitfa921eac006920bf367fa88320101f233fabee1e (patch)
tree408367106e8bec18df6d526a77a961abb8acf8a2
parent1cedeb681f84b2c9b17f4f8b88d4fffabb15d6c8 (diff)
parent3052cfb7cab3b37e7258f31d18624a9335c0680f (diff)
downloadwallabag-fa921eac006920bf367fa88320101f233fabee1e.tar.gz
wallabag-fa921eac006920bf367fa88320101f233fabee1e.tar.zst
wallabag-fa921eac006920bf367fa88320101f233fabee1e.zip
Merge branch 'kaffeeringe-patch-1' into dev
-rwxr-xr-xinc/poche/Poche.class.php14
1 files changed, 13 insertions, 1 deletions
diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php
index 8b0d3a19..5a0edbe4 100755
--- a/inc/poche/Poche.class.php
+++ b/inc/poche/Poche.class.php
@@ -199,6 +199,7 @@ class Poche
199 } else { 199 } else {
200 Tools::redirect('?view=home&closewin=true'); 200 Tools::redirect('?view=home&closewin=true');
201 } 201 }
202 return $last_id;
202 break; 203 break;
203 case 'delete': 204 case 'delete':
204 if (isset($_GET['search'])) { 205 if (isset($_GET['search'])) {
@@ -663,7 +664,18 @@ class Poche
663 $urlsInserted[] = $url; //add 664 $urlsInserted[] = $url; //add
664 if (isset($record['tags']) && trim($record['tags'])) { 665 if (isset($record['tags']) && trim($record['tags'])) {
665 666
666 // @TODO: set tags 667 $tags = explode(' ', $record['tags']);
668 foreach($tags as $tag) {
669 $entry_id = $id;
670 $tag_id = $this->store->retrieveTagByValue($tag);
671 if ($tag_id) {
672 $this->store->setTagToEntry($tag_id['id'], $entry_id);
673 } else {
674 $this->store->createTag($tag);
675 $tag_id = $this->store->retrieveTagByValue($tag);
676 $this->store->setTagToEntry($tag_id['id'], $entry_id);
677 }
678 }
667 679
668 } 680 }
669 } 681 }