Merge branch 'ent-5824-connection-lost-warn-mejora' into 'develop'

Ent 5824 connection lost warn mejora

See merge request artica/pandorafms!3392
This commit is contained in:
Daniel Rodriguez 2020-07-31 14:24:03 +02:00
commit 05446b6e3e
1 changed files with 9 additions and 1 deletions

View File

@ -1952,7 +1952,15 @@ function isReachable(url) {
* Gets server origin url * Gets server origin url
*/ */
function getServerUrl() { function getServerUrl() {
return $("#php_to_js_value_absolute_homeurl").val() || window.location.origin; var server_url;
try {
server_url = get_php_value("homeurl");
} catch (SyntaxError) {
console.warn("Pandora homeurl cannot be found.");
server_url = window.location.origin + "/pandora_console";
}
return server_url;
} }
/** /**