summaryrefslogtreecommitdiffstats
path: root/lib/filestorage
diff options
context:
space:
mode:
Diffstat (limited to 'lib/filestorage')
-rw-r--r--lib/filestorage/common.php11
-rw-r--r--lib/filestorage/local.php4
2 files changed, 12 insertions, 3 deletions
diff --git a/lib/filestorage/common.php b/lib/filestorage/common.php
index 351714437c5..f24a5704913 100644
--- a/lib/filestorage/common.php
+++ b/lib/filestorage/common.php
@@ -260,7 +260,7 @@ abstract class OC_Filestorage_Common extends OC_Filestorage {
if($dh) {
while($item=readdir($dh)) {
if ($item == '.' || $item == '..') continue;
- if(strstr(strtolower($item),strtolower($query))!==false) {
+ if(strstr(strtolower($item), strtolower($query))!==false) {
$files[]=$dir.'/'.$item;
}
if($this->is_dir($dir.'/'.$item)) {
@@ -279,4 +279,13 @@ abstract class OC_Filestorage_Common extends OC_Filestorage {
public function hasUpdated($path,$time) {
return $this->filemtime($path)>$time;
}
+
+ /**
+ * get the owner of a path
+ * @param $path The path to get the owner
+ * @return string uid or false
+ */
+ public function getOwner($path) {
+ return OC_User::getUser();
+ }
}
diff --git a/lib/filestorage/local.php b/lib/filestorage/local.php
index 80aa548047c..731ac4a3c72 100644
--- a/lib/filestorage/local.php
+++ b/lib/filestorage/local.php
@@ -103,7 +103,7 @@ class OC_Filestorage_Local extends OC_Filestorage_Common{
if(!$this->file_exists($path2)) {
$this->mkdir($path2);
}
- $source=substr($path1,strrpos($path1,'/')+1);
+ $source=substr($path1, strrpos($path1,'/')+1);
$path2.=$source;
}
return copy($this->datadir.$path1,$this->datadir.$path2);
@@ -178,7 +178,7 @@ class OC_Filestorage_Local extends OC_Filestorage_Common{
$files=array();
foreach (scandir($this->datadir.$dir) as $item) {
if ($item == '.' || $item == '..') continue;
- if(strstr(strtolower($item),strtolower($query))!==false) {
+ if(strstr(strtolower($item), strtolower($query))!==false) {
$files[]=$dir.'/'.$item;
}
if(is_dir($this->datadir.$dir.'/'.$item)) {