summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorris Jobke <morris.jobke@gmail.com>2013-05-02 15:29:00 -0700
committerMorris Jobke <morris.jobke@gmail.com>2013-05-02 15:29:00 -0700
commita204a46d5003435967d2b47c9a4a64604f1d6426 (patch)
tree42414ee2e0979262bcaff84ed6a1666d04ff2352
parentf47cecc6511cf5411adc0ab2984e23094406e461 (diff)
parent274bf3c6bdb4dc1ccf4f88d485b5bffe85d8a8ea (diff)
downloadnextcloud-server-a204a46d5003435967d2b47c9a4a64604f1d6426.tar.gz
nextcloud-server-a204a46d5003435967d2b47c9a4a64604f1d6426.zip
Merge pull request #3212 from owncloud/stop-links
Don't display shared links if disabled
-rw-r--r--apps/files_sharing/public.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/apps/files_sharing/public.php b/apps/files_sharing/public.php
index c8aca498f8c..2b283375a67 100644
--- a/apps/files_sharing/public.php
+++ b/apps/files_sharing/public.php
@@ -3,6 +3,13 @@ $RUNTIME_NOSETUPFS = true;
// Load other apps for file previews
OC_App::loadApps();
+if (\OC_Appconfig::getValue('core', 'shareapi_allow_links', 'yes') !== 'yes') {
+ header('HTTP/1.0 404 Not Found');
+ $tmpl = new OCP\Template('', '404', 'guest');
+ $tmpl->printPage();
+ exit();
+}
+
function fileCmp($a, $b) {
if ($a['type'] == 'dir' and $b['type'] != 'dir') {
return -1;