Merge pull request #15629 from owncloud/deprecate-potential-dangerous-methods
Deprecate unused `\OCP\Response::sendFile`
This commit is contained in:
commit
930ae11f8e
|
@ -212,9 +212,10 @@ class OC_Response {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Send file as response, checking and setting caching headers
|
* Send file as response, checking and setting caching headers
|
||||||
* @param string $filepath of file to send
|
* @param string $filepath of file to send
|
||||||
*/
|
* @deprecated 8.1.0 - Use \OCP\AppFramework\Http\StreamResponse or another AppFramework controller instead
|
||||||
|
*/
|
||||||
static public function sendFile($filepath) {
|
static public function sendFile($filepath) {
|
||||||
$fp = fopen($filepath, 'rb');
|
$fp = fopen($filepath, 'rb');
|
||||||
if ($fp) {
|
if ($fp) {
|
||||||
|
|
|
@ -37,6 +37,7 @@ namespace OCP;
|
||||||
/**
|
/**
|
||||||
* This class provides convenient functions to send the correct http response headers
|
* This class provides convenient functions to send the correct http response headers
|
||||||
* @since 4.0.0
|
* @since 4.0.0
|
||||||
|
* @deprecated 8.1.0 - Use AppFramework controllers instead and modify the response object
|
||||||
*/
|
*/
|
||||||
class Response {
|
class Response {
|
||||||
/**
|
/**
|
||||||
|
@ -103,6 +104,7 @@ class Response {
|
||||||
* Send file as response, checking and setting caching headers
|
* Send file as response, checking and setting caching headers
|
||||||
* @param string $filepath of file to send
|
* @param string $filepath of file to send
|
||||||
* @since 4.0.0
|
* @since 4.0.0
|
||||||
|
* @deprecated 8.1.0 - Use \OCP\AppFramework\Http\StreamResponse or another AppFramework controller instead
|
||||||
*/
|
*/
|
||||||
static public function sendFile( $filepath ) {
|
static public function sendFile( $filepath ) {
|
||||||
\OC_Response::sendFile( $filepath );
|
\OC_Response::sendFile( $filepath );
|
||||||
|
|
Loading…
Reference in New Issue