mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-22 05:15:29 +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
|
// Extract action info
|
||||||
if (!action) {
|
if (!action) {
|
||||||
if (params instanceof FormData) {
|
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 === '.') {
|
if (action === '.') {
|
||||||
action = null;
|
action = null;
|
||||||
}
|
}
|
||||||
|
|
@ -410,11 +410,13 @@ Rhymix.ajax = function(action, params, success, error) {
|
||||||
|
|
||||||
// Add action to URL if the current rewrite level supports it
|
// Add action to URL if the current rewrite level supports it
|
||||||
let url = this.URI(window.request_uri).pathname();
|
let url = this.URI(window.request_uri).pathname();
|
||||||
|
/*
|
||||||
if (this.getRewriteLevel() >= 2 && action !== null) {
|
if (this.getRewriteLevel() >= 2 && action !== null) {
|
||||||
url = url + action.replace('.', '/');
|
url = url + action.replace('.', '/');
|
||||||
} else {
|
} else {
|
||||||
url = url + 'index.php';
|
url = url + 'index.php';
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
// Add CSRF token and AJAX compatibility hint
|
// Add CSRF token and AJAX compatibility hint
|
||||||
const headers = {};
|
const headers = {};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue