Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHannah von Reth <hannah.vonreth@owncloud.com>2022-05-24 16:07:36 +0300
committerHannah von Reth <vonreth@kde.org>2022-05-25 15:21:44 +0300
commite81625c9706ac5280fed65f6b8af141963860072 (patch)
tree9ce22eeb4bc3c88c834921818627c253b0bbdb57 /src/gui/connectionvalidator.cpp
parent0ae84fad0d718b084dc5bcefc2098ce4f4b8b7a3 (diff)
Use ocis productversion
Diffstat (limited to 'src/gui/connectionvalidator.cpp')
-rw-r--r--src/gui/connectionvalidator.cpp24
1 files changed, 3 insertions, 21 deletions
diff --git a/src/gui/connectionvalidator.cpp b/src/gui/connectionvalidator.cpp
index 23bcb2118..7284f44ee 100644
--- a/src/gui/connectionvalidator.cpp
+++ b/src/gui/connectionvalidator.cpp
@@ -152,18 +152,10 @@ void ConnectionValidator::slotCheckServerAndAuth()
void ConnectionValidator::slotStatusFound(const QUrl &url, const QJsonObject &info)
{
- // Newer servers don't disclose any version in status.php anymore
- // https://github.com/owncloud/core/pull/27473/files
- // so this string can be empty.
- const QString serverVersion = info.value(QLatin1String("version")).toString();
- const QString serverProduct = info.value(QLatin1String("productname")).toString();
-
// status.php was found.
qCInfo(lcConnectionValidator) << "** Application: ownCloud found: "
<< url << " with version "
- << info.value(QLatin1String("versionstring")).toString()
- << "(" << serverVersion << "-" << serverProduct
- << ")";
+ << info.value(QLatin1String("versionstring")).toString();
// Update server url in case of redirection
if (_account->url() != url) {
@@ -173,10 +165,6 @@ void ConnectionValidator::slotStatusFound(const QUrl &url, const QJsonObject &in
return;
}
- if (!serverVersion.isEmpty() && !setAndCheckServerInfo(serverVersion, serverProduct)) {
- return;
- }
-
// Check for maintenance mode: Servers send "true", so go through QVariant
// to parse it correctly.
if (info["maintenance"].toVariant().toBool()) {
@@ -263,11 +251,7 @@ void ConnectionValidator::checkServerCapabilities()
auto caps = job->data().value("ocs").toObject().value("data").toObject().value("capabilities").toObject();
qCInfo(lcConnectionValidator) << "Server capabilities" << caps;
_account->setCapabilities(caps.toVariantMap());
-
- // New servers also report the version in the capabilities
- const QString serverVersion = caps["core"].toObject()["status"].toObject()["version"].toString();
- const QString product = caps["core"].toObject()["status"].toObject()["productname"].toString();
- if (!setAndCheckServerInfo(serverVersion, product)) {
+ if (!checkServerInfo()) {
return;
}
@@ -313,10 +297,8 @@ void ConnectionValidator::fetchUser()
job->start();
}
-bool ConnectionValidator::setAndCheckServerInfo(const QString &version, const QString &serverProduct)
+bool ConnectionValidator::checkServerInfo()
{
- _account->setServerInfo(version, serverProduct);
-
// We cannot deal with servers < 10.0.0
if (_account->serverVersionUnsupported()) {
_errors.append(tr("The configured server for this client is too old."));