mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-25 21:32:51 +09:00
exec_xml에서 파라미터가 정상적으로 전달되지 않던 버그 수정 git-svn-id: http://xe-core.googlecode.com/svn/sandbox@7343 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
d1dea0b57c
commit
c5a7a914b1
1 changed files with 9 additions and 1 deletions
|
|
@ -183,6 +183,7 @@ $.exec_xml = window.exec_xml = function(module, act, params, callback_func, resp
|
|||
var xml_path = request_uri+"index.php"
|
||||
|
||||
// {{{ set parameters
|
||||
if($.isArray(params)) params = arr2obj(params);
|
||||
params['module'] = module;
|
||||
params['act'] = act;
|
||||
|
||||
|
|
@ -216,7 +217,7 @@ $.exec_xml = window.exec_xml = function(module, act, params, callback_func, resp
|
|||
xml[i++] = '<methodCall>';
|
||||
xml[i++] = '<params>';
|
||||
|
||||
$.each(params, function(key, val) {
|
||||
$.each(params, function(key, val) {
|
||||
xml[i++] = '<'+key+'><![CDATA['+val+']]></'+key+'>';
|
||||
});
|
||||
|
||||
|
|
@ -323,6 +324,13 @@ function send_by_form(url, params) {
|
|||
|
||||
form.appendTo(document.body).submit();
|
||||
}
|
||||
function arr2obj(arr) {
|
||||
var ret = {};
|
||||
for(var key in arr) {
|
||||
if(!arr.hasOwnProperty(key)) ret[key] = arr[key];
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief exec_json (exec_xml와 같은 용도)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue