Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
return fixed path, skip shared files outside of 'files'
  • Loading branch information
butonic authored and VicDeo committed Sep 19, 2013
commit 392c6b6832edfc37a2956ef3a77fab6020a7a746
9 changes: 6 additions & 3 deletions apps/files_sharing/lib/cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -254,9 +254,12 @@ public function search($pattern) {
$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;
Expand Down