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>2021-12-02 12:44:41 +0300
committerGitHub <noreply@github.com>2021-12-02 12:44:41 +0300
commit1a51c8e8a7323341d6fdd7b9b9901e95a2d57da9 (patch)
treeedf9bd7dd97fdc66eb10fa44f4a03515fd3e641d
parent212be8a29299f7ed87a320fb5517874220e2de4d (diff)
parent9c233f024ec921a20e50b2d13f271e8553b018af (diff)
Merge pull request #564 from ONLYOFFICE/developv7.2.1
Release/7.2.1
-rw-r--r--CHANGELOG.md8
-rw-r--r--appinfo/application.php15
-rw-r--r--appinfo/info.xml4
-rw-r--r--lib/documentservice.php4
4 files changed, 21 insertions, 10 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d41022e..ea13757 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,13 @@
# Change Log
+## 7.2.1
+## Added
+- check document server version
+
+## Changed
+- fix preview generation
+- compatible with Nextcloud 23
+
## 7.2.0
## Added
- set favicon on editor page
diff --git a/appinfo/application.php b/appinfo/application.php
index f96eee5..5df277a 100644
--- a/appinfo/application.php
+++ b/appinfo/application.php
@@ -210,14 +210,19 @@ class Application extends App implements IBootstrap {
$context->registerTemplateProvider(TemplateProvider::class);
}
+ $container = $this->getContainer();
+
+ $previewManager = $container->query(IPreview::class);
+ $previewManager->registerProvider(Preview::getMimeTypeRegex(), function() use ($container) {
+ return $container->query(Preview::class);
+ });
+
}
public function boot(IBootContext $context): void {
$context->injectFn(function (SymfonyAdapter $eventDispatcher) {
- $container = $this->getContainer();
-
if (class_exists("OCP\Files\Template\FileCreatedFromTemplateEvent")) {
$eventDispatcher->addListener(FileCreatedFromTemplateEvent::class,
function (FileCreatedFromTemplateEvent $event) {
@@ -231,12 +236,6 @@ class Application extends App implements IBootstrap {
}
});
}
-
- $previewManager = $container->query(IPreview::class);
- $previewManager->registerProvider(Preview::getMimeTypeRegex(), function() use ($container) {
- return $container->query(Preview::class);
- });
-
});
$context->injectFn(function (IManager $notificationsManager) {
diff --git a/appinfo/info.xml b/appinfo/info.xml
index 16592ff..fbbda0d 100644
--- a/appinfo/info.xml
+++ b/appinfo/info.xml
@@ -6,7 +6,7 @@
<description>ONLYOFFICE connector allows you to view, edit and collaborate on text documents, spreadsheets and presentations within Nextcloud using ONLYOFFICE Docs. This will create a new Edit in ONLYOFFICE action within the document library for Office documents. This allows multiple users to co-author documents in real time from the familiar web interface and save the changes back to your file storage.</description>
<licence>apache</licence>
<author mail="dev@onlyoffice.com" homepage="https://www.onlyoffice.com/">Ascensio System SIA</author>
- <version>7.2.0</version>
+ <version>7.2.1</version>
<namespace>Onlyoffice</namespace>
<types>
<prevent_group_restriction/>
@@ -29,7 +29,7 @@
<screenshot>https://raw.githubusercontent.com/ONLYOFFICE/onlyoffice-nextcloud/master/screenshots/new.png</screenshot>
<screenshot>https://raw.githubusercontent.com/ONLYOFFICE/onlyoffice-nextcloud/master/screenshots/open.png</screenshot>
<dependencies>
- <nextcloud min-version="20" max-version="22"/>
+ <nextcloud min-version="20" max-version="23"/>
</dependencies>
<settings>
<admin>OCA\Onlyoffice\AdminSettings</admin>
diff --git a/lib/documentservice.php b/lib/documentservice.php
index 5069506..c37522f 100644
--- a/lib/documentservice.php
+++ b/lib/documentservice.php
@@ -414,6 +414,10 @@ class DocumentService {
}
$version = $commandResponse->version;
+ $versionF = floatval($version);
+ if ($versionF > 0.0 && $versionF <= 6.0) {
+ throw new \Exception($this->trans->t("Not supported version"));
+ }
} catch (\Exception $e) {
$logger->logException($e, ["message" => "CommandRequest on check error", "app" => self::$appName]);