aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Files/Cache
diff options
context:
space:
mode:
authorThomas Citharel <tcit@tcit.fr>2023-10-19 16:27:07 +0200
committerThomas Citharel <tcit@tcit.fr>2024-03-14 17:24:36 +0100
commitffeb797eccfc90e5cf53d5737d58bfb1346f8718 (patch)
tree45365f709a97182e4cdaebe9f530e23e4ff89cc4 /lib/private/Files/Cache
parentf316edb9ff448077fa8494dbbb2c6fdacd158bed (diff)
downloadnextcloud-server-ffeb797eccfc90e5cf53d5737d58bfb1346f8718.tar.gz
nextcloud-server-ffeb797eccfc90e5cf53d5737d58bfb1346f8718.zip
refactor(mimeloader): modernize MimeTypeLoader
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
Diffstat (limited to 'lib/private/Files/Cache')
-rw-r--r--lib/private/Files/Cache/SearchBuilder.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/private/Files/Cache/SearchBuilder.php b/lib/private/Files/Cache/SearchBuilder.php
index 9d306db7748..e8063b77aa5 100644
--- a/lib/private/Files/Cache/SearchBuilder.php
+++ b/lib/private/Files/Cache/SearchBuilder.php
@@ -228,18 +228,18 @@ class SearchBuilder {
if ($field === 'mimetype') {
$value = (string)$value;
if ($type === ISearchComparison::COMPARE_EQUAL) {
- $value = (int)$this->mimetypeLoader->getId($value);
+ $value = $this->mimetypeLoader->getId($value);
} elseif ($type === ISearchComparison::COMPARE_LIKE) {
// transform "mimetype='foo/%'" to "mimepart='foo'"
if (preg_match('|(.+)/%|', $value, $matches)) {
$field = 'mimepart';
- $value = (int)$this->mimetypeLoader->getId($matches[1]);
+ $value = $this->mimetypeLoader->getId($matches[1]);
$type = ISearchComparison::COMPARE_EQUAL;
} elseif (str_contains($value, '%')) {
throw new \InvalidArgumentException('Unsupported query value for mimetype: ' . $value . ', only values in the format "mime/type" or "mime/%" are supported');
} else {
$field = 'mimetype';
- $value = (int)$this->mimetypeLoader->getId($value);
+ $value = $this->mimetypeLoader->getId($value);
$type = ISearchComparison::COMPARE_EQUAL;
}
}