]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/noticeform.php
Merge remote-tracking branch 'upstream/master' into social-master
[quix0rs-gnu-social.git] / lib / noticeform.php
index f9b2309119485aa12c72ee0df0f0fa2f133c35ce..698d1f6a609187339a158164c4c471cf2930b518 100644 (file)
@@ -97,17 +97,13 @@ class NoticeForm extends Form
      *                        'location_id' ID of location
      *                        'location_ns' Namespace of location
      */
-    function __construct($action, $options=null)
+    function __construct(Action $action, array $options = array())
     {
         parent::__construct($action);
 
         // When creating a notice form we don't want to collide with
         // possibly existing HTML elements, as naming conventions are similar.
-        $this->id_suffix = rand();
-
-        if (is_null($options)) {
-            $options = array();
-        }
+        $this->id_suffix = mt_rand();
 
         $this->actionName  = $action->trimmed('action');
 
@@ -269,7 +265,7 @@ class NoticeForm extends Form
                     'type' => 'checkbox',
                     'class' => 'checkbox',
                     'id' => $this->id() . '-notice_data-geo',
-                    'checked' => true, // ?
+                    'checked' => false, // Must be unchecked by default
                 ));
                 $this->out->element('label', array('class' => 'notice_data-geo',
                                                    'for'   => $this->id().'-notice_data-geo'),