mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 17:21:39 +09:00
Fix #2330 incompatible handling of redirect_url in JSON-based procFilter compared to old XML version
This commit is contained in:
parent
ae7920a276
commit
0d71f5a0e0
1 changed files with 7 additions and 2 deletions
|
|
@ -440,10 +440,15 @@ function legacy_filter(filter_name, form, module, act, callback, responses, conf
|
|||
//exec_xml(module, act, params, callback, responses, params, form);
|
||||
params['_rx_ajax_compat'] = 'XMLRPC';
|
||||
exec_json(module + '.' + act, params, function(result) {
|
||||
if (!result) {
|
||||
result = {};
|
||||
}
|
||||
if ($.isFunction(callback)) {
|
||||
var filtered_result = {};
|
||||
responses.forEach(function(key) {
|
||||
if (result[key]) {
|
||||
Object.keys(result).forEach(function(key) {
|
||||
if (responses && responses.indexOf(key) >= 0) {
|
||||
filtered_result[key] = result[key];
|
||||
} else if (['error', 'message', 'act', 'redirect_url'].indexOf(key) >= 0) {
|
||||
filtered_result[key] = result[key];
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue