return user specific paths from oc_filecache::getpath

This commit is contained in:
Robin Appelman 2012-04-16 10:06:52 +02:00
parent 1281809300
commit b61f6438ba
1 changed files with 6 additions and 1 deletions

View File

@ -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));
}
/**