Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ONLYOFFICE/onlyoffice-nextcloud.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Linnik <sergey.linnik@onlyoffice.com>2020-09-01 17:43:32 +0300
committerSergey Linnik <sergey.linnik@onlyoffice.com>2020-09-04 11:11:17 +0300
commitdcb8716aba9bf5d59132aa5960c51dfe77c51f87 (patch)
tree75b087e4b8deb1f061aa1913a1782e36915f6045 /appinfo/application.php
parent9c48433d2e46d1f55f4f788817aa03a01ff005bd (diff)
register template type (1b89448d3f9bed8b01ac20615b756e069cbb3e02)
Diffstat (limited to 'appinfo/application.php')
-rw-r--r--appinfo/application.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/appinfo/application.php b/appinfo/application.php
index fc21a5e..3cd25c4 100644
--- a/appinfo/application.php
+++ b/appinfo/application.php
@@ -22,6 +22,7 @@ namespace OCA\Onlyoffice\AppInfo;
use OCP\AppFramework\App;
use OCP\AppFramework\Http\ContentSecurityPolicy;
use OCP\DirectEditing\RegisterDirectEditorEvent;
+use OCP\Files\IMimeTypeDetector;
use OCP\Util;
use OCA\Viewer\Event\LoadViewer;
@@ -116,6 +117,14 @@ class Application extends App {
$container = $this->getContainer();
+ //todo: remove in v20
+ $detector = $container->query(IMimeTypeDetector::class);
+ $detector->getAllMappings();
+ $detector->registerType("ott","application/vnd.oasis.opendocument.text-template");
+ $detector->registerType("ots", "application/vnd.oasis.opendocument.spreadsheet-template");
+ $detector->registerType("otp", "application/vnd.oasis.opendocument.presentation-template");
+
+
$container->registerService("L10N", function ($c) {
return $c->query("ServerContainer")->getL10N($c->query("AppName"));
});