aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/assets/javascript/installer.js
diff options
context:
space:
mode:
authorTristan Darricau <tristan.darricau@sensiolabs.com>2016-02-02 21:29:20 +0100
committerTristan Darricau <tristan.darricau@sensiolabs.com>2016-02-02 21:29:20 +0100
commit03fba990747bb0eeda47c8247b5808257d1443b7 (patch)
treea81f78974d37ed7182231aa8a9138d242824f61c /phpBB/assets/javascript/installer.js
parent724bd471a746d0fe2ef799091b943e671d21166e (diff)
parent91f809dc3dc926ff858e5e53ee8cfed781c1aeaa (diff)
downloadforums-03fba990747bb0eeda47c8247b5808257d1443b7.tar
forums-03fba990747bb0eeda47c8247b5808257d1443b7.tar.gz
forums-03fba990747bb0eeda47c8247b5808257d1443b7.tar.bz2
forums-03fba990747bb0eeda47c8247b5808257d1443b7.tar.xz
forums-03fba990747bb0eeda47c8247b5808257d1443b7.zip
Merge pull request #4017 from CHItA/ticket/14262
[ticket/14262] Move convertor to controller * CHItA/ticket/14262: [ticket/14262] Add error handling and small CS fixes [ticket/14262] Remove converter template duplicate [ticket/14262] Fix stage navigation [ticket/14262] Move convertor to controller
Diffstat (limited to 'phpBB/assets/javascript/installer.js')
-rw-r--r--phpBB/assets/javascript/installer.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/phpBB/assets/javascript/installer.js b/phpBB/assets/javascript/installer.js
index 5f2c65c776..958450ed57 100644
--- a/phpBB/assets/javascript/installer.js
+++ b/phpBB/assets/javascript/installer.js
@@ -242,6 +242,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
*
@@ -308,6 +324,10 @@
if (responseObject.hasOwnProperty('refresh')) {
refreshRequested = true;
}
+
+ if (responseObject.hasOwnProperty('redirect')) {
+ redirect(responseObject.redirect.url, responseObject.redirect.use_ajax);
+ }
}
/**