diff --git a/core/js/maintenance-check.js b/core/js/maintenance-check.js index 061a434214..663f7fb5f0 100644 --- a/core/js/maintenance-check.js +++ b/core/js/maintenance-check.js @@ -3,10 +3,7 @@ window.setInterval(checkStatus, 20000); function checkStatus() { var request = new XMLHttpRequest(); - var ocroot = location.pathname.substr( - 0, location.pathname.indexOf('index.php') - ); - request.open("GET", ocroot+'status.php', true); + request.open("GET", OC.webroot+'/status.php', true); request.onreadystatechange = function() { if (request.readyState === 4) { var response = request.responseText;