diff options
author | Lukas Reschke <lukas@owncloud.com> | 2015-04-20 11:01:32 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2015-04-20 11:01:32 +0200 |
commit | 930ae11f8e52e70640060eca5b69afdebe713c6b (patch) | |
tree | c86f388e19b1e7b9557b2ab8306ff7d9ecf462cc | |
parent | 9cb260d310de5bed546531eff5fbf0b7518f0f2f (diff) | |
parent | a98b8193667f7858730a1388aed1a9d306a236a8 (diff) | |
download | nextcloud-server-930ae11f8e52e70640060eca5b69afdebe713c6b.tar.gz nextcloud-server-930ae11f8e52e70640060eca5b69afdebe713c6b.zip |
Merge pull request #15629 from owncloud/deprecate-potential-dangerous-methods
Deprecate unused `\OCP\Response::sendFile`
-rw-r--r-- | lib/private/response.php | 7 | ||||
-rw-r--r-- | lib/public/response.php | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/lib/private/response.php b/lib/private/response.php index 018c44d2367..5725af2b893 100644 --- a/lib/private/response.php +++ b/lib/private/response.php @@ -212,9 +212,10 @@ class OC_Response { } /** - * Send file as response, checking and setting caching headers - * @param string $filepath of file to send - */ + * Send file as response, checking and setting caching headers + * @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) { $fp = fopen($filepath, 'rb'); if ($fp) { diff --git a/lib/public/response.php b/lib/public/response.php index 1942c1ec373..42220e4cf9c 100644 --- a/lib/public/response.php +++ b/lib/public/response.php @@ -37,6 +37,7 @@ namespace OCP; /** * This class provides convenient functions to send the correct http response headers * @since 4.0.0 + * @deprecated 8.1.0 - Use AppFramework controllers instead and modify the response object */ class Response { /** @@ -103,6 +104,7 @@ class Response { * Send file as response, checking and setting caching headers * @param string $filepath of file to send * @since 4.0.0 + * @deprecated 8.1.0 - Use \OCP\AppFramework\Http\StreamResponse or another AppFramework controller instead */ static public function sendFile( $filepath ) { \OC_Response::sendFile( $filepath ); |