Skip to content
Snippets Groups Projects
Commit 392c6b68 authored by Jörn Friedrich Dreyer's avatar Jörn Friedrich Dreyer Committed by Victor Dubiniuk
Browse files

return fixed path, skip shared files outside of 'files'

parent 27511d91
No related branches found
No related tags found
No related merge requests found
......@@ -254,9 +254,12 @@ class Shared_Cache extends Cache {
$result = \OC_DB::executeAudited($sql, array_merge(array($pattern), $chunk));
while ($row = $result->fetchRow()) {
$row['mimetype'] = $this->getMimetype($row['mimetype']);
$row['mimepart'] = $this->getMimetype($row['mimepart']);
$files[] = $row;
if (substr($row['path'], 0, 6)==='files/') {
$row['path'] = substr($row['path'],6); // remove 'files/' from path as it's relative to '/Shared'
$row['mimetype'] = $this->getMimetype($row['mimetype']);
$row['mimepart'] = $this->getMimetype($row['mimepart']);
$files[] = $row;
} // else skip results out of the files folder
}
}
return $files;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment