|
|
|
@ -975,7 +975,7 @@ class View { |
|
|
|
|
/** |
|
|
|
|
* search for files by mimetype |
|
|
|
|
* |
|
|
|
|
* @param string $query |
|
|
|
|
* @param string $mimetype |
|
|
|
|
* @return array |
|
|
|
|
*/ |
|
|
|
|
public function searchByMime($mimetype) { |
|
|
|
@ -998,7 +998,7 @@ class View { |
|
|
|
|
|
|
|
|
|
$results = $cache->$method($query); |
|
|
|
|
foreach ($results as $result) { |
|
|
|
|
if (substr($mountPoint . $result['path'], 0, $rootLength) === $this->fakeRoot) { |
|
|
|
|
if (substr($mountPoint . $result['path'], 0, $rootLength + 1) === $this->fakeRoot . '/') { |
|
|
|
|
$result['path'] = substr($mountPoint . $result['path'], $rootLength); |
|
|
|
|
$files[] = $result; |
|
|
|
|
} |
|
|
|
@ -1012,6 +1012,7 @@ class View { |
|
|
|
|
|
|
|
|
|
$relativeMountPoint = substr($mountPoint, $rootLength); |
|
|
|
|
$results = $cache->$method($query); |
|
|
|
|
if ($results) { |
|
|
|
|
foreach ($results as $result) { |
|
|
|
|
$result['path'] = $relativeMountPoint . $result['path']; |
|
|
|
|
$files[] = $result; |
|
|
|
@ -1019,6 +1020,7 @@ class View { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return $files; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|