Merge pull request #3470 from rullzer/use_ocs_url

If the OCS Share API returns an url use that
This commit is contained in:
Klaas Freitag 2015-07-28 14:26:23 +02:00
commit b07ab14c31

View file

@ -335,8 +335,11 @@ void ShareDialog::slotSharesFetched(const QVariantMap &reply)
} }
QString url; QString url;
// From ownCloud server 8.2 the url field is always set for public shares
if (data.contains("url")) {
url = data.value("url").toString();
} else if (versionString.contains('.') && versionString.split('.')[0].toInt() >= 8) {
// From ownCloud server version 8 on, a different share link scheme is used. // From ownCloud server version 8 on, a different share link scheme is used.
if (versionString.contains('.') && versionString.split('.')[0].toInt() >= 8) {
url = Account::concatUrlPath(_account->url(), QString("index.php/s/%1").arg(data.value("token").toString())).toString(); url = Account::concatUrlPath(_account->url(), QString("index.php/s/%1").arg(data.value("token").toString())).toString();
} else { } else {
QList<QPair<QString, QString>> queryArgs; QList<QPair<QString, QString>> queryArgs;