mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-18 18:02:15 +09:00
Set request method to XMLRPC if called via exec_xml()
This commit is contained in:
parent
6eb99c8486
commit
0c2c0d2b19
3 changed files with 17 additions and 9 deletions
|
|
@ -235,6 +235,12 @@ class Context
|
|||
$this->_setJSONRequestArgument();
|
||||
$this->_setRequestArgument();
|
||||
$this->_setUploadedArgument();
|
||||
|
||||
if(isset($_POST['_rx_ajax_compat']) && $_POST['_rx_ajax_compat'] === 'XMLRPC')
|
||||
{
|
||||
self::$_instance->request_method = 'XMLRPC';
|
||||
self::$_instance->response_method = 'JSON';
|
||||
}
|
||||
|
||||
$this->loadDBInfo();
|
||||
if($this->db_info->use_sitelock == 'Y')
|
||||
|
|
|
|||
|
|
@ -40,7 +40,15 @@ class DisplayHandler extends Handler
|
|||
{
|
||||
$handler = new VirtualXMLDisplayHandler();
|
||||
}
|
||||
else if(Context::getRequestMethod() == 'XMLRPC')
|
||||
elseif(Context::getRequestMethod() == 'JSON' || isset($_POST['_rx_ajax_compat']))
|
||||
{
|
||||
$handler = new JSONDisplayHandler();
|
||||
}
|
||||
elseif(Context::getRequestMethod() == 'JS_CALLBACK')
|
||||
{
|
||||
$handler = new JSCallbackDisplayHandler();
|
||||
}
|
||||
elseif(Context::getRequestMethod() == 'XMLRPC')
|
||||
{
|
||||
$handler = new XMLDisplayHandler();
|
||||
if(strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== FALSE)
|
||||
|
|
@ -48,14 +56,6 @@ class DisplayHandler extends Handler
|
|||
$this->gz_enabled = FALSE;
|
||||
}
|
||||
}
|
||||
else if(Context::getRequestMethod() == 'JSON')
|
||||
{
|
||||
$handler = new JSONDisplayHandler();
|
||||
}
|
||||
else if(Context::getRequestMethod() == 'JS_CALLBACK')
|
||||
{
|
||||
$handler = new JSCallbackDisplayHandler();
|
||||
}
|
||||
else
|
||||
{
|
||||
$handler = new HTMLDisplayHandler();
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@
|
|||
params = params ? ($.isArray(params) ? arr2obj(params) : params) : {};
|
||||
params.module = module;
|
||||
params.act = act;
|
||||
params._rx_ajax_compat = 'XMLRPC';
|
||||
|
||||
// Fill in the XE vid.
|
||||
if (typeof(xeVid) != "undefined") params.vid = xeVid;
|
||||
|
|
@ -162,6 +163,7 @@
|
|||
if (action.length != 2) return;
|
||||
params.module = action[0];
|
||||
params.act = action[1];
|
||||
params._rx_ajax_compat = 'JSON';
|
||||
|
||||
// Fill in the XE vid.
|
||||
if (typeof(xeVid) != "undefined") params.vid = xeVid;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue