Skip to content

Commit

Permalink
Merge pull request #71 from ONLYOFFICE/develop
Browse files Browse the repository at this point in the history
Release/2.1.6
  • Loading branch information
LinneyS authored Mar 27, 2019
2 parents a72c491 + b3ccf1a commit bf1eab4
Show file tree
Hide file tree
Showing 46 changed files with 439 additions and 250 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Change Log

## 2.1.6
## Added
- file creation in public folder
- file convertion in public folder
- Bulgarian translation
- file templates in Dutch

## Changed
- fix editor size on mobile
- fix php warning

## 2.1.2
## Added
- restricting access for groups
Expand Down
19 changes: 11 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ This allows multiple users to collaborate in real time and to save back those ch
You can also use our **[Docker installation](https://github.com/ONLYOFFICE/docker-onlyoffice-nextcloud)** to get installed and configured Document Server and Nextcloud installation with a couple of commands.



## Installing ONLYOFFICE Document Server

You will need an instance of ONLYOFFICE Document Server that is resolvable and connectable both from Nextcloud and any end clients (version 4.2.7 and later are supported for use with the app).
Expand All @@ -25,7 +24,6 @@ Or you can use Document Server behind a proxy, please refer to [this article](ht
The easiest way to start an instance of ONLYOFFICE Document Server is to use [Docker](https://github.com/ONLYOFFICE/Docker-DocumentServer).



## Installing Nextcloud ONLYOFFICE integration app

The Nextcloud administrator can install the integration app from the in-built application market.
Expand All @@ -35,7 +33,7 @@ After that find **ONLYOFFICE** in the list of available applications and install
If the server with the Nextcloud installed does not have an Internet access, or if you need it for some other reason, the administrator can install the application manually.
To start using ONLYOFFICE Document Server with Nextcloud, the following steps must be performed:

1. Go to the Nextcloud server _apps/_ directory (or some other directory [used](https://docs.nextcloud.com/server/13/admin_manual/installation/apps_management_installation.html#using-custom-app-directories)):
1. Go to the Nextcloud server _apps/_ directory (or some other directory [used](https://docs.nextcloud.com/server/latest/admin_manual/apps_management.html#using-custom-app-directories)):
```
cd apps/
```
Expand All @@ -60,7 +58,6 @@ There are several ways to do that:
3. In Nextcloud open the `~/index.php/settings/apps?category=disabled` page with _Not enabled_ apps by administrator and click _Enable_ for the **ONLYOFFICE** application.



## Configuring Nextcloud ONLYOFFICE integration app

In Nextcloud open the `~/index.php/settings/admin/onlyoffice` page with administrative settings for **ONLYOFFICE** section.
Expand Down Expand Up @@ -88,7 +85,6 @@ The **Open in ONLYOFFICE** action will be added to the file context menu.
You can specify this action as default and it will be used when the file name is clicked for the selected file types.



## How it works

The ONLYOFFICE integration follows the API documented here https://api.onlyoffice.com/editors/basic:
Expand Down Expand Up @@ -122,12 +118,11 @@ This method adds the copy of the file from the assets folder to the folder the u

* When all users and client browsers are done with editing, they close the editing window.

* After [10 seconds](https://api.onlyoffice.com/editors/save#savedelay) of inactivity, ONLYOFFICE Document Server sends a POST to the _callback_ URL letting Nextcloud know that the clients have finished editing the document and closed it.
* After [10 seconds](https://api.onlyoffice.com/editors/save#savedelay) of inactivity, ONLYOFFICE Document Server sends a POST to the _callback_ URL letting Nextcloud know that the clients have finished editing the document and closed it.

* Nextcloud downloads the new version of the document, replacing the old one.



## Known issues

* If the document is shared using the **Federated Cloud Sharing** app, the co-editing among the servers will not be avaialble.
Expand All @@ -142,4 +137,12 @@ When the _Log-in credentials, save in session_ authentication type is used, the
But if the encryption with the _per-user encryption keys_ (used by default in Nextcloud **Default encryption module** app) is enabled, ONLYOFFICE Document Server cannot open the encrypted files for editing and save them after the editing.
The ONLYOFFICE section of the administrative settings page will display a notification about it.
However if you set the encryption with the _master key_, ONLYOFFICE application will work as intended.
The instruction on enabling _master key_ based encryption is available in the official documentation on [Nextcloud](https://docs.nextcloud.com/server/13/admin_manual/configuration_files/encryption_configuration.html#occ-encryption-commands) websites.
The instruction on enabling _master key_ based encryption is available in the official documentation on [Nextcloud](https://docs.nextcloud.com/server/latest/admin_manual/configuration_files/encryption_configuration.html#occ-encryption-commands) websites.

* If you are using a self-signed certificate for your **Document Server**, Nextcloud will not validate such a certificate and will not allow connection to/from **Document Server**. This issue can be solved the following way: locate the Nextcloud config file (_/nextcloud/config/config.php_) and open it. Insert the following section to it:
```
'onlyoffice' => array (
'verify_peer_off' => true
)
```
This will disable the certificate verification and allow Nextcloud to establish connection with **Document Server**, but you must remember that this is a temporary insecure solution and we strongly recommend that you replace the certificate with the one issued by some CA. Once you do that, do not forget to remove the above section from Nextcloud config file.
2 changes: 1 addition & 1 deletion appinfo/app.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
*
* (c) Copyright Ascensio System Limited 2010-2018
* (c) Copyright Ascensio System SIA 2019
*
* This program is a free software product.
* You can redistribute it and/or modify it under the terms of the GNU Affero General Public License
Expand Down
2 changes: 1 addition & 1 deletion appinfo/application.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
*
* (c) Copyright Ascensio System Limited 2010-2018
* (c) Copyright Ascensio System SIA 2019
*
* This program is a free software product.
* You can redistribute it and/or modify it under the terms of the GNU Affero General Public License
Expand Down
5 changes: 2 additions & 3 deletions appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<description>ONLYOFFICE connector enables you to edit Office documents within ONLYOFFICE from the familiar web interface. This will create a new Open in ONLYOFFICE action within the document library for Office documents. This allows multiple users to collaborate in real time and to save back those changes to your file storage.</description>
<licence>agpl</licence>
<author mail="[email protected]" homepage="https://www.onlyoffice.com/">Ascensio System SIA</author>
<version>2.1.2</version>
<version>2.1.6</version>
<namespace>Onlyoffice</namespace>
<types>
<filesystem/>
Expand All @@ -20,7 +20,6 @@
<category>files</category>
<category>integration</category>
<category>office</category>
<category>organization</category>
<category>tools</category>
<website>https://www.onlyoffice.com</website>
<bugs>https://github.com/ONLYOFFICE/onlyoffice-nextcloud/issues</bugs>
Expand All @@ -36,4 +35,4 @@
<admin>OCA\Onlyoffice\AdminSettings</admin>
<admin-section>OCA\Onlyoffice\AdminSection</admin-section>
</settings>
</info>
</info>
2 changes: 1 addition & 1 deletion appinfo/routes.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
*
* (c) Copyright Ascensio System Limited 2010-2018
* (c) Copyright Ascensio System SIA 2019
*
* This program is a free software product.
* You can redistribute it and/or modify it under the terms of the GNU Affero General Public License
Expand Down
Binary file added assets/bg/new.docx
Binary file not shown.
Binary file added assets/bg/new.pptx
Binary file not shown.
Binary file added assets/bg/new.xlsx
Binary file not shown.
Binary file added assets/nl/new.docx
Binary file not shown.
Binary file added assets/nl/new.pptx
Binary file not shown.
Binary file added assets/nl/new.xlsx
Binary file not shown.
19 changes: 13 additions & 6 deletions controller/callbackcontroller.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
*
* (c) Copyright Ascensio System Limited 2010-2018
* (c) Copyright Ascensio System SIA 2019
*
* This program is a free software product.
* You can redistribute it and/or modify it under the terms of the GNU Affero General Public License
Expand Down Expand Up @@ -429,10 +429,9 @@ public function track($doc, $users, $key, $status, $url, $token) {
}
}

if (($newData = $documentService->Request($url))) {
$file->putContent($newData);
$error = 0;
}
$newData = $documentService->Request($url);
$file->putContent($newData);
$error = 0;
} catch (\Exception $e) {
$this->logger->error("Track " . $trackerStatus . " error: " . $e->getMessage(), array("app" => $this->appName));
}
Expand All @@ -444,6 +443,8 @@ public function track($doc, $users, $key, $status, $url, $token) {
break;
}

$this->logger->debug("Track: " . $fileId . " status " . $status . " result " . $error, array("app" => $this->appName));

return new JSONResponse(["error" => $error], Http::STATUS_OK);
}

Expand All @@ -462,6 +463,7 @@ private function getFile($userId, $fileId) {
}

$files = $this->root->getUserFolder($userId)->getById($fileId);

if (empty($files)) {
$this->logger->error("Files not found: " . $fileId, array("app" => $this->appName));
return [NULL, new JSONResponse(["message" => $this->trans->t("Files not found")], Http::STATUS_NOT_FOUND)];
Expand Down Expand Up @@ -499,7 +501,12 @@ private function getFileByToken($fileId, $token) {
}

if ($node instanceof Folder) {
$file = $node->getById($fileId)[0];
$files = $node->getById($fileId);

if (empty($files)) {
return [NULL, new JSONResponse(["message" => $this->trans->t("File not found")], Http::STATUS_NOT_FOUND)];
}
$file = $files[0];
} else {
$file = $node;
}
Expand Down
Loading

0 comments on commit bf1eab4

Please sign in to comment.