]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
QnA - Add ToSelector to new question
authorZach Copley <zach@status.net>
Tue, 5 Apr 2011 16:12:54 +0000 (09:12 -0700)
committerZach Copley <zach@status.net>
Tue, 5 Apr 2011 16:12:54 +0000 (09:12 -0700)
plugins/QnA/actions/qnanewquestion.php
plugins/QnA/lib/qnanewquestionform.php

index 561b11575a7f136652b005b148c43fdeca193e63..3399c5eda8afee86a76b7fa50cc86225e0ca8d20 100644 (file)
@@ -130,10 +130,17 @@ class QnanewquestionAction extends Action
                 throw new ClientException(_m('Question must have a title.'));
             }
 
+            // Notice options
+            $options = array();
+
+            // Does the heavy-lifting for getting "To:" information
+            ToSelector::fillOptions($this, $options);
+
             $saved = QnA_Question::saveNew(
                 $this->user->getProfile(),
                 $this->title,
-                $this->description
+                $this->description,
+                $options
             );
         } catch (ClientException $ce) {
             $this->error = $ce->getMessage();
index 114e6199a14027b9363abce34ec825123d4e98ac..1def13a8c4e52495bcf85308ebf57a7f3fbc92d3 100644 (file)
@@ -121,6 +121,12 @@ class QnanewquestionForm extends Form
         $this->unli();
 
         $this->out->elementEnd('ul');
+        $toWidget = new ToSelector(
+            $this->out,
+            common_current_user(),
+            null
+        );
+        $toWidget->show();
         $this->out->elementEnd('fieldset');
     }