diff options
-rwxr-xr-x | inc/poche/Poche.class.php | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php index 16235474..01f919d9 100755 --- a/inc/poche/Poche.class.php +++ b/inc/poche/Poche.class.php | |||
@@ -192,6 +192,7 @@ class Poche | |||
192 | } else { | 192 | } else { |
193 | Tools::redirect('?view=home&closewin=true'); | 193 | Tools::redirect('?view=home&closewin=true'); |
194 | } | 194 | } |
195 | return $last_id; | ||
195 | break; | 196 | break; |
196 | case 'delete': | 197 | case 'delete': |
197 | $msg = 'delete link #' . $id; | 198 | $msg = 'delete link #' . $id; |
@@ -625,7 +626,18 @@ class Poche | |||
625 | $urlsInserted[] = $url; //add | 626 | $urlsInserted[] = $url; //add |
626 | if (isset($record['tags']) && trim($record['tags'])) { | 627 | if (isset($record['tags']) && trim($record['tags'])) { |
627 | 628 | ||
628 | // @TODO: set tags | 629 | $tags = explode(' ', $record['tags']); |
630 | foreach($tags as $tag) { | ||
631 | $entry_id = $id; | ||
632 | $tag_id = $this->store->retrieveTagByValue($tag); | ||
633 | if ($tag_id) { | ||
634 | $this->store->setTagToEntry($tag_id['id'], $entry_id); | ||
635 | } else { | ||
636 | $this->store->createTag($tag); | ||
637 | $tag_id = $this->store->retrieveTagByValue($tag); | ||
638 | $this->store->setTagToEntry($tag_id['id'], $entry_id); | ||
639 | } | ||
640 | } | ||
629 | 641 | ||
630 | } | 642 | } |
631 | } | 643 | } |