Skip to content

Commit

Permalink
Merge pull request #564 from ONLYOFFICE/develop
Browse files Browse the repository at this point in the history
Release/7.2.1
  • Loading branch information
LinneyS authored Dec 2, 2021
2 parents 212be8a + 9c233f0 commit 1a51c8e
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 10 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
15 changes: 7 additions & 8 deletions appinfo/application.php
Original file line number Diff line number Diff line change
Expand Up @@ -210,14 +210,19 @@ public function register(IRegistrationContext $context): void {
$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) {
Expand All @@ -231,12 +236,6 @@ function (FileCreatedFromTemplateEvent $event) {
}
});
}

$previewManager = $container->query(IPreview::class);
$previewManager->registerProvider(Preview::getMimeTypeRegex(), function() use ($container) {
return $container->query(Preview::class);
});

});

$context->injectFn(function (IManager $notificationsManager) {
Expand Down
4 changes: 2 additions & 2 deletions appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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/>
Expand All @@ -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>
Expand Down
4 changes: 4 additions & 0 deletions lib/documentservice.php
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,10 @@ public function checkDocServiceUrl($urlGenerator, $crypt) {
}

$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]);
Expand Down

0 comments on commit 1a51c8e

Please sign in to comment.