<?php
+\OC::$server->getSession()->close();
+
// Firefox and Konqueror tries to download application/json for me. --Arthur
OCP\JSON::setContentTypeHeader('text/plain');
}
}
-
OCP\JSON::callCheck();
-if (!\OCP\App::isEnabled('files_encryption')) {
- // encryption app need to create keys later, so can't close too early
- \OC::$server->getSession()->close();
-}
-
// get array with current storage stats (e.g. max file size)
$storageStats = \OCA\Files\Helper::buildFileStorageStatistics($dir);
/**
* @PublicPage
* @NoCSRFRequired
- * @UseSession
*
* @param string $token
* @param string $files
public function downloadShare($token, $files = null, $path = '') {
\OC_User::setIncognitoMode(true);
- // FIXME: Use DI once there is a suitable class
- if (!\OCP\App::isEnabled('files_encryption')) {
- // encryption app requires the session to store the keys in
- \OC::$server->getSession()->close();
- }
-
$linkItem = OCP\Share::getShareByToken($token, false);
// Share is password protected - check whether the user is permitted to access the share
}
// FIXME: The exit is required here because otherwise the AppFramework is trying to add headers as well
- // after dispatching the request which results in a "Cannot modify header information" notice.
+ // after dispatching the request which results in a "Cannot modify header information" notice.
OC_Files::get($originalSharePath, $files_list, $_SERVER['REQUEST_METHOD'] == 'HEAD');
exit();
} else {