if (common_logged_in()) {
common_user_error(_t('Already logged in.'));
- } else if ($this->arg('METHOD') == 'POST') {
+ } else if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$this->try_register();
} else {
$this->show_form();
function show_form($error=NULL) {
- common_show_header(_t('Login'));
+ common_show_header(_t('Register'));
common_element_start('form', array('method' => 'POST',
'id' => 'login',
- 'action' => common_local_url('login')));
+ 'action' => common_local_url('register')));
common_element('label', array('for' => 'username'),
_t('Name'));
common_element('input', array('name' => 'username',
'id' => 'email'));
common_element('input', array('name' => 'submit',
'type' => 'submit',
- 'id' => 'submit'),
- _t('Login'));
+ 'id' => 'submit',
+ 'value' => _t('Login')));
common_element('input', array('name' => 'cancel',
'type' => 'button',
- 'id' => 'cancel'),
- _t('Cancel'));
+ 'id' => 'cancel',
+ 'value' => _t('Cancel')));
common_element_end('form');
}
}