From 955b9ede33c5696173a760ea271ec32d79e843b9 Mon Sep 17 00:00:00 2001 From: Mate Bartus Date: Thu, 11 Feb 2016 13:18:30 +0100 Subject: [ticket/14462] Further speed improvements - Cache the secondary container - Only initialize tasks/modules that are being used - Add timeout error message in the AJAX UI PHPBB3-14462 --- phpBB/assets/javascript/installer.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'phpBB/assets/javascript/installer.js') diff --git a/phpBB/assets/javascript/installer.js b/phpBB/assets/javascript/installer.js index 4a4f381844..0e54654ff1 100644 --- a/phpBB/assets/javascript/installer.js +++ b/phpBB/assets/javascript/installer.js @@ -12,6 +12,7 @@ var progressTimer = null; var currentProgress = 0; var refreshRequested = false; + var transmissionOver = false; // Template related variables var $contentWrapper = $('.install-body').find('.main'); @@ -329,6 +330,12 @@ if (responseObject.hasOwnProperty('redirect')) { redirect(responseObject.redirect.url, responseObject.redirect.use_ajax); } + + if (responseObject.hasOwnProperty('over')) { + if (responseObject.over) { + transmissionOver = true; + } + } } /** @@ -357,10 +364,21 @@ $('#loading_indicator').css('display', 'none'); resetPolling(); + var timeoutDetected = !transmissionOver; + if (refreshRequested) { refreshRequested = false; doRefresh(); } + + if (timeoutDetected) { + addMessage('error', + [{ + title:'The installer detected a timeout.', + description: 'The installer has detected a timeout, you may try to refresh the page, that may lead to data corruption. We suggest that you either increase your timeout settings or try to use the CLI.' + }] + ); + } } } @@ -420,6 +438,7 @@ */ function startPolling(xhReq) { resetPolling(); + transmissionOver = false; pollTimer = setInterval(function () { pollContent(xhReq); }, 250); -- cgit v1.2.1 From 2084404d2a0648d406749d67e44f1ba3ba44d7df Mon Sep 17 00:00:00 2001 From: Oliver Schramm Date: Sat, 13 Feb 2016 23:10:40 +0100 Subject: [ticket/14462] Make timeout error translateable PHPBB3-14462 --- phpBB/assets/javascript/installer.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'phpBB/assets/javascript/installer.js') diff --git a/phpBB/assets/javascript/installer.js b/phpBB/assets/javascript/installer.js index 0e54654ff1..d9f446a28d 100644 --- a/phpBB/assets/javascript/installer.js +++ b/phpBB/assets/javascript/installer.js @@ -374,8 +374,8 @@ if (timeoutDetected) { addMessage('error', [{ - title:'The installer detected a timeout.', - description: 'The installer has detected a timeout, you may try to refresh the page, that may lead to data corruption. We suggest that you either increase your timeout settings or try to use the CLI.' + title: installLang.title, + description: installLang.msg }] ); } -- cgit v1.2.1