dbaccess/source/ui/dlg/DbAdminImpl.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
New commits: commit 93fa91130cf41ae3cb2f8ef6eb596d34db55c7d1 Author: Julien Nabet <serval2...@yahoo.fr> AuthorDate: Sat Sep 23 17:23:36 2023 +0200 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Mon Sep 25 09:19:10 2023 +0200 tdf#157260: don't add a "port" param if already present in the connection DB url Regression of https://cgit.freedesktop.org/libreoffice/core/commit/?id=afe99617707c92460e66486c0057ef327e8aa017 "tdf#43369: Specific UI for collecting PostgreSQL connection settings" in 2023-04 Change-Id: Id6e9c9a1aa8586cb4081e22988060476183369d2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157193 Reviewed-by: Julien Nabet <serval2...@yahoo.fr> Tested-by: Jenkins (cherry picked from commit 3399854b66bb1fb175b8504c964008e53167ca7b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157129 Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> diff --git a/dbaccess/source/ui/dlg/DbAdminImpl.cxx b/dbaccess/source/ui/dlg/DbAdminImpl.cxx index 0ce7a06afdb4..7e8aa1f0d1ef 100644 --- a/dbaccess/source/ui/dlg/DbAdminImpl.cxx +++ b/dbaccess/source/ui/dlg/DbAdminImpl.cxx @@ -539,7 +539,8 @@ OUString ODbDataSourceAdministrationHelper::getConnectionURL() const hostname = "'" + hostname + "'"; rURL += " host=" + hostname; } - if (pPortNumber && pPortNumber->GetValue()) + // tdf#157260: if port is already in the URL, don't add another one + if (pPortNumber && pPortNumber->GetValue() && (rURL.indexOf("port=") == -1)) { OUString port = "'" + OUString::number(pPortNumber->GetValue()) + "'"; rURL += " port=" + port;