From: Evan Prodromou <evan@status.net>
Date: Tue, 5 Apr 2011 15:18:25 +0000 (-0400)
Subject: add toselector to bookmark
X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=c0f63c9a6939a488f690bb990d928fb35c13e7fb;p=quix0rs-gnu-social.git

add toselector to bookmark
---

diff --git a/plugins/Bookmark/bookmarkform.php b/plugins/Bookmark/bookmarkform.php
index 074571e162..ac7ca08f66 100644
--- a/plugins/Bookmark/bookmarkform.php
+++ b/plugins/Bookmark/bookmarkform.php
@@ -148,6 +148,12 @@ class BookmarkForm extends Form
         $this->unli();
 
         $this->out->elementEnd('ul');
+
+        $toWidget = new ToSelector($this->out,
+                                   common_current_user(),
+                                   null);
+        $toWidget->show();
+
         $this->out->elementEnd('fieldset');
     }
 
diff --git a/plugins/Bookmark/newbookmark.php b/plugins/Bookmark/newbookmark.php
index 79266e52b2..e24631b436 100644
--- a/plugins/Bookmark/newbookmark.php
+++ b/plugins/Bookmark/newbookmark.php
@@ -137,12 +137,16 @@ class NewbookmarkAction extends Action
                 throw new ClientException(_m('Bookmark must have an URL.'));
             }
 
+            $options = array();
+
+            ToSelector::fillOptions($this, $options);
 
             $saved = Bookmark::saveNew($this->user->getProfile(),
-                                              $this->title,
-                                              $this->url,
-                                              $this->tags,
-                                              $this->description);
+                                       $this->title,
+                                       $this->url,
+                                       $this->tags,
+                                       $this->description,
+                                       $options);
 
         } catch (ClientException $ce) {
             $this->error = $ce->getMessage();