]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
add toselector to bookmark
authorEvan Prodromou <evan@status.net>
Tue, 5 Apr 2011 15:18:25 +0000 (11:18 -0400)
committerEvan Prodromou <evan@status.net>
Tue, 5 Apr 2011 15:18:25 +0000 (11:18 -0400)
plugins/Bookmark/bookmarkform.php
plugins/Bookmark/newbookmark.php

index 074571e162654cc886919674b9b394c999d943f4..ac7ca08f66b6e08e0f5678c23ea4ce6b40976854 100644 (file)
@@ -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');
     }
 
index 79266e52b2d2ed3e44320704f512c742331e9fab..e24631b436a904010d8fcabd21dc414988d12aa5 100644 (file)
@@ -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();