mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 22:10:45 +02:00
[ticket/14262] Move convertor to controller
PHPBB3-14262
This commit is contained in:
@@ -236,6 +236,22 @@
|
||||
}
|
||||
}
|
||||
|
||||
// Redirects user
|
||||
function redirect(url, use_ajax) {
|
||||
if (use_ajax) {
|
||||
resetPolling();
|
||||
|
||||
var xhReq = createXhrObject();
|
||||
xhReq.open('GET', url, true);
|
||||
xhReq.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
|
||||
xhReq.send();
|
||||
|
||||
startPolling(xhReq);
|
||||
} else {
|
||||
window.location.href = url;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse messages from the response object
|
||||
*
|
||||
@@ -302,6 +318,10 @@
|
||||
if (responseObject.hasOwnProperty('refresh')) {
|
||||
refreshRequested = true;
|
||||
}
|
||||
|
||||
if (responseObject.hasOwnProperty('redirect')) {
|
||||
redirect(responseObject.redirect.url, responseObject.redirect.use_ajax);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user