diff options
author | Victor Dubiniuk <victor.dubiniuk@gmail.com> | 2015-09-24 18:23:10 +0300 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-09-28 11:46:54 +0200 |
commit | 027fb4e3fe44f3ca075c96258afe55438f98dd6c (patch) | |
tree | f09ab1ce63d5893e212fe27be2014207d5498fc9 /lib/private/streamer.php | |
parent | 28df7be3192560b1b3616b98a5a1f057410ebab0 (diff) | |
download | nextcloud-server-027fb4e3fe44f3ca075c96258afe55438f98dd6c.tar.gz nextcloud-server-027fb4e3fe44f3ca075c96258afe55438f98dd6c.zip |
More corrections
Diffstat (limited to 'lib/private/streamer.php')
-rw-r--r-- | lib/private/streamer.php | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/lib/private/streamer.php b/lib/private/streamer.php index b530961afd2..2502807330b 100644 --- a/lib/private/streamer.php +++ b/lib/private/streamer.php @@ -31,9 +31,6 @@ class Streamer { // streamer instance private $streamerInstance; - /** @var string*/ - private $extension; - public function __construct(){ /** @var \OCP\IRequest */ $request = \OC::$server->getRequest(); @@ -47,12 +44,11 @@ class Streamer { /** * Send HTTP headers - * @param string name - * @return bool + * @param string $name */ public function sendHeaders($name){ $extension = $this->streamerInstance instanceof ZipStreamer ? '.zip' : '.tar'; - return $this->streamerInstance->sendHeaders($name . $extension); + $this->streamerInstance->sendHeaders($name . $extension); } /** @@ -60,13 +56,13 @@ class Streamer { * @param string $dir * @param string $internalDir */ - public function addDirRecoursive($dir, $internalDir='') { + public function addDirRecursive($dir, $internalDir='') { $dirname = basename($dir); $rootDir = $internalDir . $dirname; if (!empty($rootDir)) { $this->streamerInstance->addEmptyDir($rootDir); } - $internalDir.= $dirname .= '/'; + $internalDir .= $dirname . '/'; // prevent absolute dirs $internalDir = ltrim($internalDir, '/'); @@ -80,7 +76,7 @@ class Streamer { $this->addFileFromStream($fh, $internalDir . $filename, $filesize); fclose($fh); }elseif(\OC\Files\Filesystem::is_dir($file)) { - $this->addDirRecoursive($file, $internalDir); + $this->addDirRecursive($file, $internalDir); } } } |