Merge pull request #3212 from owncloud/stop-links

Don't display shared links if disabled
This commit is contained in:
Morris Jobke 2013-05-02 15:29:00 -07:00
commit a204a46d50
1 changed files with 7 additions and 0 deletions

View File

@ -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;