Correctly generate URL when there were not parameters

Fixes #13014
Fixes #13013

Signed-off-by: Michal Čihař <michal@cihar.com>
This commit is contained in:
Michal Čihař 2017-02-20 08:58:00 +01:00
parent 59e9856200
commit b42ef4f631

View File

@ -84,9 +84,15 @@ var PMA_commonParams = (function () {
* @return string
*/
getUrlQuery: function () {
var common = this.get('common_query');
var separator = '?';
if (common.length > 0) {
separator = '&';
}
return PMA_sprintf(
'%s&server=%s&db=%s&table=%s',
'%s%sserver=%s&db=%s&table=%s',
this.get('common_query'),
separator,
encodeURIComponent(this.get('server')),
encodeURIComponent(this.get('db')),
encodeURIComponent(this.get('table'))