Skip to content

Commit

Permalink
Merge pull request #209 from ONLYOFFICE/develop
Browse files Browse the repository at this point in the history
Release/4.1.0
  • Loading branch information
LinneyS authored Jan 16, 2020
2 parents e365528 + 3f3a533 commit c05cbbf
Show file tree
Hide file tree
Showing 27 changed files with 1,063 additions and 135 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

## 4.1.0
## Added
- inline editor if using the same tab, opening the sidebar, sharing from the editor
- creating, editing and co-authoring files in Nextcloud Android mobile application
- setting zoom and autosave
- selection of a file for comparison (DocumentServer 5.5 required)

## Changed
- compatible with Nextcloud 18
- Nextcloud v15 is no longer supported

## 4.0.0
## Added
- Polish translation
Expand Down
32 changes: 30 additions & 2 deletions appinfo/application.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
namespace OCA\Onlyoffice\AppInfo;

use OCP\AppFramework\App;
use OCP\DirectEditing\RegisterDirectEditorEvent;
use OCP\Share\IManager;
use OCP\Util;

Expand All @@ -38,6 +39,7 @@
use OCA\Onlyoffice\Controller\EditorController;
use OCA\Onlyoffice\Controller\SettingsController;
use OCA\Onlyoffice\Crypt;
use OCA\Onlyoffice\DirectEditor;

class Application extends App {

Expand Down Expand Up @@ -103,6 +105,10 @@ function() {
return $c->query("ServerContainer")->getUserSession();
});

$container->registerService("UserManager", function($c) {
return $c->query("ServerContainer")->getUserManager();
});

$container->registerService("Logger", function($c) {
return $c->query("ServerContainer")->getLogger();
});
Expand All @@ -111,6 +117,27 @@ function() {
return $c->query("ServerContainer")->getURLGenerator();
});

if (class_exists("OCP\DirectEditing\RegisterDirectEditorEvent")) {
$container->registerService("DirectEditor", function($c) {
return new DirectEditor(
$c->query("AppName"),
$c->query("URLGenerator"),
$c->query("L10N"),
$c->query("Logger"),
$this->appConfig,
$this->crypt
);
});

$eventDispatcher->addListener(RegisterDirectEditorEvent::class,
function (RegisterDirectEditorEvent $event) use ($container) {
if (!empty($this->appConfig->GetDocumentServerUrl()) && $this->appConfig->SettingsAreSuccessful()) {
$editor = $container->query("DirectEditor");
$event->register($editor);
}
});
}


// Controllers
$container->registerService("SettingsController", function($c) {
Expand All @@ -131,6 +158,7 @@ function() {
$c->query("Request"),
$c->query("RootStorage"),
$c->query("UserSession"),
$c->query("UserManager"),
$c->query("URLGenerator"),
$c->query("L10N"),
$c->query("Logger"),
Expand All @@ -148,7 +176,7 @@ function() {
$c->query("Request"),
$c->query("RootStorage"),
$c->query("UserSession"),
$c->query("ServerContainer")->getUserManager(),
$c->query("UserManager"),
$c->query("L10N"),
$c->query("Logger"),
$this->appConfig,
Expand All @@ -157,4 +185,4 @@ function() {
);
});
}
}
}
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 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="dev@onlyoffice.com" homepage="https://www.onlyoffice.com/">Ascensio System SIA</author>
<version>4.0.0</version>
<version>4.1.0</version>
<namespace>Onlyoffice</namespace>
<types>
<filesystem/>
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="15" max-version="17"/>
<nextcloud min-version="16" max-version="18"/>
</dependencies>
<settings>
<admin>OCA\Onlyoffice\AdminSettings</admin>
Expand Down
8 changes: 4 additions & 4 deletions controller/callbackcontroller.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,15 +132,15 @@ class CallbackController extends Controller {
* @param string $AppName - application name
* @param IRequest $request - request object
* @param IRootFolder $root - root folder
* @param IUserSession $userSession - user session
* @param IUserSession $userSession - current user session
* @param IUserManager $userManager - user manager
* @param IL10N $trans - l10n service
* @param ILogger $logger - logger
* @param OCA\Onlyoffice\AppConfig $config - application configuration
* @param OCA\Onlyoffice\Crypt $crypt - hash generator
* @param IManager $shareManager - Share manager
*/
public function __construct($AppName,
public function __construct($AppName,
IRequest $request,
IRootFolder $root,
IUserSession $userSession,
Expand Down Expand Up @@ -415,7 +415,7 @@ public function track($doc, $users, $key, $status, $url, $token) {
list ($file, $error) = empty($shareToken) ? $this->getFile($userId, $fileId, $filePath) : $this->getFileByToken($fileId, $shareToken);

if (isset($error)) {
$this->logger->error("track error $fileId" . " " . json_encode($error->getData()), array("app" => $this->appName));
$this->logger->error("track error $fileId " . json_encode($error->getData()), array("app" => $this->appName));
return $error;
}

Expand Down Expand Up @@ -611,4 +611,4 @@ private function retryOperation(callable $operation) {
usleep(500000);
}
}
}
}
Loading

0 comments on commit c05cbbf

Please sign in to comment.