]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
add a space to textarea
authorEvan Prodromou <evan@prodromou.name>
Tue, 20 May 2008 13:38:25 +0000 (09:38 -0400)
committerEvan Prodromou <evan@prodromou.name>
Tue, 20 May 2008 13:38:25 +0000 (09:38 -0400)
darcs-hash:20080520133825-84dde-10a3623b12380f12386a8bbbe06cb130902bff8e.gz

actions/newnotice.php
actions/showstream.php

index 80630cdb19a588a7d2b7d43f15269b924e343131..8ea28360af4ab20a2d7595aba0be4624ee468a22 100644 (file)
@@ -48,7 +48,7 @@ class NewnoticeAction extends Action {
                assert($notice);
                $notice->profile_id = $user->id; # user id *is* profile id
                $notice->created = DB_DataObject_Cast::dateTime();
-               $notice->content = $this->arg('content');
+               $notice->content = trim($this->arg('content'));
                return $notice->insert();
        }
        
@@ -57,10 +57,10 @@ class NewnoticeAction extends Action {
                common_element_start('form', array('id' => 'newnotice', 'method' => 'POST',
                                                                                   'action' => common_local_url('newnotice')));
                common_element('span', 'nickname', $profile->nickname);
-               common_element_start('textarea', array('rows' => 4, 'cols' => 80,
-                                                                                          'name' => 'content',
-                                                                                          'id' => 'content'));
-               common_element_end('textarea');
+               common_element('textarea', array('rows' => 4, 'cols' => 80,
+                                                                                'name' => 'content',
+                                                                                'id' => 'content'),
+                                          ' ');
                common_element('input', array('type' => 'submit', 'value' => 'Send'));
                common_element_end('form');
                common_show_footer();
index fe561680afa0135d858ee69f56b307c615570aa1..5e8802cd7297723c9d1d4736847bcb5ad081ad51 100644 (file)
@@ -83,10 +83,10 @@ class ShowstreamAction extends StreamAction {
        function notice_form() {
                common_element_start('form', array('id' => 'newnotice', 'method' => 'POST',
                                                                                   'action' => common_local_url('newnotice')));
-               common_element_start('textarea', array('rows' => 4, 'cols' => 80,
-                                                                                          'name' => 'content',
-                                                                                          'id' => 'content'));
-               common_element_end('textarea');
+               common_element('textarea', array('rows' => 4, 'cols' => 80,
+                                                                                'name' => 'content',
+                                                                                'id' => 'content'),
+                                          ' ');
                common_element('input', array('type' => 'submit', 'value' => 'Send'));
                common_element_end('form');
        }