Fix order of parameter and escaping

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2017-05-12 09:33:51 +02:00
parent c85a770ecf
commit 2e3fe61f99
No known key found for this signature in database
GPG Key ID: E166FD8976B3BAC8
1 changed files with 2 additions and 2 deletions

View File

@ -166,12 +166,12 @@ class Loader implements IMimeTypeLoader {
->where($update->expr()->neq(
'mimetype', $update->createNamedParameter($mimetypeId)
))
->andwhere($update->expr()->neq(
->andWhere($update->expr()->neq(
'mimetype', $update->createNamedParameter($isFolderId)
))
->andWhere($update->expr()->like(
$update->createFunction('LOWER(' . $update->getColumnName('name') . ')'),
'%' . $this->dbConnection->escapeLikeParameter($update->createNamedParameter('.' . $ext))
$update->createNamedParameter('%' . $this->dbConnection->escapeLikeParameter('.' . $ext))
));
return $update->execute();
}