Merge pull request #14947 from oparoz/repairmimetypes-sql

Make repairmimetypes compatible with case sensitive SQL backends
This commit is contained in:
Morris Jobke 2015-03-19 17:22:25 +01:00
commit 2a8c3798a8
2 changed files with 6 additions and 2 deletions

View File

@ -66,7 +66,7 @@ class RepairMimeTypes extends BasicEmitter implements \OC\RepairStep {
SELECT `id`
FROM `*PREFIX*mimetypes`
WHERE `mimetype` = ?
) WHERE `name` LIKE ?
) WHERE `name` ILIKE ?
');
}

View File

@ -192,7 +192,7 @@ class TestRepairMimeTypes extends \Test\TestCase {
}
/**
* Test renaming the postscript mime types
* Test renaming the Raw mime types
*/
public function testRenameRawMimeType() {
$this->addEntries(
@ -214,6 +214,7 @@ class TestRepairMimeTypes extends \Test\TestCase {
array('test.srf', 'application/octet-stream'),
array('test.sr2', 'application/octet-stream'),
array('test.xrf', 'application/octet-stream'),
array('CapitalExtension.DNG', 'application/octet-stream'),
)
);
@ -242,6 +243,7 @@ class TestRepairMimeTypes extends \Test\TestCase {
array('test.srf', 'image/x-dcraw'),
array('test.sr2', 'image/x-dcraw'),
array('test.xrf', 'image/x-dcraw'),
array('CapitalExtension.DNG', 'image/x-dcraw'),
)
);
}
@ -373,6 +375,7 @@ class TestRepairMimeTypes extends \Test\TestCase {
array('test.srf', 'image/x-dcraw'),
array('test.sr2', 'image/x-dcraw'),
array('test.xrf', 'image/x-dcraw'),
array('test.DNG', 'image/x-dcraw'),
)
);
@ -413,6 +416,7 @@ class TestRepairMimeTypes extends \Test\TestCase {
array('test.srf', 'image/x-dcraw'),
array('test.sr2', 'image/x-dcraw'),
array('test.xrf', 'image/x-dcraw'),
array('test.DNG', 'image/x-dcraw'),
)
);
}