mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-23 04:12:18 +09:00
Fixed a bug for setRequestMethod()
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9859 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
7ee45e57c7
commit
ebd5c75e33
1 changed files with 4 additions and 4 deletions
|
|
@ -644,15 +644,15 @@ class Context {
|
|||
|
||||
/**
|
||||
* @brief determine request method (GET/POST/XMLRPC/JSON)
|
||||
* @param[in] $type request method
|
||||
* @param[in] $type request method (optional)
|
||||
* @return none
|
||||
**/
|
||||
function setRequestMethod($type) {
|
||||
function setRequestMethod($type='') {
|
||||
is_a($this,'Context')?$self=&$this:$self=&Context::getInstance();
|
||||
|
||||
($type && $self->request_method=$type) or
|
||||
(strpos($_SERVER['CONTENT_TYPE'],'json') && $this->request_method='JSON') or
|
||||
($GLOBALS['HTTP_RAW_POST_DATA'] && $this->request_method='XMLRPC') or
|
||||
(strpos($_SERVER['CONTENT_TYPE'],'json') && $self->request_method='JSON') or
|
||||
($GLOBALS['HTTP_RAW_POST_DATA'] && $self->request_method='XMLRPC') or
|
||||
($self->request_method = $_SERVER['REQUEST_METHOD']);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue