]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
method
authorEvan Prodromou <evan@prodromou.name>
Wed, 2 Jul 2008 13:15:07 +0000 (09:15 -0400)
committerEvan Prodromou <evan@prodromou.name>
Wed, 2 Jul 2008 13:15:07 +0000 (09:15 -0400)
darcs-hash:20080702131507-84dde-507a6380fcab66c1fbcbaad6d1399c8a2f210acf.gz

13 files changed:
actions/finishopenidlogin.php
actions/imsettings.php
actions/login.php
actions/openidlogin.php
actions/openidsettings.php
actions/password.php
actions/profilesettings.php
actions/recoverpassword.php
actions/register.php
actions/remotesubscribe.php
actions/showstream.php
actions/userauthorization.php
lib/util.php

index 09102e8442806b7c18b1ac1d443cc5d48e9c53d8..3b3a61c107ce6ee170de48667d4450e1476395c2 100644 (file)
@@ -58,14 +58,14 @@ class FinishopenidloginAction extends Action {
                                                   _t(' so we must connect your OpenID to a local account. ' .
                                                          ' You can either create a new account, or connect with ' .
                                                          ' your existing account, if you have one.'));
-               }               
+               }
        }
-       
+
        function show_form($error=NULL, $username=NULL) {
                common_show_header(_t('OpenID Account Setup'), NULL, $error,
                                                   array($this, 'show_top'));
 
-               common_element_start('form', array('method' => 'POST',
+               common_element_start('form', array('method' => 'post',
                                                                                   'id' => 'account_connect',
                                                                                   'action' => common_local_url('finishopenidlogin')));
                common_element('h2', NULL,
@@ -99,7 +99,7 @@ class FinishopenidloginAction extends Action {
        }
 
        function try_login() {
-               
+
                $consumer = oid_consumer();
 
                $response = $consumer->complete(common_local_url('finishopenidlogin'));
@@ -125,7 +125,7 @@ class FinishopenidloginAction extends Action {
                        }
 
                        $user = oid_get_user($canonical);
-                       
+
                        if ($user) {
                                oid_set_last($display);
                                oid_update_user($user, $sreg);
@@ -144,12 +144,12 @@ class FinishopenidloginAction extends Action {
                common_element('p', NULL, $msg);
                common_show_footer();
        }
-       
+
        function save_values($display, $canonical, $sreg) {
                common_ensure_session();
                $_SESSION['openid_display'] = $display;
-               $_SESSION['openid_canonical'] = $canonical;             
-               $_SESSION['openid_sreg'] = $sreg;                               
+               $_SESSION['openid_canonical'] = $canonical;
+               $_SESSION['openid_sreg'] = $sreg;
        }
 
        function get_saved_values() {
@@ -157,11 +157,11 @@ class FinishopenidloginAction extends Action {
                                         $_SESSION['openid_canonical'],
                                         $_SESSION['openid_sreg']);
        }
-       
+
        function create_new_user() {
-               
+
                $nickname = $this->trimmed('newname');
-               
+
                if (!Validate::string($nickname, array('min_length' => 1,
                                                                                           'max_length' => 64,
                                                                                           'format' => VALIDATE_NUM . VALIDATE_ALPHA_LOWER))) {
@@ -173,36 +173,36 @@ class FinishopenidloginAction extends Action {
                        $this->show_form(_t('Nickname not allowed.'));
                        return;
                }
-               
+
                if (User::staticGet('nickname', $nickname)) {
                        $this->show_form(_t('Nickname already in use. Try another one.'));
                        return;
                }
-               
+
                list($display, $canonical, $sreg) = $this->get_saved_values();
-               
+
                if (!$display || !$canonical) {
                        common_server_error(_t('Stored OpenID not found.'));
                        return;
                }
-               
+
                # Possible race condition... let's be paranoid
-               
+
                $other = oid_get_user($canonical);
-               
+
                if ($other) {
                        common_server_error(_t('Creating new account for OpenID that already has a user.'));
                        return;
                }
-               
+
                $profile = new Profile();
-               
+
                $profile->nickname = $nickname;
-               
+
                if ($sreg['fullname'] && strlen($sreg['fullname']) <= 255) {
                        $profile->fullname = $sreg['fullname'];
                }
-               
+
                if ($sreg['country']) {
                        if ($sreg['postcode']) {
                                # XXX: use postcode to get city and region
@@ -215,51 +215,51 @@ class FinishopenidloginAction extends Action {
 
                # XXX save language if it's passed
                # XXX save timezone if it's passed
-               
+
                $profile->profileurl = common_profile_url($nickname);
-                 
+
                $profile->created = DB_DataObject_Cast::dateTime(); # current time
-               
+
                $id = $profile->insert();
                if (!$id) {
                        common_server_error(_t('Error saving the profile.'));
                        return;
                }
-               
+
                $user = new User();
                $user->id = $id;
                $user->nickname = $nickname;
                $user->uri = common_user_uri($user);
-               
+
                if ($sreg['email'] && Validate::email($sreg['email'], true)) {
                        $user->email = $sreg['email'];
                }
-               
+
                $user->created = DB_DataObject_Cast::dateTime(); # current time
-               
+
                $result = $user->insert();
-               
+
                if (!$result) {
                        # Try to clean up...
                        $profile->delete();
                }
 
                $result = oid_link_user($user->id, $canonical, $display);
-               
+
                if (!$result) {
                        # Try to clean up...
                        $user->delete();
                        $profile->delete();
                }
-               
+
                oid_set_last($display);
                common_set_user($user->nickname);
                common_real_login(true);
                common_redirect(common_local_url('showstream', array('nickname' => $user->nickname)));
        }
-       
+
        function connect_user() {
-               
+
                $nickname = $this->trimmed('nickname');
                $password = $this->trimmed('password');
 
@@ -269,7 +269,7 @@ class FinishopenidloginAction extends Action {
                }
 
                # They're legit!
-               
+
                $user = User::staticGet('nickname', $nickname);
 
                list($display, $canonical, $sreg) = $this->get_saved_values();
@@ -278,21 +278,21 @@ class FinishopenidloginAction extends Action {
                        common_server_error(_t('Stored OpenID not found.'));
                        return;
                }
-               
+
                $result = oid_link_user($user->id, $canonical, $display);
-               
+
                if (!$result) {
                        common_server_error(_t('Error connecting user to OpenID.'));
                        return;
                }
-               
+
                oid_update_user($user, $sreg);
                oid_set_last($display);
                common_set_user($user->nickname);
                common_real_login(true);
                $this->go_home($user->nickname);
        }
-       
+
        function go_home($nickname) {
                $url = common_get_returnto();
                if ($url) {
@@ -305,9 +305,9 @@ class FinishopenidloginAction extends Action {
                }
                common_redirect($url);
        }
-       
+
        function best_new_nickname($display, $sreg) {
-               
+
                # Try the passed-in nickname
 
 
@@ -326,11 +326,11 @@ class FinishopenidloginAction extends Action {
                                return $fullname;
                        }
                }
-               
+
                # Try the URL
-               
+
                $from_url = $this->openid_to_nickname($display);
-               
+
                if ($from_url && $this->is_new_nickname($from_url)) {
                        return $from_url;
                }
@@ -345,7 +345,7 @@ class FinishopenidloginAction extends Action {
                                                                                  'max_length' => 64,
                                                                                  'format' => VALIDATE_NUM . VALIDATE_ALPHA_LOWER))) {
                        return false;
-               }       
+               }
        if (!User::allowed_nickname($str)) {
                        return false;
                }
@@ -354,7 +354,7 @@ class FinishopenidloginAction extends Action {
                }
                return true;
        }
-       
+
        function openid_to_nickname($openid) {
         if (Auth_Yadis_identifierScheme($openid) == 'XRI') {
                        return $this->xri_to_nickname($openid);
@@ -426,7 +426,7 @@ class FinishopenidloginAction extends Action {
                        return $this->nicknamize(array_pop($parts));
                }
        }
-       
+
        function xri_base($xri) {
                if (substr($xri, 0, 6) == 'xri://') {
                        return substr($xri, 6);
@@ -436,7 +436,7 @@ class FinishopenidloginAction extends Action {
        }
 
        # Given a string, try to make it work as a nickname
-       
+
        function nicknamize($str) {
                $str = preg_replace('/\W/', '', $str);
                return strtolower($str);
index a9d0e182187fc6588b75b5b251fabd26e68ba495..4ad63e1ccf1b8ea89a5239d9558f9861e9a17465 100644 (file)
@@ -33,7 +33,7 @@ class ImsettingsAction extends SettingsAction {
        function show_form($msg=NULL, $success=false) {
                $user = common_current_user();
                $this->form_header(_t('IM Settings'), $msg, $success);
-               common_element_start('form', array('method' => 'POST',
+               common_element_start('form', array('method' => 'post',
                                                                                   'id' => 'imsettings',
                                                                                   'action' =>
                                                                                   common_local_url('imsettings')));
index 1c4df745855c8e5070118eb355b3d8dff575c8cc..2f37ef84345c2c24ba6aa4f6c2115ca9126c6641 100644 (file)
@@ -65,7 +65,7 @@ class LoginAction extends Action {
 
        function show_form($error=NULL) {
                common_show_header(_t('Login'), NULL, $error, array($this, 'show_top'));
-               common_element_start('form', array('method' => 'POST',
+               common_element_start('form', array('method' => 'post',
                                                                                   'id' => 'login',
                                                                                   'action' => common_local_url('login')));
                common_input('nickname', _t('Nickname'));
index 5ec17ec465586e92d0efbb5d717fe3a9bb1111ef..f9743ecde4951b110d4e6ef037d61eaf8de8c5fb 100644 (file)
@@ -59,7 +59,7 @@ class OpenidloginAction extends Action {
        function show_form($error=NULL, $openid_url) {
                common_show_header(_t('OpenID Login'), NULL, $error, array($this, 'show_top'));
                $formaction = common_local_url('openidlogin');
-               common_element_start('form', array('method' => 'POST',
+               common_element_start('form', array('method' => 'post',
                                                                                   'id' => 'openidlogin',
                                                                                   'action' => $formaction));
                common_input('openid_url', _t('OpenID URL'),
index c7cceebf901bf09e6b1d5d5b0dce3b4bbe01b597..6cdb19817217f06382b0f19d849d1b87b028c305 100644 (file)
@@ -36,7 +36,7 @@ class OpenidsettingsAction extends SettingsAction {
 
                $this->form_header(_t('OpenID settings'), $msg, $success);
 
-               common_element_start('form', array('method' => 'POST',
+               common_element_start('form', array('method' => 'post',
                                                                                   'id' => 'openidadd',
                                                                                   'action' =>
                                                                                   common_local_url('openidsettings')));
index 628bfb5c0316882e6b87aafef3d27e51fbca9913..9573f4940fcc40e057e7ddc813802e0f4d5d8451 100644 (file)
@@ -29,7 +29,7 @@ class PasswordAction extends SettingsAction {
 
        function show_form($msg=NULL, $success=false) {
                $this->form_header(_t('Change password'), $msg, $success);
-               common_element_start('form', array('method' => 'POST',
+               common_element_start('form', array('method' => 'post',
                                                                                   'id' => 'password',
                                                                                   'action' =>
                                                                                   common_local_url('password')));
index 49e24874871e30c20a2d0254cc8b24eacec7d092..ad4bb968ffb0a9deb5f3f12415a988f2a3ad1734 100644 (file)
@@ -33,7 +33,7 @@ class ProfilesettingsAction extends SettingsAction {
                $profile = $user->getProfile();
                $this->form_header(_t('Profile settings'), $msg, $success);
 
-               common_element_start('form', array('method' => 'POST',
+               common_element_start('form', array('method' => 'post',
                                                                                   'id' => 'profilesettings',
                                                                                   'action' =>
                                                                                   common_local_url('profilesettings')));
index 56f6ba9df9ac38cc8b2be6022de33ab05f6f79ef..06a7f62c8aa796d591c4a4fd0f0135cd86852ed9 100644 (file)
@@ -141,7 +141,7 @@ class RecoverpasswordAction extends Action {
                common_show_header(_t('Recover password'), NULL,
                $msg, array($this, 'show_top'));
 
-               common_element_start('form', array('method' => 'POST',
+               common_element_start('form', array('method' => 'post',
                                                                                   'id' => 'recoverpassword',
                                                                                   'action' => common_local_url('recoverpassword')));
                common_input('nicknameoremail', _t('Nickname or email'),
@@ -158,7 +158,7 @@ class RecoverpasswordAction extends Action {
                common_show_header(_t('Reset password'), NULL,
                $msg, array($this, 'show_password_top'));
 
-               common_element_start('form', array('method' => 'POST',
+               common_element_start('form', array('method' => 'post',
                                                                                   'id' => 'recoverpassword',
                                                                                   'action' => common_local_url('recoverpassword')));
                common_password('newpassword', _t('New password'),
index 4648f124f9b290107d0a9669950eec5c0159175a..06ad858997fd5fee67baf561621aac702bb14d62 100644 (file)
@@ -163,7 +163,7 @@ class RegisterAction extends Action {
                global $config;
 
                common_show_header(_t('Register'), NULL, $error, array($this, 'show_top'));
-               common_element_start('form', array('method' => 'POST',
+               common_element_start('form', array('method' => 'post',
                                                                                   'id' => 'login',
                                                                                   'action' => common_local_url('register')));
                common_input('nickname', _t('Nickname'), NULL,
index 18eb118abf7f296dae1f75a2607b51946071fe43..2bcf4e53b5ca73c98f1c2e985f935ca100c3ed96 100644 (file)
@@ -64,7 +64,7 @@ class RemotesubscribeAction extends Action {
                $profile = $this->trimmed('profile_url');
                common_show_header(_t('Remote subscribe'), NULL, $err,
                                                   array($this, 'show_top'));
-               common_element_start('form', array('id' => 'remotesubscribe', 'method' => 'POST',
+               common_element_start('form', array('id' => 'remotesubscribe', 'method' => 'post',
                                                                                   'action' => common_local_url('remotesubscribe')));
                common_input('nickname', _t('User nickname'), $nickname,
                                         _t('Nickname of the user you want to follow'));
index b18ec9b7591c696484b26ea8f3dab67ac9aa86c0..dcb78a4626022caea348afe8cac2ac8f84b22293 100644 (file)
@@ -157,7 +157,7 @@ class ShowstreamAction extends StreamAction {
        }
 
        function show_subscribe_form($profile) {
-               common_element_start('form', array('id' => 'subscribe', 'method' => 'POST',
+               common_element_start('form', array('id' => 'subscribe', 'method' => 'post',
                                                                                   'action' => common_local_url('subscribe')));
                common_element('input', array('id' => 'subscribeto',
                                                                          'name' => 'subscribeto',
@@ -178,7 +178,7 @@ class ShowstreamAction extends StreamAction {
        }
 
        function show_unsubscribe_form($profile) {
-               common_element_start('form', array('id' => 'unsubscribe', 'method' => 'POST',
+               common_element_start('form', array('id' => 'unsubscribe', 'method' => 'post',
                                                                                   'action' => common_local_url('unsubscribe')));
                common_element('input', array('id' => 'unsubscribeto',
                                                                          'name' => 'unsubscribeto',
index 71ef3cde42a7c7999dcd5ec249bdc57800a8e08b..3139cec5bcf9494c09dd6faf0fcad316785baca5 100644 (file)
@@ -25,7 +25,7 @@ define('TIMESTAMP_THRESHOLD', 300);
 class UserauthorizationAction extends Action {
        function handle($args) {
                parent::handle($args);
-               
+
                if ($_SERVER['REQUEST_METHOD'] == 'POST') {
                        # We've shown the form, now post user's choice
                        $this->send_authorization();
@@ -36,7 +36,7 @@ class UserauthorizationAction extends Action {
                                $argsclone = $_GET;
                                unset($argsclone['action']);
                                common_set_returnto(common_local_url('userauthorization', $argsclone));
-                               common_debug('userauthorization.php - redirecting to login');                           
+                               common_debug('userauthorization.php - redirecting to login');
                                common_redirect(common_local_url('login'));
                                return;
                        }
@@ -58,7 +58,7 @@ class UserauthorizationAction extends Action {
                                common_server_error($e->getMessage());
                                return;
                        }
-                       
+
                }
        }
 
@@ -72,7 +72,7 @@ class UserauthorizationAction extends Action {
                $bio = $req->get_parameter('omb_listenee_bio');
                $location = $req->get_parameter('omb_listenee_location');
                $avatar = $req->get_parameter('omb_listenee_avatar');
-               
+
                common_show_header(_t('Authorize subscription'));
                common_element('p', NULL, _t('Please check these details to make sure '.
                                                                         'that you want to subscribe to this user\'s notices. '.
@@ -111,19 +111,19 @@ class UserauthorizationAction extends Action {
                                           $license);
                common_element_end('div');
                common_element_end('div');
-               common_element_start('form', array('method' => 'POST',
+               common_element_start('form', array('method' => 'post',
                                                                                   'id' => 'userauthorization',
                                                                                   'name' => 'userauthorization',
                                                                                   'action' => common_local_url('userauthorization')));
                common_submit('accept', _t('Accept'));
-               common_submit('reject', _t('Reject'));          
+               common_submit('reject', _t('Reject'));
                common_element_end('form');
                common_show_footer();
        }
-       
+
        function send_authorization() {
                $req = $this->get_stored_request();
-               
+
                if (!$req) {
                        common_user_error(_t('No authorization request!'));
                        return;
@@ -188,7 +188,7 @@ class UserauthorizationAction extends Action {
                $consumer_key = $req->get_parameter('oauth_consumer_key');
                $token_field = $req->get_parameter('oauth_token');
                common_debug('consumer key = "'.$consumer_key.'"', __FILE__);
-               common_debug('token field = "'.$token_field.'"', __FILE__);             
+               common_debug('token field = "'.$token_field.'"', __FILE__);
                $rt = new Token();
                $rt->consumer_key = $consumer_key;
                $rt->tok = $token_field;
@@ -208,23 +208,23 @@ class UserauthorizationAction extends Action {
        }
 
        # XXX: refactor with similar code in finishremotesubscribe.php
-       
+
        function save_remote_profile(&$req) {
                # FIXME: we should really do this when the consumer comes
-               # back for an access token. If they never do, we've got stuff in a 
+               # back for an access token. If they never do, we've got stuff in a
                # weird state.
-       
+
                $nickname = $req->get_parameter('omb_listenee_nickname');
                $fullname = $req->get_parameter('omb_listenee_fullname');
-               $profile_url = $req->get_parameter('omb_listenee_profile');             
+               $profile_url = $req->get_parameter('omb_listenee_profile');
                $homepage = $req->get_parameter('omb_listenee_homepage');
                $bio = $req->get_parameter('omb_listenee_bio');
                $location = $req->get_parameter('omb_listenee_location');
                $avatar_url = $req->get_parameter('omb_listenee_avatar');
-               
+
                $listenee = $req->get_parameter('omb_listenee');
                $remote = Remote_profile::staticGet('uri', $listenee);
-               
+
                if ($remote) {
                        $exists = true;
                        $profile = Profile::staticGet($remote->id);
@@ -239,7 +239,7 @@ class UserauthorizationAction extends Action {
 
                $profile->nickname = $nickname;
                $profile->profileurl = $profile_url;
-               
+
                if ($fullname) {
                        $profile->fullname = $fullname;
                }
@@ -252,7 +252,7 @@ class UserauthorizationAction extends Action {
                if ($location) {
                        $profile->location = $location;
                }
-               
+
                if ($exists) {
                        $profile->update($orig_profile);
                } else {
@@ -291,11 +291,11 @@ class UserauthorizationAction extends Action {
                $sub->subscribed = $remote->id;
                $sub->token = $token->key; # NOTE: request token, not valid for use!
                $sub->created = DB_DataObject_Cast::dateTime(); # current time
-               
+
                if (!$sub->insert()) {
                        return FALSE;
                }
-               
+
                return TRUE;
        }
 
@@ -304,10 +304,10 @@ class UserauthorizationAction extends Action {
                copy($url, $temp_filename);
                return $profile->setOriginal($temp_filename);
        }
-       
+
        function show_accept_message($tok) {
                common_show_header(_t('Subscription authorized'));
-               common_element('p', NULL, 
+               common_element('p', NULL,
                                           _t('The subscription has been authorized, but no '.
                                                  'callback URL was passed. Check with the site\'s instructions for '.
                                                  'details on how to authorize the subscription. Your subscription token is:'));
@@ -317,25 +317,25 @@ class UserauthorizationAction extends Action {
 
        function show_reject_message($tok) {
                common_show_header(_t('Subscription rejected'));
-               common_element('p', NULL, 
+               common_element('p', NULL,
                                           _t('The subscription has been rejected, but no '.
                                                  'callback URL was passed. Check with the site\'s instructions for '.
                                                  'details on how to fully reject the subscription.'));
                common_show_footer();
        }
-       
+
        function store_request($req) {
                common_ensure_session();
                $_SESSION['userauthorizationrequest'] = $req;
        }
-       
+
        function clear_request() {
                common_ensure_session();
                unset($_SESSION['userauthorizationrequest']);
        }
-       
+
        function get_stored_request() {
-               common_ensure_session();                
+               common_ensure_session();
                $req = $_SESSION['userauthorizationrequest'];
                return $req;
        }
@@ -344,29 +344,29 @@ class UserauthorizationAction extends Action {
                $req = OAuthRequest::from_request();
                return $req;
        }
-       
+
        # Throws an OAuthException if anything goes wrong
-       
+
        function validate_request(&$req) {
                # OAuth stuff -- have to copy from OAuth.php since they're
                # all private methods, and there's no user-authentication method
                common_debug('checking version', __FILE__);
                $this->check_version($req);
-               common_debug('getting datastore', __FILE__);            
+               common_debug('getting datastore', __FILE__);
                $datastore = omb_oauth_datastore();
                common_debug('getting consumer', __FILE__);
                $consumer = $this->get_consumer($datastore, $req);
-               common_debug('getting token', __FILE__);                
+               common_debug('getting token', __FILE__);
                $token = $this->get_token($datastore, $req, $consumer);
                common_debug('checking timestamp', __FILE__);
                $this->check_timestamp($req);
-               common_debug('checking nonce', __FILE__);               
+               common_debug('checking nonce', __FILE__);
                $this->check_nonce($datastore, $req, $consumer, $token);
                common_debug('checking signature', __FILE__);
                $this->check_signature($req, $consumer, $token);
-               common_debug('validating omb stuff', __FILE__);         
+               common_debug('validating omb stuff', __FILE__);
                $this->validate_omb($req);
-               common_debug('done validating', __FILE__);                              
+               common_debug('done validating', __FILE__);
                return true;
        }
 
@@ -462,9 +462,9 @@ class UserauthorizationAction extends Action {
                        throw new OAuthException("Invalid callback URL '$callback'");
                }
        }
-       
+
        # Snagged from OAuthServer
-       
+
        function check_version(&$req) {
                $version = $req->get_parameter("oauth_version");
                if (!$version) {
@@ -477,13 +477,13 @@ class UserauthorizationAction extends Action {
        }
 
        # Snagged from OAuthServer
-       
+
        function get_consumer($datastore, $req) {
                $consumer_key = @$req->get_parameter("oauth_consumer_key");
                if (!$consumer_key) {
                        throw new OAuthException("Invalid consumer key");
                }
-               
+
                $consumer = $datastore->lookup_consumer($consumer_key);
                if (!$consumer) {
                        throw new OAuthException("Invalid consumer");
@@ -492,7 +492,7 @@ class UserauthorizationAction extends Action {
        }
 
        # Mostly cadged from OAuthServer
-       
+
        function get_token($datastore, &$req, $consumer) {/*{{{*/
                $token_field = @$req->get_parameter('oauth_token');
                $token = $datastore->lookup_token($consumer, 'request', $token_field);
@@ -501,7 +501,7 @@ class UserauthorizationAction extends Action {
                }
                return $token;
        }
-       
+
        function check_timestamp(&$req) {
                $timestamp = @$req->get_parameter('oauth_timestamp');
                $now = time();
@@ -520,19 +520,19 @@ class UserauthorizationAction extends Action {
                }
                return true;
        }
-       
+
        function check_signature(&$req, $consumer, $token) {
                $signature_method = $this->get_signature_method($req);
-               $signature = $req->get_parameter('oauth_signature');    
-               $valid_sig = $signature_method->check_signature($req, 
-                                                                                                               $consumer, 
-                                                                                                               $token, 
+               $signature = $req->get_parameter('oauth_signature');
+               $valid_sig = $signature_method->check_signature($req,
+                                                                                                               $consumer,
+                                                                                                               $token,
                                                                                                                $signature);
                if (!$valid_sig) {
                        throw new OAuthException("Invalid signature");
                }
        }
-       
+
        function get_signature_method(&$req) {
                $signature_method = @$req->get_parameter("oauth_signature_method");
                if (!$signature_method) {
index fdb4808bd21e51451b3286a767d4b8d8bad4eaa5..bbaed32da5e5a66e6abecb9303d099d502c71a91 100644 (file)
@@ -219,7 +219,7 @@ function common_show_footer() {
        common_element_end('div'); # content div
        common_foot_menu();
        common_element_start('div', array('id' => 'footer'));
-       common_element_start('p', 'laconica');
+       common_element_start('div', 'laconica');
        if (common_config('site', 'broughtby')) {
                $instr = _t('**%%site.name%%** is a microblogging service brought to you by [%%site.broughtby%%](%%site.broughtbyurl%%). ');
        } else {
@@ -232,7 +232,7 @@ function common_show_footer() {
                         '(http://www.fsf.org/licensing/licenses/agpl-3.0.html).');
     $output = common_markup_to_html($instr);
     common_raw($output);
-       common_element_end('p');
+       common_element_end('div');
        common_element('img', array('id' => 'cc',
                                                                'src' => $config['license']['image'],
                                                                'alt' => $config['license']['title']));
@@ -393,7 +393,7 @@ function common_textarea($id, $label, $content=NULL, $instructions=NULL) {
                                                                         'cols' => 40,
                                                                         'name' => $id,
                                                                         'id' => $id),
-                                  ($content) ? $content : ' ');
+                                  ($content) ? $content : '');
        if ($instructions) {
                common_element('span', 'input_instructions', $instructions);
        }
@@ -830,14 +830,16 @@ function common_notice_form($action=NULL, $content=NULL) {
        $user = common_current_user();
        assert(!is_null($user));
        common_element_start('form', array('id' => 'status_form',
-                                                                          'method' => 'POST',
+                                                                          'method' => 'post',
                                                                           'action' => common_local_url('newnotice')));
        common_element_start('p');
-       common_element('label', array('for' => 'status_update',
+       common_element('label', array('for' => 'status_textarea',
                                                                  'id' => 'status_label'),
                                   _t('What\'s up, ').$user->nickname.'?');
         common_element('span', array('id' => 'counter', 'class' => 'counter'), '140');
        common_element('textarea', array('id' => 'status_textarea',
+                                                                        'cols' => 60,
+                                                                        'rows' => 3,
                                                                         'name' => 'status_textarea'),
                                   ($content) ? $content : '');
        if ($action) {