fix check for POST
darcs-hash:20080517171501-84dde-b8d6a1cc106372c9127d73442b4740f2de7e7b22.gz
This commit is contained in:
		@@ -25,7 +25,7 @@ class LoginAction extends Action {
 | 
				
			|||||||
		parent::handle($args);
 | 
							parent::handle($args);
 | 
				
			||||||
		if (common_logged_in()) {
 | 
							if (common_logged_in()) {
 | 
				
			||||||
			common_user_error(_t('Already logged in.'));
 | 
								common_user_error(_t('Already logged in.'));
 | 
				
			||||||
		} else if ($this->arg('METHOD') == 'POST') {
 | 
							} else if ($_SERVER['REQUEST_METHOD'] == 'POST') {
 | 
				
			||||||
			$this->check_login();
 | 
								$this->check_login();
 | 
				
			||||||
		} else {
 | 
							} else {
 | 
				
			||||||
			$this->show_form();
 | 
								$this->show_form();
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -27,7 +27,7 @@ class NewnoticeAction extends Action {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
		if (!common_logged_in()) {
 | 
							if (!common_logged_in()) {
 | 
				
			||||||
			common_user_error(_t('Not 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();
 | 
								$id = $this->save_new_notice();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			if ($id) {
 | 
								if ($id) {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -26,7 +26,7 @@ class RegisterAction extends Action {
 | 
				
			|||||||
		
 | 
							
 | 
				
			||||||
		if (common_logged_in()) {
 | 
							if (common_logged_in()) {
 | 
				
			||||||
			common_user_error(_t('Already logged in.'));
 | 
								common_user_error(_t('Already logged in.'));
 | 
				
			||||||
		} else if ($this->arg('METHOD') == 'POST') {
 | 
							} else if ($_SERVER['REQUEST_METHOD'] == 'POST') {
 | 
				
			||||||
			$this->try_register();
 | 
								$this->try_register();
 | 
				
			||||||
		} else {
 | 
							} else {
 | 
				
			||||||
			$this->show_form();
 | 
								$this->show_form();
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -26,8 +26,7 @@ class SettingsAction extends Action {
 | 
				
			|||||||
		if (!common_logged_in()) {
 | 
							if (!common_logged_in()) {
 | 
				
			||||||
			common_user_error(_t('Not logged in.'));
 | 
								common_user_error(_t('Not logged in.'));
 | 
				
			||||||
			return;
 | 
								return;
 | 
				
			||||||
		}
 | 
							} else if ($_SERVER['REQUEST_METHOD'] == 'POST') {
 | 
				
			||||||
		if ($this->arg('METHOD') == 'POST') {
 | 
					 | 
				
			||||||
			$this->handle_post();
 | 
								$this->handle_post();
 | 
				
			||||||
		} else {
 | 
							} else {
 | 
				
			||||||
			$this->show_form();
 | 
								$this->show_form();
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user