Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: kesselb <mail@danielkesselberg.de>
  • Loading branch information
icewind1991 and kesselb authored Mar 16, 2021
1 parent 1619f43 commit fbddde2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/private/Files/Cache/Wrapper/CacheJail.php
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ public function search($pattern) {
->whereStorageId()
->andWhere($query->expr()->orX(
$query->expr()->like('path', $query->createNamedParameter($this->getGetUnjailedRoot() . '/%')),
$query->expr()->eq('path_hash', $query->createNamedParameter(md5($this->getGetUnjailedRoot()))),
$query->expr()->eq('path_hash', $query->createNamedParameter(md5($this->getGetUnjailedRoot())))
))
->andWhere($query->expr()->iLike('name', $query->createNamedParameter($pattern)));

Expand Down Expand Up @@ -284,7 +284,7 @@ public function searchByMime($mimetype) {
->whereStorageId()
->andWhere($query->expr()->orX(
$query->expr()->like('path', $query->createNamedParameter($this->getGetUnjailedRoot() . '/%')),
$query->expr()->eq('path_hash', $query->createNamedParameter(md5($this->getGetUnjailedRoot()))),
$query->expr()->eq('path_hash', $query->createNamedParameter(md5($this->getGetUnjailedRoot())))
));

if (strpos($mimetype, '/')) {
Expand Down

0 comments on commit fbddde2

Please sign in to comment.