]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
fix check for POST
authorEvan Prodromou <evan@prodromou.name>
Sat, 17 May 2008 17:15:01 +0000 (13:15 -0400)
committerEvan Prodromou <evan@prodromou.name>
Sat, 17 May 2008 17:15:01 +0000 (13:15 -0400)
darcs-hash:20080517171501-84dde-b8d6a1cc106372c9127d73442b4740f2de7e7b22.gz

actions/login.php
actions/newnotice.php
actions/register.php
lib/settingsaction.php

index 13e14f5bee6a10ecbe44b5061869955d872b7254..4795dfdbd64939a5a1ca800e322ebde224c66122 100644 (file)
@@ -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();
index 9fc9103188cabb2b5605bc81b0d3185c2b6975fc..e20932b55ff9b00fb817c92d445d6fe4bc718e3a 100644 (file)
@@ -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) {
index 908ae80cdeafb047c872ea091eb5818a05cec470..d3358cb9244086f5d0dd4281ef86b6c79cb616c1 100644 (file)
@@ -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();
index d74e226d8510cf7a6b35043bc463a8b03319dfda..af7fcb25818c219f628cf89cf8885915e494ecc4 100644 (file)
@@ -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();