[Pkg-owncloud-commits] [owncloud-client] 25/94: Avatars: Use old location for servers <10 #6279

Sandro Knauß hefee at debian.org
Thu Mar 29 11:12:11 UTC 2018


This is an automated email from the git hooks/post-receive script.

hefee pushed a commit to branch upstream
in repository owncloud-client.

commit e389fcaecbd2cf7e4267f9e29252f5a674698d46
Author: Christian Kamm <mail at ckamm.de>
Date:   Tue Jan 9 11:33:43 2018 +0100

    Avatars: Use old location for servers <10 #6279
---
 src/libsync/networkjobs.cpp | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/libsync/networkjobs.cpp b/src/libsync/networkjobs.cpp
index 6e2b81e..93766de 100644
--- a/src/libsync/networkjobs.cpp
+++ b/src/libsync/networkjobs.cpp
@@ -629,7 +629,11 @@ bool PropfindJob::finished()
 AvatarJob::AvatarJob(AccountPtr account, QObject *parent)
     : AbstractNetworkJob(account, QString(), parent)
 {
-    _avatarUrl = Utility::concatUrlPath(account->url(), QString("remote.php/dav/avatars/%1/128.png").arg(account->davUser()));
+    if (account->serverVersionInt() >= Account::makeServerVersion(10, 0, 0)) {
+        _avatarUrl = Utility::concatUrlPath(account->url(), QString("remote.php/dav/avatars/%1/128.png").arg(account->davUser()));
+    } else {
+        _avatarUrl = Utility::concatUrlPath(account->url(), QString("index.php/avatar/%1/128").arg(account->davUser()));
+    }
 }
 
 void AvatarJob::start()

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git



More information about the Pkg-owncloud-commits mailing list