diff options
author | Mate Bartus <mate.bartus@gmail.com> | 2015-10-28 15:00:11 +0100 |
---|---|---|
committer | Mate Bartus <mate.bartus@gmail.com> | 2016-01-29 00:03:44 +0100 |
commit | a649768e17d25bcf55ae539420abe4eb4b7a1ef1 (patch) | |
tree | f8441c9c77054d6a58bd1e8befa8842ef180be4a /phpBB/assets/javascript/installer.js | |
parent | 10756f3f87efac29448a48207548d5b71a3206b9 (diff) | |
download | forums-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.js | 20 |
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); + } } /** |