* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-if (!defined('LACONICA')) { exit(1) }
+if (!defined('LACONICA')) { exit(1); }
class LoginAction extends Action {
parent::handle($args);
if (common_logged_in()) {
common_user_error(_t('Already logged in.'));
- } else if ($this->arg('METHOD') == 'POST') {
+ } else if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$this->check_login();
} else {
$this->show_form();
if (!is_null($error)) {
common_element('div', array('class' => 'error'), $msg);
}
- common_start_element('form', array('method' => 'POST',
+ common_element_start('form', array('method' => 'POST',
'id' => 'login',
'action' => common_local_url('login')));
common_element('label', array('for' => 'username'),
'type' => 'button',
'id' => 'cancel'),
_t('Cancel'));
+ common_element_end('form');
}
}