From: Evan Prodromou Date: Sat, 17 May 2008 17:15:01 +0000 (-0400) Subject: fix check for POST X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=a654d63eb0ade36954afd1ea2026d9b11a0e96fd;p=quix0rs-gnu-social.git fix check for POST darcs-hash:20080517171501-84dde-b8d6a1cc106372c9127d73442b4740f2de7e7b22.gz --- diff --git a/actions/login.php b/actions/login.php index 13e14f5bee..4795dfdbd6 100644 --- a/actions/login.php +++ b/actions/login.php @@ -25,7 +25,7 @@ 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(); diff --git a/actions/newnotice.php b/actions/newnotice.php index 9fc9103188..e20932b55f 100644 --- a/actions/newnotice.php +++ b/actions/newnotice.php @@ -27,7 +27,7 @@ class NewnoticeAction extends Action { if (!common_logged_in()) { common_user_error(_t('Not logged in.')); - } else if ($this->arg('METHOD') == 'POST') { + } else if ($_SERVER['REQUEST_METHOD'] == 'POST') { $id = $this->save_new_notice(); if ($id) { diff --git a/actions/register.php b/actions/register.php index 908ae80cde..d3358cb924 100644 --- a/actions/register.php +++ b/actions/register.php @@ -26,7 +26,7 @@ class RegisterAction extends Action { 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(); diff --git a/lib/settingsaction.php b/lib/settingsaction.php index d74e226d85..af7fcb2581 100644 --- a/lib/settingsaction.php +++ b/lib/settingsaction.php @@ -26,8 +26,7 @@ class SettingsAction extends Action { if (!common_logged_in()) { common_user_error(_t('Not logged in.')); return; - } - if ($this->arg('METHOD') == 'POST') { + } else if ($_SERVER['REQUEST_METHOD'] == 'POST') { $this->handle_post(); } else { $this->show_form();