mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-03 16:51:40 +09:00
Fix incorrect short URL for POST requests made by Rhymix.ajax()
This commit is contained in:
parent
3c741ec8bc
commit
3fb9d0acaa
1 changed files with 3 additions and 1 deletions
|
|
@ -393,7 +393,7 @@ Rhymix.ajax = function(action, params, success, error) {
|
|||
// Extract action info
|
||||
if (!action) {
|
||||
if (params instanceof FormData) {
|
||||
action = (params.get('mid') || params.get('module')) + '.' + params.get('act');
|
||||
action = (params.get('module') || params.get('mid')) + '.' + params.get('act');
|
||||
if (action === '.') {
|
||||
action = null;
|
||||
}
|
||||
|
|
@ -410,11 +410,13 @@ Rhymix.ajax = function(action, params, success, error) {
|
|||
|
||||
// Add action to URL if the current rewrite level supports it
|
||||
let url = this.URI(window.request_uri).pathname();
|
||||
/*
|
||||
if (this.getRewriteLevel() >= 2 && action !== null) {
|
||||
url = url + action.replace('.', '/');
|
||||
} else {
|
||||
url = url + 'index.php';
|
||||
}
|
||||
*/
|
||||
|
||||
// Add CSRF token and AJAX compatibility hint
|
||||
const headers = {};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue