aboutsummaryrefslogtreecommitdiffhomepage
path: root/inc/poche/Poche.class.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/poche/Poche.class.php')
-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..81a18c86 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 }