summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2016-03-01 06:12:38 +0100
committerLukas Reschke <lukas@owncloud.com>2016-03-01 07:01:52 +0100
commite965dcaebf77fc7bdcf67c06c80fe9e0c4ee20b1 (patch)
treee89c6262cf891e48e618545d009faef80441607b
parent8f95d699540c71197b8fe1e1bcc40bcef25fd781 (diff)
downloadnextcloud-server-e965dcaebf77fc7bdcf67c06c80fe9e0c4ee20b1.tar.gz
nextcloud-server-e965dcaebf77fc7bdcf67c06c80fe9e0c4ee20b1.zip
/shareinfo is not required
-rw-r--r--apps/files_sharing/lib/external/scanner.php1
-rw-r--r--apps/files_sharing/lib/external/storage.php7
2 files changed, 8 insertions, 0 deletions
diff --git a/apps/files_sharing/lib/external/scanner.php b/apps/files_sharing/lib/external/scanner.php
index 3335fc4707c..bfb9e817f09 100644
--- a/apps/files_sharing/lib/external/scanner.php
+++ b/apps/files_sharing/lib/external/scanner.php
@@ -90,6 +90,7 @@ class Scanner extends \OC\Files\Cache\Scanner {
}
if ($data['status'] === 'success') {
$this->addResult($data['data'], '');
+ } elseif ($data['status'] === 'unsupported') {
} else {
throw new \Exception(
'Error while scanning remote share: "' .
diff --git a/apps/files_sharing/lib/external/storage.php b/apps/files_sharing/lib/external/storage.php
index c23b273c2eb..514df41eac9 100644
--- a/apps/files_sharing/lib/external/storage.php
+++ b/apps/files_sharing/lib/external/storage.php
@@ -27,6 +27,7 @@ namespace OCA\Files_Sharing\External;
use OC\Files\Storage\DAV;
use OC\ForbiddenException;
+use OCA\FederatedFileSharing\DiscoveryManager;
use OCA\Files_Sharing\ISharedStorage;
use OCP\Files\NotFoundException;
use OCP\Files\StorageInvalidException;
@@ -248,6 +249,12 @@ class Storage extends DAV implements ISharedStorage {
$remote = $this->getRemote();
$token = $this->getToken();
$password = $this->getPassword();
+
+ // If remote is not an ownCloud do not try to get any share info
+ if(!$this->testRemoteUrl($remote . '/status.php')) {
+ return ['status' => 'unsupported'];
+ }
+
$url = rtrim($remote, '/') . '/index.php/apps/files_sharing/shareinfo?t=' . $token;
// TODO: DI