]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Direct events to users or groups
authorEvan Prodromou <evan@status.net>
Tue, 5 Apr 2011 02:16:38 +0000 (22:16 -0400)
committerEvan Prodromou <evan@status.net>
Tue, 5 Apr 2011 02:16:38 +0000 (22:16 -0400)
plugins/Event/eventform.php
plugins/Event/newevent.php

index 31fecb1278d0fb099ce754b6a067eba15022b57e..dfdb65a30d77f901e1d9f7415b377d11ed2ee200 100644 (file)
@@ -147,6 +147,13 @@ class EventForm extends Form
                           _m('Description of the event.'));
         $this->unli();
 
+        $this->li();
+        $toWidget = new ToSelector($this->out,
+                                   common_current_user(),
+                                   null);
+        $toWidget->show();
+        $this->unli();
+
         $this->out->elementEnd('ul');
         $this->out->elementEnd('fieldset');
     }
index 082f12bb4bbdbdc5b376e312f98ca64a7b388f74..93baa37b6b82f3cdfb520819acbc456ba1cdbb4e 100644 (file)
@@ -190,6 +190,12 @@ class NeweventAction extends Action
                 throw new ClientException(_m('Event must have an end time.'));
             }
 
+            $options = array();
+
+            // Does the heavy-lifting for getting "To:" information
+
+            ToSelector::fillOptions($this, $options);
+            
             $profile = $this->user->getProfile();
 
             $saved = Happening::saveNew($profile,
@@ -198,7 +204,8 @@ class NeweventAction extends Action
                                         $this->title,
                                         $this->location,
                                         $this->description,
-                                        $this->url);
+                                        $this->url,
+                                        $options);
 
             $event = Happening::fromNotice($saved);