aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/assets/javascript/installer.js
diff options
context:
space:
mode:
authorMate Bartus <mate.bartus@gmail.com>2015-10-28 15:00:11 +0100
committerMate Bartus <mate.bartus@gmail.com>2016-01-29 00:03:44 +0100
commita649768e17d25bcf55ae539420abe4eb4b7a1ef1 (patch)
treef8441c9c77054d6a58bd1e8befa8842ef180be4a /phpBB/assets/javascript/installer.js
parent10756f3f87efac29448a48207548d5b71a3206b9 (diff)
downloadforums-a649768e17d25bcf55ae539420abe4eb4b7a1ef1.tar
forums-a649768e17d25bcf55ae539420abe4eb4b7a1ef1.tar.gz
forums-a649768e17d25bcf55ae539420abe4eb4b7a1ef1.tar.bz2
forums-a649768e17d25bcf55ae539420abe4eb4b7a1ef1.tar.xz
forums-a649768e17d25bcf55ae539420abe4eb4b7a1ef1.zip
[ticket/14262] Move convertor to controller
PHPBB3-14262
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 c5909556c6..7bb2bb426d 100644
--- a/phpBB/assets/javascript/installer.js
+++ b/phpBB/assets/javascript/installer.js
@@ -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);
+ }
}
/**