"application/json": "text/code",
"application/msaccess": "file",
"application/msexcel": "x-office/spreadsheet",
+ "application/msonenote": "x-office/document",
"application/mspowerpoint": "x-office/presentation",
"application/msword": "x-office/document",
"application/octet-stream": "file",
"application/postscript": "image",
"application/rss+xml": "application/xml",
"application/vnd.android.package-archive": "package/x-generic",
+ "application/vnd.lotus-wordpro": "x-office/document",
"application/vnd.ms-excel": "x-office/spreadsheet",
"application/vnd.ms-excel.addin.macroEnabled.12": "x-office/spreadsheet",
"application/vnd.ms-excel.sheet.binary.macroEnabled.12": "x-office/spreadsheet",
"application/vnd.openxmlformats-officedocument.spreadsheetml.template": "x-office/spreadsheet",
"application/vnd.openxmlformats-officedocument.wordprocessingml.document": "x-office/document",
"application/vnd.openxmlformats-officedocument.wordprocessingml.template": "x-office/document",
+ "application/vnd.visio": "x-office/document",
+ "application/vnd.wordperfect": "x-office/document",
"application/x-7z-compressed": "package/x-generic",
"application/x-cbr": "text",
"application/x-compressed": "package/x-generic",
self::updateMimetypes($updatedMimetypes);
}
+ private function introduceRichDocumentsMimeTypes() {
+ $updatedMimetypes = array(
+ 'lwp' => 'application/vnd.lotus-wordpro',
+ 'one' => 'application/msonenote',
+ 'vsd' => 'application/vnd.visio',
+ 'wpd' => 'application/vnd.wordperfect',
+ );
+
+ self::updateMimetypes($updatedMimetypes);
+ }
+
/**
* Fix mime types
*/
$this->emit('\OC\Repair', 'info', array('Fixed rtf mime type'));
}
}
+
+ if (version_compare($ocVersionFromBeforeUpdate, '9.0.0.10', '<')) {
+ if ($this->introduceRichDocumentsMimeTypes()) {
+ $this->emit('\OC\Repair', 'info', array('Fixed richdocuments additional office mime types'));
+ }
+ }
}
}
"application/json": "text/code",
"application/msaccess": "file",
"application/msexcel": "x-office/spreadsheet",
+ "application/msonenote": "x-office/document",
"application/mspowerpoint": "x-office/presentation",
"application/msword": "x-office/document",
"application/octet-stream": "file",
"application/postscript": "image",
"application/rss+xml": "application/xml",
"application/vnd.android.package-archive": "package/x-generic",
+ "application/vnd.lotus-wordpro": "x-office/document",
"application/vnd.ms-excel": "x-office/spreadsheet",
"application/vnd.ms-excel.addin.macroEnabled.12": "x-office/spreadsheet",
"application/vnd.ms-excel.sheet.binary.macroEnabled.12": "x-office/spreadsheet",
"application/vnd.openxmlformats-officedocument.spreadsheetml.template": "x-office/spreadsheet",
"application/vnd.openxmlformats-officedocument.wordprocessingml.document": "x-office/document",
"application/vnd.openxmlformats-officedocument.wordprocessingml.template": "x-office/document",
+ "application/vnd.visio": "x-office/document",
+ "application/vnd.wordperfect": "x-office/document",
"application/x-7z-compressed": "package/x-generic",
"application/x-cbr": "text",
"application/x-compressed": "package/x-generic",
"key": ["application/x-iwork-keynote-sffkey"],
"keynote": ["application/x-iwork-keynote-sffkey"],
"kra": ["application/x-krita"],
+ "lwp": ["application/vnd.lotus-wordpro"],
"m2t": ["video/mp2t"],
"m4v": ["video/mp4"],
"markdown": ["text/markdown"],
"oga": ["audio/ogg"],
"ogg": ["audio/ogg"],
"ogv": ["video/ogg"],
+ "one": ["application/msonenote"],
"opus": ["audio/ogg"],
"orf": ["image/x-dcraw"],
"otf": ["application/font-sfnt"],
"vcard": ["text/vcard"],
"vcf": ["text/vcard"],
"vob": ["video/dvd"],
+ "vsd": ["application/vnd.visio"],
"wav": ["audio/wav"],
"webm": ["video/webm"],
"woff": ["application/font-woff"],
+ "wpd": ["application/vnd.wordperfect"],
"wmv": ["video/x-ms-wmv"],
"xcf": ["application/x-gimp"],
"xla": ["application/vnd.ms-excel"],
$this->renameMimeTypes($currentMimeTypes, $fixedMimeTypes);
}
+ /**
+ * Test renaming the richdocuments additional office mime types
+ */
+ public function testRenameRichDocumentsMimeTypes() {
+ $currentMimeTypes = [
+ ['test.lwp', 'application/octet-stream'],
+ ['test.one', 'application/octet-stream'],
+ ['test.vsd', 'application/octet-stream'],
+ ['test.wpd', 'application/octet-stream'],
+ ];
+
+ $fixedMimeTypes = [
+ ['test.lwp', 'application/vnd.lotus-wordpro'],
+ ['test.one', 'application/msonenote'],
+ ['test.vsd', 'application/vnd.visio'],
+ ['test.wpd', 'application/vnd.wordperfect'],
+ ];
+
+ $this->renameMimeTypes($currentMimeTypes, $fixedMimeTypes);
+ }
+
/**
* Test renaming and splitting old office mime types when
* new ones already exist
['test.hpp', 'text/x-h'],
['test.rss', 'application/rss+xml'],
['test.rtf', 'text/rtf'],
+ ['test.lwp', 'application/vnd.lotus-wordpro'],
+ ['test.one', 'application/msonenote'],
+ ['test.vsd', 'application/vnd.visio'],
+ ['test.wpd', 'application/vnd.wordperfect'],
];
$fixedMimeTypes = [
['test.hpp', 'text/x-h'],
['test.rss', 'application/rss+xml'],
['test.rtf', 'text/rtf'],
+ ['test.lwp', 'application/vnd.lotus-wordpro'],
+ ['test.one', 'application/msonenote'],
+ ['test.vsd', 'application/vnd.visio'],
+ ['test.wpd', 'application/vnd.wordperfect'],
];
$this->renameMimeTypes($currentMimeTypes, $fixedMimeTypes);
// We only can count up. The 4. digit is only for the internal patchlevel to trigger DB upgrades
// between betas, final and RCs. This is _not_ the public version number. Reset minor/patchlevel
// when updating major/minor version number.
-$OC_Version = array(9, 0, 0, 9);
+$OC_Version = array(9, 0, 0, 10);
// The human readable string
$OC_VersionString = '9.0 pre alpha';