summaryrefslogtreecommitdiffstats
path: root/lib/private/largefilehelper.php
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-03-12 21:43:41 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2015-03-12 21:43:41 +0100
commit5855108e9b413c69b95dcd68972cac7f4f01f4cc (patch)
tree999b505632dfdb59a7b0bcb335417115ede9b3e4 /lib/private/largefilehelper.php
parent68a7041348e592a8c8e35458a2355b0da2d99f79 (diff)
downloadnextcloud-server-5855108e9b413c69b95dcd68972cac7f4f01f4cc.tar.gz
nextcloud-server-5855108e9b413c69b95dcd68972cac7f4f01f4cc.zip
drop any fallback code related to curl - refs https://github.com/owncloud/core/pull/14838#issuecomment-78586447
Diffstat (limited to 'lib/private/largefilehelper.php')
-rw-r--r--lib/private/largefilehelper.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/private/largefilehelper.php b/lib/private/largefilehelper.php
index b6a8c536e9b..a5a8f302eab 100644
--- a/lib/private/largefilehelper.php
+++ b/lib/private/largefilehelper.php
@@ -94,15 +94,15 @@ class LargeFileHelper {
/**
* @brief Tries to get the size of a file via a CURL HEAD request.
*
- * @param string $filename Path to the file.
+ * @param string $fileName Path to the file.
*
* @return null|int|float Number of bytes as number (float or int) or
* null on failure.
*/
- public function getFileSizeViaCurl($filename) {
- if (function_exists('curl_init') && \OC::$server->getIniWrapper()->getString('open_basedir') === '') {
- $fencoded = rawurlencode($filename);
- $ch = curl_init("file://$fencoded");
+ public function getFileSizeViaCurl($fileName) {
+ if (\OC::$server->getIniWrapper()->getString('open_basedir') === '') {
+ $encodedFileName = rawurlencode($fileName);
+ $ch = curl_init("file://$encodedFileName");
curl_setopt($ch, CURLOPT_NOBODY, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HEADER, true);
@@ -129,8 +129,8 @@ class LargeFileHelper {
*/
public function getFileSizeViaCOM($filename) {
if (class_exists('COM')) {
- $fsobj = new \COM("Scripting.FileSystemObject");
- $file = $fsobj->GetFile($filename);
+ $fsObj = new \COM("Scripting.FileSystemObject");
+ $file = $fsObj->GetFile($filename);
return 0 + $file->Size;
}
return null;