Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add mimetype for ReStructuredText #41684

Merged
merged 1 commit into from
Mar 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion core/js/mimetypelist.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ OC.MimeTypeList={
"application/font-sfnt": "font",
"application/font-woff": "font",
"application/gpx+xml": "location",
"application/gzip": "package/x-generic",
skjnldsv marked this conversation as resolved.
Show resolved Hide resolved
"application/illustrator": "image",
"application/javascript": "text/code",
"application/json": "text/code",
Expand Down Expand Up @@ -80,7 +81,7 @@ OC.MimeTypeList={
"application/x-fictionbook+xml": "text",
"application/x-font": "font",
"application/x-gimp": "image",
"application/x-gzip": "package/x-generic",
"application/x-gzip": "application/gzip",
"application/x-iwork-keynote-sffkey": "x-office/presentation",
"application/x-iwork-numbers-sffnumbers": "x-office/spreadsheet",
"application/x-iwork-pages-sffpages": "x-office/document",
Expand All @@ -105,6 +106,7 @@ OC.MimeTypeList={
"text/x-java-source": "text/code",
"text/x-ldif": "text/code",
"text/x-python": "text/code",
"text/x-rst": "text",
"text/x-shellscript": "text/code",
"web": "text/code",
"application/internet-shortcut": "link",
Expand Down
12 changes: 12 additions & 0 deletions lib/private/Repair/RepairMimeTypes.php
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,14 @@ private function introduceAacAudioType() {
return $this->updateMimetypes($updatedMimetypes);
}

private function introduceReStructuredTextFormatType() {
$updatedMimetypes = [
'rst' => 'text/x-rst',
];

return $this->updateMimetypes($updatedMimetypes);
}

/**
* Fix mime types
*/
Expand Down Expand Up @@ -322,5 +330,9 @@ public function run(IOutput $out) {
if (version_compare($ocVersionFromBeforeUpdate, '29.0.0.6', '<') && $this->introduceAacAudioType()) {
$out->info('Fixed aac mime type');
}

if (version_compare($ocVersionFromBeforeUpdate, '29.0.0.10', '<') && $this->introduceReStructuredTextFormatType()) {
$out->info('Fixed ReStructured Text mime type');
}
}
}
1 change: 1 addition & 0 deletions resources/config/mimetypealiases.dist.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@
"text/x-java-source": "text/code",
"text/x-ldif": "text/code",
"text/x-python": "text/code",
"text/x-rst": "text",
"text/x-shellscript": "text/code",
"web": "text/code",
"application/internet-shortcut": "link",
Expand Down
1 change: 1 addition & 0 deletions resources/config/mimetypemapping.dist.json
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@
"rar": ["application/x-rar-compressed"],
"reveal": ["text/reveal"],
"rss": ["application/rss+xml"],
"rst": ["text/x-rst"],
"rtf": ["text/rtf"],
"rw2": ["image/x-dcraw"],
"schema": ["text/plain"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ OC.MimeTypeList={
"text/x-java-source": "text/code",
"text/x-ldif": "text/code",
"text/x-python": "text/code",
"text/x-rst": "text",
"text/x-shellscript": "text/code",
"web": "text/code",
"application/internet-shortcut": "link",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"hashes": {
"core\/js\/mimetypelist.js": "e9e515c5eeb08b02971e5943640bef89b6d1c2d746d5883bf974c6ac753f810685c7a20bf0ed4d32d8c046cd2cef6c045682c7d89c6a3b7b6c33122f5fd2088f"
"core\/js\/mimetypelist.js": "c5cc5239ea67d5f09ef49b72929205be7684c7fc7c829637cb57963bfa5a3e9ec96aec97f2935cbe7c14e96c3294f3caa25829277e691e6b494dff4be50bdb21"
},
"signature": "iKEOaoY+lowIZrDjozpCqDFtag8qtANZ4AqnwZG1HrzuP3Yv7uaCUZbpsyr4FklKyyZFbh4w5K3x5bacKq\/h7tFVu5A56sunSZIMDjO\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zrM0\r\ni8nfCFwTxWRxp3H9KoECzO\/zS5R5KIS7s3\/wq\/w9T2Ie4rcecgXwDizwnn0C\/aKc\r\nbDIjujpL1s9HO05pcD\/V3wKcPZ1izymBkmMyIbL52iRVN5FTVHeZdXPpFuq+CTQJ\r\nQ238lC+A\/KOVAgMBAAEwDQYJKoZIhvcNAQEFBQADggIBAGoKTnh8RfJV4sQItVC2\r\nAvfJagkrIqZ3iiQTUBQGTKBsTnAqE1H7QgUSV9vSd+8rgvHkyZsRjmtyR1e3A6Ji\r\noNCXUbExC\/0iCPUqdHZIVb+Lc\/vWuv4ByFMybGPydgtLoEUX2ZrKFWmcgZFDUSRd\r\n9Uj26vtUhCC4bU4jgu6hIrR9IuxOBLQUxGTRZyAcXvj7obqRAEZwFAKQgFpfpqTb\r\nH+kjcbZSaAlLVSF7vBc1syyI8RGYbqpwvtREqJtl5IEIwe6huEqJ3zPnlP2th\/55\r\ncf3Fovj6JJgbb9XFxrdnsOsDOu\/tpnaRWlvv5ib4+SzG5wWFT5UUEo4Wg2STQiiX\r\nuVSRQxK1LE1yg84bs3NZk9FSQh4B8vZVuRr5FaJsZZkwlFlhRO\/\/+TJtXRbyNgsf\r\noMRZGi8DLGU2SGEAHcRH\/QZHq\/XDUWVzdxrSBYcy7GSpT7UDVzGv1rEJUrn5veP1\r\n0KmauAqtiIaYRm4f6YBsn0INcZxzIPZ0p8qFtVZBPeHhvQtvOt0iXI\/XUxEWOa2F\r\nK2EqhErgMK\/N07U1JJJay5tYZRtvkGq46oP\/5kQG8hYST0MDK6VihJoPpvCmAm4E\r\npEYKQ96x6A4EH9Y9mZlYozH\/eqmxPbTK8n89\/p7Ydun4rI+B2iiLnY8REWWy6+UQ\r\nV204fGUkJqW5CrKy3P3XvY9X\r\n-----END CERTIFICATE-----"
}
2 changes: 1 addition & 1 deletion version.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
// between betas, final and RCs. This is _not_ the public version number. Reset minor/patch level
// when updating major/minor version number.

$OC_Version = [29, 0, 0, 9];
$OC_Version = [29, 0, 0, 10];

// The human-readable string
$OC_VersionString = '29.0.0 beta 3';
Expand Down
Loading