summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/public.php
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2014-02-13 16:28:49 +0100
committerRobin Appelman <icewind@owncloud.com>2014-02-13 16:28:49 +0100
commit181bbd4325ea2b21ff8ecca93eb5ac839d6a739d (patch)
tree18fdd4bfdbd2de538ebe996e7ddb580a07450994 /apps/files_sharing/public.php
parent4b84e3a7e8bf7dc0a8e62074803f97a81571ca22 (diff)
downloadnextcloud-server-181bbd4325ea2b21ff8ecca93eb5ac839d6a739d.tar.gz
nextcloud-server-181bbd4325ea2b21ff8ecca93eb5ac839d6a739d.zip
Remove usage of legacy OC_Appconfig
Diffstat (limited to 'apps/files_sharing/public.php')
-rw-r--r--apps/files_sharing/public.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/files_sharing/public.php b/apps/files_sharing/public.php
index f03ac7205a3..e7a5f5024b8 100644
--- a/apps/files_sharing/public.php
+++ b/apps/files_sharing/public.php
@@ -2,7 +2,9 @@
// Load other apps for file previews
OC_App::loadApps();
-if (\OC_Appconfig::getValue('core', 'shareapi_allow_links', 'yes') !== 'yes') {
+$appConfig = \OC::$server->getAppConfig();
+
+if ($appConfig->getValue('core', 'shareapi_allow_links', 'yes') !== 'yes') {
header('HTTP/1.0 404 Not Found');
$tmpl = new OCP\Template('', '404', 'guest');
$tmpl->printPage();
@@ -151,7 +153,7 @@ if (isset($path)) {
$tmpl->assign('dirToken', $linkItem['token']);
$tmpl->assign('sharingToken', $token);
$allowPublicUploadEnabled = (bool) ($linkItem['permissions'] & OCP\PERMISSION_CREATE);
- if (OC_Appconfig::getValue('core', 'shareapi_allow_public_upload', 'yes') === 'no') {
+ if ($appConfig->getValue('core', 'shareapi_allow_public_upload', 'yes') === 'no') {
$allowPublicUploadEnabled = false;
}
if ($linkItem['item_type'] !== 'folder') {