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 65efb388e6
commit fd75c08238
No known key found for this signature in database
GPG key ID: E166FD8976B3BAC8

View file

@ -165,12 +165,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();
}