summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/ajax
diff options
context:
space:
mode:
authorBjörn Schießle <schiessle@owncloud.com>2016-04-18 18:17:08 +0200
committerBjörn Schießle <schiessle@owncloud.com>2016-04-22 14:55:40 +0200
commite10105474fbef8940fdfa96d5e2bf2f09b1f0649 (patch)
tree1881e059a3408a2d4e8096e31719ba989f7dfab1 /apps/files_sharing/ajax
parent606b756a94643eaae87e18b39f6c75e6d18fec7e (diff)
downloadnextcloud-server-e10105474fbef8940fdfa96d5e2bf2f09b1f0649.tar.gz
nextcloud-server-e10105474fbef8940fdfa96d5e2bf2f09b1f0649.zip
move federated sharing settings to the federatedfilesharing app
Diffstat (limited to 'apps/files_sharing/ajax')
-rw-r--r--apps/files_sharing/ajax/external.php5
-rw-r--r--apps/files_sharing/ajax/shareinfo.php5
2 files changed, 8 insertions, 2 deletions
diff --git a/apps/files_sharing/ajax/external.php b/apps/files_sharing/ajax/external.php
index 76f9d5d7668..78e648618be 100644
--- a/apps/files_sharing/ajax/external.php
+++ b/apps/files_sharing/ajax/external.php
@@ -31,8 +31,11 @@ OCP\JSON::checkAppEnabled('files_sharing');
$l = \OC::$server->getL10N('files_sharing');
+$federatedSharingApp = new \OCA\FederatedFileSharing\AppInfo\Application('federatedfilesharing');
+$federatedShareProvider = $federatedSharingApp->getFederatedShareProvider();
+
// check if server admin allows to mount public links from other servers
-if (OCA\Files_Sharing\Helper::isIncomingServer2serverShareEnabled() === false) {
+if ($federatedShareProvider->isIncomingServer2serverShareEnabled() === false) {
\OCP\JSON::error(array('data' => array('message' => $l->t('Server to server sharing is not enabled on this server'))));
exit();
}
diff --git a/apps/files_sharing/ajax/shareinfo.php b/apps/files_sharing/ajax/shareinfo.php
index 47bc061c136..d7f756b0039 100644
--- a/apps/files_sharing/ajax/shareinfo.php
+++ b/apps/files_sharing/ajax/shareinfo.php
@@ -29,7 +29,10 @@ if (!isset($_GET['t'])) {
exit;
}
-if (OCA\Files_Sharing\Helper::isOutgoingServer2serverShareEnabled() === false) {
+$federatedSharingApp = new \OCA\FederatedFileSharing\AppInfo\Application('federatedfilesharing');
+$federatedShareProvider = $federatedSharingApp->getFederatedShareProvider();
+
+if ($federatedShareProvider->isOutgoingServer2serverShareEnabled() === false) {
\OC_Response::setStatus(404); // 404 not found
exit;
}