aboutsummaryrefslogtreecommitdiffstats
path: root/lib/filestorage
diff options
context:
space:
mode:
authorMichael Gapczynski <mtgap@owncloud.com>2012-07-25 17:08:18 -0400
committerMichael Gapczynski <mtgap@owncloud.com>2012-07-25 17:08:18 -0400
commit30b58f56771aa54304069d40a62070c06f5308fc (patch)
treee0bb2bba21c561f96d27bb9cfc09d714aa21d332 /lib/filestorage
parent4d17ed2f71c8cbb0d34c039aa7953b2427ce5c78 (diff)
parentf25ccaff59c135d7f1f22196bf266916ef131b35 (diff)
downloadnextcloud-server-30b58f56771aa54304069d40a62070c06f5308fc.tar.gz
nextcloud-server-30b58f56771aa54304069d40a62070c06f5308fc.zip
Merge branch 'master' into share_api
Conflicts: apps/calendar/js/loader.js apps/contacts/index.php apps/contacts/js/loader.js apps/files/js/files.js apps/files_sharing/sharedstorage.php lib/filesystemview.php
Diffstat (limited to 'lib/filestorage')
-rw-r--r--lib/filestorage/common.php4
-rw-r--r--lib/filestorage/local.php14
2 files changed, 4 insertions, 14 deletions
diff --git a/lib/filestorage/common.php b/lib/filestorage/common.php
index 633c2fdfc76..00c76796c57 100644
--- a/lib/filestorage/common.php
+++ b/lib/filestorage/common.php
@@ -204,7 +204,7 @@ abstract class OC_Filestorage_Common extends OC_Filestorage {
unlink($tmpFile);
return $mime;
}
- public function hash($type,$path,$raw){
+ public function hash($type,$path,$raw = false){
$tmpFile=$this->getLocalFile();
$hash=hash($type,$tmpFile,$raw);
unlink($tmpFile);
@@ -229,7 +229,7 @@ abstract class OC_Filestorage_Common extends OC_Filestorage {
}
$tmpFile=OC_Helper::tmpFile($extension);
$target=fopen($tmpFile,'w');
- $count=OC_Helper::streamCopy($source,$target);
+ OC_Helper::streamCopy($source,$target);
return $tmpFile;
}
// abstract public function touch($path, $mtime=null);
diff --git a/lib/filestorage/local.php b/lib/filestorage/local.php
index 658e14eaf9d..6be04db96ae 100644
--- a/lib/filestorage/local.php
+++ b/lib/filestorage/local.php
@@ -4,7 +4,6 @@
*/
class OC_Filestorage_Local extends OC_Filestorage_Common{
protected $datadir;
- private static $mimetypes=null;
public function __construct($arguments){
$this->datadir=$arguments['datadir'];
if(substr($this->datadir,-1)!=='/'){
@@ -41,7 +40,7 @@ class OC_Filestorage_Local extends OC_Filestorage_Common{
}
public function filesize($path){
if($this->is_dir($path)){
- return $this->getFolderSize($path);
+ return 0;
}else{
return filesize($this->datadir.$path);
}
@@ -157,7 +156,7 @@ class OC_Filestorage_Local extends OC_Filestorage_Common{
return $return;
}
- public function hash($type,$path,$raw){
+ public function hash($path,$type,$raw=false){
return hash_file($type,$this->datadir.$path,$raw);
}
@@ -187,15 +186,6 @@ class OC_Filestorage_Local extends OC_Filestorage_Common{
}
/**
- * @brief get the size of folder and it's content
- * @param string $path file path
- * @return int size of folder and it's content
- */
- public function getFolderSize($path){
- return 0;//depricated, use OC_FileCach instead
- }
-
- /**
* check if a file or folder has been updated since $time
* @param int $time
* @return bool