diff options
author | Robin Appelman <icewind@owncloud.com> | 2012-04-16 10:06:52 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2012-04-16 10:06:52 +0200 |
commit | b61f6438ba7aeabe17b26123cdeb34e011ce0080 (patch) | |
tree | 2456b083642a0f5d615c7d9368d9af2dba829158 /lib | |
parent | 12818093007d5bdce5519b5015e2a0748c98e24d (diff) | |
download | nextcloud-server-b61f6438ba7aeabe17b26123cdeb34e011ce0080.tar.gz nextcloud-server-b61f6438ba7aeabe17b26123cdeb34e011ce0080.zip |
return user specific paths from oc_filecache::getpath
Diffstat (limited to 'lib')
-rw-r--r-- | lib/filecache.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/filecache.php b/lib/filecache.php index e62fb2189f4..19286ff746b 100644 --- a/lib/filecache.php +++ b/lib/filecache.php @@ -335,7 +335,12 @@ class OC_FileCache{ $query=OC_DB::prepare('SELECT path FROM *PREFIX*fscache WHERE id=? AND user=?'); $result=$query->execute(array($id,$user)); $row=$result->fetchRow(); - return $row['path']; + $path=$row['path']; + $root='/'.$user.'/files'; + if(substr($path,0,strlen($root))!=$root){ + return false; + } + return substr($path,strlen($root)); } /** |