Fix getUrlQuery function not working correctly on server n° > 1

Signed-off-by: William Desportes <williamdes@wdes.fr>
This commit is contained in:
William Desportes 2020-11-05 13:46:53 +01:00
parent cb9680911e
commit 4478160221
No known key found for this signature in database
GPG Key ID: 90A0EF1B8251A889

View File

@ -86,6 +86,12 @@ var CommonParams = (function () {
var sep = (typeof separator !== 'undefined') ? separator : '?';
var common = this.get('common_query');
var argsep = CommonParams.get('arg_separator');
if (typeof common === 'string') {
// If the last char is the separator, do not add it
// Else add it
common = common.substr(common.length - 1, common.length) === argsep ? common : common + argsep;
}
return Functions.sprintf(
'%s%sserver=%s' + argsep + 'db=%s' + argsep + 'table=%s',
sep,