Skip to content

Commit

Permalink
Merge pull request #348 from ONLYOFFICE/develop
Browse files Browse the repository at this point in the history
Release/7.1.1
  • Loading branch information
LinneyS authored Aug 2, 2021
2 parents 34f69c8 + 199cec4 commit c6a0102
Show file tree
Hide file tree
Showing 57 changed files with 5,420 additions and 735 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Change Log

## 7.1.1
## Added
- support ownCloud Web
- mentions in comments
- favorite status in the editor
- creation from a template from the editor
- download as
- downloading a template from settings
- opening action link

## 6.4.3
## Changed
- fixed registration of file actions
Expand Down
27 changes: 25 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ The app allows to:
* Create and edit text documents, spreadsheets, and presentations.
* Share files with different permission types - viewing/editing, commenting, reviewing, filling forms. It's also possible to restrict downloading (in all editors) and modifying filters (in spreadshhets). Sharing via public link is also available.
* Co-edit documents in real-time: use two co-editing modes (Fast and Strict), Track Changes, comments, and built-in chat. Co-editing is also available several federated ownCloud instances connected to one Document Server.
* Work with documents, spreadsheets, and presentations within ownCloud Web.

Supported formats:

Expand Down Expand Up @@ -50,6 +51,7 @@ If the server with the ownCloud installed does not have an Internet access, or i
```

2. Get the ownCloud ONLYOFFICE integration app.

There are several ways to do that:

a. Download the latest signed version from the official store for [ownCloud](https://marketplace.owncloud.com/apps/onlyoffice).
Expand Down Expand Up @@ -106,7 +108,25 @@ You can check the connection to ONLYOFFICE Document Server by using the followin

`occ onlyoffice:documentserver --check`

You will see a text either with information about the successful connection or the cause of the error.
You will see a text either with information about the successful connection or the cause of the error.

## Enabling editing for ownCloud Web

To enable work within ownCloud web, register the connector in the ownCloud Web config.json:

* If you installed ownCloud Web from the official marketplace, the path is `<owncloud-root-catalog>/config/config.json`
* If you compiled it from source code yourself using [this instruction](https://owncloud.dev/clients/web/backend-oc10/#running-web), the path is `<owncloud-web-root-catalog>/config/config.json`.

To register the connector, use these lines:

```
"external_apps": [
{
"id": "onlyoffice",
"path": "http(s)://<owncloud-10-server-address>/custom/onlyoffice/js/web/onlyoffice.js",
}
]
```

## How it works

Expand Down Expand Up @@ -190,6 +210,8 @@ The table below will help you to make the right choice.
| Document Builder Service | + | + |
| **Interface** | **Community Edition** | **Enterprise Edition** |
| Tabbed interface | + | + |
| Dark theme | + | + |
| 150% scaling | + | + |
| White Label | - | - |
| Integrated test example (node.js)* | - | + |
| Mobile web editors | - | + |
Expand Down Expand Up @@ -221,10 +243,11 @@ The table below will help you to make the right choice.
| Table templates | + | + |
| Pivot tables | + | + |
| Conditional formatting for viewing | +** | +** |
| Sheet Views | - | + |
| **Presentation Editor features** | **Community Edition** | **Enterprise Edition** |
| Font and paragraph formatting | + | + |
| Object insertion | + | + |
| Animations | + | + |
| Transitions | + | + |
| Presenter mode | + | + |
| Notes | + | + |
| | [Get it now](https://www.onlyoffice.com/download.aspx?utm_source=github&utm_medium=cpc&utm_campaign=GitHubOwncloud) | [Start Free Trial](https://www.onlyoffice.com/enterprise-edition-free.aspx?utm_source=github&utm_medium=cpc&utm_campaign=GitHubOwncloud) |
Expand Down
47 changes: 46 additions & 1 deletion appinfo/application.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,19 @@
use OCP\Files\IMimeTypeDetector;
use OCP\Util;
use OCP\IPreview;
use OCP\ITagManager;

use OCA\Onlyoffice\AppConfig;
use OCA\Onlyoffice\Controller\CallbackController;
use OCA\Onlyoffice\Controller\EditorApiController;
use OCA\Onlyoffice\Controller\EditorController;
use OCA\Onlyoffice\Controller\SettingsApiController;
use OCA\Onlyoffice\Controller\SettingsController;
use OCA\Onlyoffice\Controller\TemplateController;
use OCA\Onlyoffice\Crypt;
use OCA\Onlyoffice\Hookhandler;
use OCA\Onlyoffice\Hooks;
use OCA\Onlyoffice\Notifier;
use OCA\Onlyoffice\Preview;

class Application extends App {
Expand Down Expand Up @@ -101,6 +105,22 @@ function () {
});
}

$notificationManager = \OC::$server->getNotificationManager();
$notificationManager->registerNotifier(function () use ($appName) {
return new Notifier(
$appName,
\OC::$server->getL10NFactory(),
\OC::$server->getURLGenerator(),
\OC::$server->getLogger(),
\OC::$server->getUserManager()
);
}, function () use ($appName) {
return [
"id" => $appName,
"name" => $appName,
];
});

$container->registerService("L10N", function ($c) {
return $c->query("ServerContainer")->getL10N($c->query("AppName"));
});
Expand Down Expand Up @@ -135,8 +155,33 @@ function () {
);
});

$container->registerService("SettingsApiController", function ($c) {
return new SettingsApiController(
$c->query("AppName"),
$c->query("Request"),
$c->query("URLGenerator"),
$this->appConfig
);
});

$container->registerService("EditorController", function ($c) {
return new EditorController(
$c->query("AppName"),
$c->query("Request"),
$c->query("RootStorage"),
$c->query("UserSession"),
$c->query("URLGenerator"),
$c->query("L10N"),
$c->query("Logger"),
$this->appConfig,
$this->crypt,
$c->query("IManager"),
$c->query("Session")
);
});

$container->registerService("EditorApiController", function ($c) {
return new EditorApiController(
$c->query("AppName"),
$c->query("Request"),
$c->query("RootStorage"),
Expand All @@ -148,7 +193,7 @@ function () {
$this->crypt,
$c->query("IManager"),
$c->query("Session"),
$c->query("LockManager")
$c->get(ITagManager::class)
);
});

Expand Down
2 changes: 1 addition & 1 deletion 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 ownCloud 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>apl2</licence>
<author>Ascensio System SIA</author>
<version>6.4.3</version>
<version>7.1.1</version>
<namespace>Onlyoffice</namespace>
<types>
<filesystem/>
Expand Down
10 changes: 7 additions & 3 deletions appinfo/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,12 @@
["name" => "callback#download", "url" => "/download", "verb" => "GET"],
["name" => "callback#emptyfile", "url" => "/empty", "verb" => "GET"],
["name" => "callback#track", "url" => "/track", "verb" => "POST"],
["name" => "editor#loader", "url" => "/loader", "verb" => "GET"],
["name" => "editor#create_new", "url" => "/new", "verb" => "GET"],
["name" => "editor#download", "url" => "/downloadas", "verb" => "GET"],
["name" => "editor#index", "url" => "/{fileId}", "verb" => "GET"],
["name" => "editor#public_page", "url" => "/s/{shareToken}", "verb" => "GET"],
["name" => "editor#config", "url" => "/ajax/config/{fileId}", "verb" => "GET"],
["name" => "editor#users", "url" => "/ajax/users", "verb" => "GET"],
["name" => "editor#mention", "url" => "/ajax/mention", "verb" => "POST"],
["name" => "editor#create", "url" => "/ajax/new", "verb" => "POST"],
["name" => "editor#convert", "url" => "/ajax/convert", "verb" => "POST"],
["name" => "editor#save", "url" => "/ajax/save", "verb" => "POST"],
Expand All @@ -43,6 +44,9 @@
],
"ocs" => [
["name" => "federation#key", "url" => "/api/v1/key", "verb" => "POST"],
["name" => "federation#keylock", "url" => "/api/v1/keylock", "verb" => "POST"]
["name" => "federation#keylock", "url" => "/api/v1/keylock", "verb" => "POST"],
["name" => "editorapi#config", "url" => "/api/v1/config/{fileId}", "verb" => "GET"],
["name" => "editorapi#fillempty", "url" => "/api/v1/empty/{fileId}", "verb" => "GET"],
["name" => "settingsapi#get_doc_server_url", "url" => "/api/v1/settings/docserver", "verb" => "GET"],
]
];
2 changes: 1 addition & 1 deletion assets
Submodule assets updated 70 files
+13 −0 README.md
+ az-Latn-AZ/new.docx
+ az-Latn-AZ/new.pptx
+ az-Latn-AZ/new.xlsx
+ bg-BG/new.docx
+ bg-BG/new.pptx
+ bg-BG/new.xlsx
+ cs-CZ/new.docx
+ cs-CZ/new.pptx
+ cs-CZ/new.xlsx
+ de-DE/new.docx
+ de-DE/new.pptx
+ de-DE/new.xlsx
+ el-GR/new.docx
+ el-GR/new.pptx
+ el-GR/new.xlsx
+ en-GB/new.docx
+ en-GB/new.pptx
+ en-GB/new.xlsx
+ en-US/new.docx
+ en-US/new.pptx
+ en-US/new.xlsx
+ es-ES/new.docx
+ es-ES/new.pptx
+ es-ES/new.xlsx
+ fr-FR/new.docx
+ fr-FR/new.pptx
+ fr-FR/new.xlsx
+ it-IT/new.docx
+ it-IT/new.pptx
+ it-IT/new.xlsx
+ ja-JP/new.docx
+ ja-JP/new.pptx
+ ja-JP/new.xlsx
+ ko-KR/new.docx
+ ko-KR/new.pptx
+ ko-KR/new.xlsx
+ lv-LV/new.docx
+ lv-LV/new.pptx
+ lv-LV/new.xlsx
+ nl-NL/new.docx
+ nl-NL/new.pptx
+ nl-NL/new.xlsx
+ pl-PL/new.docx
+ pl-PL/new.pptx
+ pl-PL/new.xlsx
+ pt-BR/new.docx
+ pt-BR/new.pptx
+ pt-BR/new.xlsx
+ pt-PT/new.docx
+ pt-PT/new.pptx
+ pt-PT/new.xlsx
+ ru-RU/new.docx
+ ru-RU/new.pptx
+ ru-RU/new.xlsx
+ sk-SK/new.docx
+ sk-SK/new.pptx
+ sk-SK/new.xlsx
+ sv-SE/new.docx
+ sv-SE/new.pptx
+ sv-SE/new.xlsx
+ uk-UA/new.docx
+ uk-UA/new.pptx
+ uk-UA/new.xlsx
+ vi-VN/new.docx
+ vi-VN/new.pptx
+ vi-VN/new.xlsx
+ zh-CN/new.docx
+ zh-CN/new.pptx
+ zh-CN/new.xlsx
15 changes: 12 additions & 3 deletions controller/callbackcontroller.php
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,8 @@ public function emptyfile($doc) {
* @param string $token - request signature
* @param array $history - file history
* @param string $changesurl - link to file changes
* @param integer $forcesavetype - the type of force save action
* @param array $actions - the array of action
*
* @return array
*
Expand All @@ -387,7 +389,7 @@ public function emptyfile($doc) {
* @PublicPage
* @CORS
*/
public function track($doc, $users, $key, $status, $url, $token, $history, $changesurl) {
public function track($doc, $users, $key, $status, $url, $token, $history, $changesurl, $forcesavetype, $actions) {

list ($hashData, $error) = $this->crypt->ReadHash($doc);
if ($hashData === null) {
Expand Down Expand Up @@ -452,9 +454,18 @@ public function track($doc, $users, $key, $status, $url, $token, $history, $chan

\OC_Util::tearDownFS();

$isForcesave = $status === self::TrackerStatus_ForceSave || $status === self::TrackerStatus_CorruptedForceSave;

// author of the latest changes
$userId = $this->parseUserId($users[0]);

if ($isForcesave
&& $forcesavetype === 1
&& !empty($actions)) {
// the user who clicked Save
$userId = $this->parseUserId($actions[0]["userid"]);
}

$user = $this->userManager->get($userId);
if (!empty($user)) {
\OC_User::setUserId($userId);
Expand Down Expand Up @@ -523,8 +534,6 @@ public function track($doc, $users, $key, $status, $url, $token, $history, $chan

$prevIsForcesave = KeyManager::wasForcesave($fileId);

$isForcesave = $status === self::TrackerStatus_ForceSave || $status === self::TrackerStatus_CorruptedForceSave;

if ($file->getStorage()->instanceOfStorage(SharingExternalStorage::class)) {
$isLock = KeyManager::lockFederatedKey($file, $isForcesave, null);
if ($isForcesave && !$isLock) {
Expand Down
Loading

0 comments on commit c6a0102

Please sign in to comment.