From 7e5d89293d7bd52ac42d026d34a8154fbbdf33bb Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Tue, 23 Feb 2016 18:10:11 +0100 Subject: [PATCH] AccountManager: take theURL from the Theme rather than from the config if the theme specify it That way an upgrade of the client can actually change the URL Issue https://github.com/owncloud/enterprise/issues/1113 --- src/gui/accountmanager.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/gui/accountmanager.cpp b/src/gui/accountmanager.cpp index 0b5eed458..590bfb692 100644 --- a/src/gui/accountmanager.cpp +++ b/src/gui/accountmanager.cpp @@ -194,7 +194,14 @@ AccountPtr AccountManager::load(QSettings& settings) { auto acc = createAccount(); - acc->setUrl(settings.value(QLatin1String(urlC)).toUrl()); + QString overrideUrl = Theme::instance()->overrideServerUrl(); + if( !overrideUrl.isEmpty() ) { + // if there is a overrideUrl, don't even bother reading from the config as all the accounts + // must use the overrideUrl + acc->setUrl(overrideUrl); + } else { + acc->setUrl(settings.value(QLatin1String(urlC)).toUrl()); + } // We want to only restore settings for that auth type and the user value acc->_settingsMap.insert(QLatin1String(userC), settings.value(userC)); -- 2.30.2