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>2018-08-14 13:56:11 +0300
committerGitHub <noreply@github.com>2018-08-14 13:56:11 +0300
commit93399ca8fa007d10b931b1b5dcee26529c97e5cf (patch)
tree51b6eeca7ac50a94c13e9944fa54cd25b198f2d8
parenta56885e0e5909e9b43688874fa2672120068e7c4 (diff)
parent6863a2dcbf16aa36f5b7b5bd27b8778f8ca44ca5 (diff)
Merge pull request #213 from ONLYOFFICE/developv1.4.0
Release/1.4.0
-rw-r--r--CHANGELOG.md12
-rw-r--r--README.md14
-rw-r--r--appinfo/app.php31
-rw-r--r--appinfo/application.php31
-rw-r--r--appinfo/info.xml2
-rw-r--r--appinfo/routes.php31
-rw-r--r--controller/callbackcontroller.php185
-rw-r--r--controller/editorcontroller.php89
-rw-r--r--controller/settingscontroller.php98
-rw-r--r--css/editor.css31
-rw-r--r--css/main.css31
-rw-r--r--css/settings.css36
-rw-r--r--js/editor.js35
-rw-r--r--js/main.js108
-rw-r--r--js/settings.js31
-rw-r--r--l10n/de.js17
-rw-r--r--l10n/de.json17
-rw-r--r--l10n/de_DE.js48
-rw-r--r--l10n/de_DE.json46
-rw-r--r--l10n/es.js3
-rw-r--r--l10n/es.json3
-rw-r--r--l10n/pt_BR.js3
-rw-r--r--l10n/pt_BR.json3
-rw-r--r--l10n/ru.js3
-rw-r--r--l10n/ru.json3
-rw-r--r--lib/adminsection.php31
-rw-r--r--lib/adminsettings.php31
-rw-r--r--lib/appconfig.php89
-rw-r--r--lib/crypt.php31
-rw-r--r--lib/documentservice.php58
-rw-r--r--settings.php31
-rw-r--r--templates/editor.php31
-rw-r--r--templates/settings.php51
33 files changed, 782 insertions, 482 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a79cf80..9fe4aad 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,17 @@
# Change Log
+## 1.4.0
+## Added
+- transition from the editor to the list of files in the same tab
+- default action for all supported formats
+- redirect to the login page if are not logged in
+- a separate action to call the file conversion
+
+## Changed
+- improved checks when saving connection settings
+- expanded the list of formats
+- fixed exceptions when opening file shared by link
+
## 1.3.0
## Added
- add macro-enabled and template formats
diff --git a/README.md b/README.md
index dad3e27..7e2378c 100644
--- a/README.md
+++ b/README.md
@@ -6,6 +6,8 @@ The app will create an item in the `new` (+) menu to create **Document**, **Spre
You can also use our **[Docker installation](https://github.com/ONLYOFFICE/docker-onlyoffice-owncloud)** to get installed and configured Document Server and ownCloud 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 ownCloud/Nextcloud and any end clients (version 4.2.7 and later are supported for use with the app). If that is not the case, use the official ONLYOFFICE Document Server documentation page: [Document Server for Linux](http://helpcenter.onlyoffice.com/server/linux/document/linux-installation.aspx). ONLYOFFICE Document Server must also be able to POST to ownCloud/Nextcloud directly.
@@ -69,7 +71,7 @@ The **Open in ONLYOFFICE** action will be added to the file context menu. You ca
The ONLYOFFICE integration follows the API documented here https://api.onlyoffice.com/editors/basic:
-* When creating a new file, the user navigates to a document folder within ownCloud/Nextcloud and clicks the **Document**, **Spreadsheet** or **Presentation* item in the _new_ (+) menu.
+* When creating a new file, the user navigates to a document folder within ownCloud/Nextcloud and clicks the **Document**, **Spreadsheet** or **Presentation** item in the _new_ (+) menu.
* The browser invokes the `create` method in the `/lib/Controller/EditorController.php` controller. This method adds the copy of the file from the assets folder to the folder the user is currently in.
@@ -100,3 +102,13 @@ The ONLYOFFICE integration follows the API documented here https://api.onlyoffic
* After 10 seconds of inactivity, ONLYOFFICE Document Server sends a POST to the _callback_ URL letting ownCloud/Nextcloud know that the clients have finished editing the document and closed it.
* ownCloud/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. The users from one and the same server can edit the document in the co-editing mode, but the users from two (or more) different servers will not be able to collaborate on the same document in real time.
+
+* Adding the storage using the **External storages** app has issues with the co-editing in some cases. If the connection is made using the same authorization keys (the _Username and password_ or _Global credentials_ authentication type is selected), then the co-editing is available for the users. If different authorization keys are used (_Log-in credentials, save in database_ or _User entered, store in database_ authentication options), the co-editing is not available. When the _Log-in credentials, save in session_ authentication type is used, the files cannot be opened in the editor.
+
+* ownCloud/Nextcloud provides an option to encrypt the file storage. But if the encryption with the _per-user encryption keys_ (used by default in ownCloud/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 [ownCloud](https://doc.owncloud.org/server/latest/admin_manual/configuration_files/encryption_configuration.html#enabling-master-key-based-encryption)/[Nextcloud](https://docs.nextcloud.com/server/12/admin_manual/configuration_files/encryption_configuration.html#occ-encryption-commands) websites.
diff --git a/appinfo/app.php b/appinfo/app.php
index f4cbcc0..7ddc062 100644
--- a/appinfo/app.php
+++ b/appinfo/app.php
@@ -3,24 +3,27 @@
*
* (c) Copyright Ascensio System Limited 2010-2018
*
- * This program is freeware. You can redistribute it and/or modify it under the terms of the GNU
- * General Public License (GPL) version 3 as published by the Free Software Foundation (https://www.gnu.org/copyleft/gpl.html).
- * In accordance with Section 7(a) of the GNU GPL its Section 15 shall be amended to the effect that
- * Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights.
+ * 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
+ * (AGPL) version 3 as published by the Free Software Foundation.
+ * In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
+ * that Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights.
*
- * THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR
- * FITNESS FOR A PARTICULAR PURPOSE. For more details, see GNU GPL at https://www.gnu.org/copyleft/gpl.html
+ * This program is distributed WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * For details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
- * You can contact Ascensio System SIA by email at sales@onlyoffice.com
+ * You can contact Ascensio System SIA at 17-2 Elijas street, Riga, Latvia, EU, LV-1021.
*
- * The interactive user interfaces in modified source and object code versions of ONLYOFFICE must display
- * Appropriate Legal Notices, as required under Section 5 of the GNU GPL version 3.
+ * The interactive user interfaces in modified source and object code versions of the Program
+ * must display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3.
*
- * Pursuant to Section 7 § 3(b) of the GNU GPL you must retain the original ONLYOFFICE logo which contains
- * relevant author attributions when distributing the software. If the display of the logo in its graphic
- * form is not reasonably feasible for technical reasons, you must include the words "Powered by ONLYOFFICE"
- * in every copy of the program you distribute.
- * Pursuant to Section 7 § 3(e) we decline to grant you any rights under trademark law for use of our trademarks.
+ * Pursuant to Section 7(b) of the License you must retain the original Product logo when distributing the program.
+ * Pursuant to Section 7(e) we decline to grant you any rights under trademark law for use of our trademarks.
+ *
+ * All the Product's GUI elements, including illustrations and icon sets, as well as technical
+ * writing content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International.
+ * See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
diff --git a/appinfo/application.php b/appinfo/application.php
index 907764f..8589757 100644
--- a/appinfo/application.php
+++ b/appinfo/application.php
@@ -3,24 +3,27 @@
*
* (c) Copyright Ascensio System Limited 2010-2018
*
- * This program is freeware. You can redistribute it and/or modify it under the terms of the GNU
- * General Public License (GPL) version 3 as published by the Free Software Foundation (https://www.gnu.org/copyleft/gpl.html).
- * In accordance with Section 7(a) of the GNU GPL its Section 15 shall be amended to the effect that
- * Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights.
+ * 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
+ * (AGPL) version 3 as published by the Free Software Foundation.
+ * In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
+ * that Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights.
*
- * THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR
- * FITNESS FOR A PARTICULAR PURPOSE. For more details, see GNU GPL at https://www.gnu.org/copyleft/gpl.html
+ * This program is distributed WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * For details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
- * You can contact Ascensio System SIA by email at sales@onlyoffice.com
+ * You can contact Ascensio System SIA at 17-2 Elijas street, Riga, Latvia, EU, LV-1021.
*
- * The interactive user interfaces in modified source and object code versions of ONLYOFFICE must display
- * Appropriate Legal Notices, as required under Section 5 of the GNU GPL version 3.
+ * The interactive user interfaces in modified source and object code versions of the Program
+ * must display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3.
*
- * Pursuant to Section 7 § 3(b) of the GNU GPL you must retain the original ONLYOFFICE logo which contains
- * relevant author attributions when distributing the software. If the display of the logo in its graphic
- * form is not reasonably feasible for technical reasons, you must include the words "Powered by ONLYOFFICE"
- * in every copy of the program you distribute.
- * Pursuant to Section 7 § 3(e) we decline to grant you any rights under trademark law for use of our trademarks.
+ * Pursuant to Section 7(b) of the License you must retain the original Product logo when distributing the program.
+ * Pursuant to Section 7(e) we decline to grant you any rights under trademark law for use of our trademarks.
+ *
+ * All the Product's GUI elements, including illustrations and icon sets, as well as technical
+ * writing content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International.
+ * See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
diff --git a/appinfo/info.xml b/appinfo/info.xml
index e3025e4..8c41b30 100644
--- a/appinfo/info.xml
+++ b/appinfo/info.xml
@@ -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>Ascensio System SIA</author>
- <version>1.3.0</version>
+ <version>1.4.0</version>
<namespace>Onlyoffice</namespace>
<types>
<filesystem/>
diff --git a/appinfo/routes.php b/appinfo/routes.php
index 5355622..53a8c0d 100644
--- a/appinfo/routes.php
+++ b/appinfo/routes.php
@@ -3,24 +3,27 @@
*
* (c) Copyright Ascensio System Limited 2010-2018
*
- * This program is freeware. You can redistribute it and/or modify it under the terms of the GNU
- * General Public License (GPL) version 3 as published by the Free Software Foundation (https://www.gnu.org/copyleft/gpl.html).
- * In accordance with Section 7(a) of the GNU GPL its Section 15 shall be amended to the effect that
- * Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights.
+ * 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
+ * (AGPL) version 3 as published by the Free Software Foundation.
+ * In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
+ * that Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights.
*
- * THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR
- * FITNESS FOR A PARTICULAR PURPOSE. For more details, see GNU GPL at https://www.gnu.org/copyleft/gpl.html
+ * This program is distributed WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * For details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
- * You can contact Ascensio System SIA by email at sales@onlyoffice.com
+ * You can contact Ascensio System SIA at 17-2 Elijas street, Riga, Latvia, EU, LV-1021.
*
- * The interactive user interfaces in modified source and object code versions of ONLYOFFICE must display
- * Appropriate Legal Notices, as required under Section 5 of the GNU GPL version 3.
+ * The interactive user interfaces in modified source and object code versions of the Program
+ * must display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3.
*
- * Pursuant to Section 7 § 3(b) of the GNU GPL you must retain the original ONLYOFFICE logo which contains
- * relevant author attributions when distributing the software. If the display of the logo in its graphic
- * form is not reasonably feasible for technical reasons, you must include the words "Powered by ONLYOFFICE"
- * in every copy of the program you distribute.
- * Pursuant to Section 7 § 3(e) we decline to grant you any rights under trademark law for use of our trademarks.
+ * Pursuant to Section 7(b) of the License you must retain the original Product logo when distributing the program.
+ * Pursuant to Section 7(e) we decline to grant you any rights under trademark law for use of our trademarks.
+ *
+ * All the Product's GUI elements, including illustrations and icon sets, as well as technical
+ * writing content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International.
+ * See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
diff --git a/controller/callbackcontroller.php b/controller/callbackcontroller.php
index 284e7d8..14ce9f3 100644
--- a/controller/callbackcontroller.php
+++ b/controller/callbackcontroller.php
@@ -3,24 +3,27 @@
*
* (c) Copyright Ascensio System Limited 2010-2018
*
- * This program is freeware. You can redistribute it and/or modify it under the terms of the GNU
- * General Public License (GPL) version 3 as published by the Free Software Foundation (https://www.gnu.org/copyleft/gpl.html).
- * In accordance with Section 7(a) of the GNU GPL its Section 15 shall be amended to the effect that
- * Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights.
+ * 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
+ * (AGPL) version 3 as published by the Free Software Foundation.
+ * In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
+ * that Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights.
*
- * THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR
- * FITNESS FOR A PARTICULAR PURPOSE. For more details, see GNU GPL at https://www.gnu.org/copyleft/gpl.html
+ * This program is distributed WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * For details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
- * You can contact Ascensio System SIA by email at sales@onlyoffice.com
+ * You can contact Ascensio System SIA at 17-2 Elijas street, Riga, Latvia, EU, LV-1021.
*
- * The interactive user interfaces in modified source and object code versions of ONLYOFFICE must display
- * Appropriate Legal Notices, as required under Section 5 of the GNU GPL version 3.
+ * The interactive user interfaces in modified source and object code versions of the Program
+ * must display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3.
*
- * Pursuant to Section 7 § 3(b) of the GNU GPL you must retain the original ONLYOFFICE logo which contains
- * relevant author attributions when distributing the software. If the display of the logo in its graphic
- * form is not reasonably feasible for technical reasons, you must include the words "Powered by ONLYOFFICE"
- * in every copy of the program you distribute.
- * Pursuant to Section 7 § 3(e) we decline to grant you any rights under trademark law for use of our trademarks.
+ * Pursuant to Section 7(b) of the License you must retain the original Product logo when distributing the program.
+ * Pursuant to Section 7(e) we decline to grant you any rights under trademark law for use of our trademarks.
+ *
+ * All the Product's GUI elements, including illustrations and icon sets, as well as technical
+ * writing content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International.
+ * See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
@@ -34,12 +37,14 @@ use OCP\Constants;
use OCP\Files\File;
use OCP\Files\Folder;
use OCP\Files\IRootFolder;
+use OCP\Files\NotFoundException;
use OCP\Files\NotPermittedException;
use OCP\IL10N;
use OCP\ILogger;
use OCP\IRequest;
use OCP\IUserManager;
use OCP\IUserSession;
+use OCP\Share\Exceptions\ShareNotFound;
use OCP\Share\IManager;
use OCA\Onlyoffice\AppConfig;
@@ -174,11 +179,11 @@ class CallbackController extends Controller {
list ($hashData, $error) = $this->crypt->ReadHash($doc);
if ($hashData === NULL) {
- $this->logger->info("Download with empty or not correct hash: " . $error, array("app" => $this->appName));
+ $this->logger->error("Download with empty or not correct hash: " . $error, array("app" => $this->appName));
return new JSONResponse(["message" => $this->trans->t("Access denied")], Http::STATUS_FORBIDDEN);
}
if ($hashData->action !== "download") {
- $this->logger->info("Download with other action", array("app" => $this->appName));
+ $this->logger->error("Download with other action", array("app" => $this->appName));
return new JSONResponse(["message" => $this->trans->t("Invalid request")], Http::STATUS_BAD_REQUEST);
}
@@ -188,7 +193,7 @@ class CallbackController extends Controller {
if (!empty($this->config->GetDocumentServerSecret())) {
$header = \OC::$server->getRequest()->getHeader($this->config->JwtHeader());
if (empty($header)) {
- $this->logger->info("Download without jwt", array("app" => $this->appName));
+ $this->logger->error("Download without jwt", array("app" => $this->appName));
return new JSONResponse(["message" => $this->trans->t("Access denied")], Http::STATUS_FORBIDDEN);
}
@@ -197,14 +202,14 @@ class CallbackController extends Controller {
try {
$decodedHeader = \Firebase\JWT\JWT::decode($header, $this->config->GetDocumentServerSecret(), array("HS256"));
} catch (\UnexpectedValueException $e) {
- $this->logger->info("Download with invalid jwt: " . $e->getMessage(), array("app" => $this->appName));
+ $this->logger->error("Download with invalid jwt: " . $e->getMessage(), array("app" => $this->appName));
return new JSONResponse(["message" => $this->trans->t("Access denied")], Http::STATUS_FORBIDDEN);
}
}
$userId = $hashData->userId;
- $token = $hashData->token;
+ $token = isset($hashData->token) ? $hashData->token : NULL;
list ($file, $error) = empty($token) ? $this->getFile($userId, $fileId) : $this->getFileByToken($fileId, $token);
if (isset($error)) {
@@ -214,7 +219,7 @@ class CallbackController extends Controller {
try {
return new DataDownloadResponse($file->getContent(), $file->getName(), $file->getMimeType());
} catch (NotPermittedException $e) {
- $this->logger->info("Download Not permitted: " . $fileId . " " . $e->getMessage(), array("app" => $this->appName));
+ $this->logger->error("Download Not permitted: " . $fileId . " " . $e->getMessage(), array("app" => $this->appName));
return new JSONResponse(["message" => $this->trans->t("Not permitted")], Http::STATUS_FORBIDDEN);
}
return new JSONResponse(["message" => $this->trans->t("Download failed")], Http::STATUS_INTERNAL_SERVER_ERROR);
@@ -237,18 +242,18 @@ class CallbackController extends Controller {
list ($hashData, $error) = $this->crypt->ReadHash($doc);
if ($hashData === NULL) {
- $this->logger->info("Download empty with empty or not correct hash: " . $error, array("app" => $this->appName));
+ $this->logger->error("Download empty with empty or not correct hash: " . $error, array("app" => $this->appName));
return new JSONResponse(["message" => $this->trans->t("Access denied")], Http::STATUS_FORBIDDEN);
}
if ($hashData->action !== "empty") {
- $this->logger->info("Download empty with other action", array("app" => $this->appName));
+ $this->logger->error("Download empty with other action", array("app" => $this->appName));
return new JSONResponse(["message" => $this->trans->t("Invalid request")], Http::STATUS_BAD_REQUEST);
}
if (!empty($this->config->GetDocumentServerSecret())) {
$header = \OC::$server->getRequest()->getHeader($this->config->JwtHeader());
if (empty($header)) {
- $this->logger->info("Download empty without jwt", array("app" => $this->appName));
+ $this->logger->error("Download empty without jwt", array("app" => $this->appName));
return new JSONResponse(["message" => $this->trans->t("Access denied")], Http::STATUS_FORBIDDEN);
}
@@ -257,7 +262,7 @@ class CallbackController extends Controller {
try {
$decodedHeader = \Firebase\JWT\JWT::decode($header, $this->config->GetDocumentServerSecret(), array("HS256"));
} catch (\UnexpectedValueException $e) {
- $this->logger->info("Download empty with invalid jwt: " . $e->getMessage(), array("app" => $this->appName));
+ $this->logger->error("Download empty with invalid jwt: " . $e->getMessage(), array("app" => $this->appName));
return new JSONResponse(["message" => $this->trans->t("Access denied")], Http::STATUS_FORBIDDEN);
}
}
@@ -273,7 +278,7 @@ class CallbackController extends Controller {
try {
return new DataDownloadResponse($template, "new.docx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document");
} catch (NotPermittedException $e) {
- $this->logger->info("Download Not permitted: " . $fileId . " " . $e->getMessage(), array("app" => $this->appName));
+ $this->logger->error("Download Not permitted: " . $fileId . " " . $e->getMessage(), array("app" => $this->appName));
return new JSONResponse(["message" => $this->trans->t("Not permitted")], Http::STATUS_FORBIDDEN);
}
return new JSONResponse(["message" => $this->trans->t("Download failed")], Http::STATUS_INTERNAL_SERVER_ERROR);
@@ -298,11 +303,11 @@ class CallbackController extends Controller {
list ($hashData, $error) = $this->crypt->ReadHash($doc);
if ($hashData === NULL) {
- $this->logger->info("Track with empty or not correct hash: " . $error, array("app" => $this->appName));
+ $this->logger->error("Track with empty or not correct hash: " . $error, array("app" => $this->appName));
return new JSONResponse(["message" => $this->trans->t("Access denied")], Http::STATUS_FORBIDDEN);
}
if ($hashData->action !== "track") {
- $this->logger->info("Track with other action", array("app" => $this->appName));
+ $this->logger->error("Track with other action", array("app" => $this->appName));
return new JSONResponse(["message" => $this->trans->t("Invalid request")], Http::STATUS_BAD_REQUEST);
}
@@ -312,7 +317,7 @@ class CallbackController extends Controller {
if (!empty($this->config->GetDocumentServerSecret())) {
$header = \OC::$server->getRequest()->getHeader($this->config->JwtHeader());
if (empty($header)) {
- $this->logger->info("Track without jwt", array("app" => $this->appName));
+ $this->logger->error("Track without jwt", array("app" => $this->appName));
return new JSONResponse(["message" => $this->trans->t("Access denied")], Http::STATUS_FORBIDDEN);
}
@@ -328,7 +333,7 @@ class CallbackController extends Controller {
$status = $payload->status;
$url = isset($payload->url) ? $payload->url : NULL;
} catch (\UnexpectedValueException $e) {
- $this->logger->info("Track with invalid jwt: " . $e->getMessage(), array("app" => $this->appName));
+ $this->logger->error("Track with invalid jwt: " . $e->getMessage(), array("app" => $this->appName));
return new JSONResponse(["message" => $this->trans->t("Access denied")], Http::STATUS_FORBIDDEN);
}
}
@@ -340,67 +345,73 @@ class CallbackController extends Controller {
case "MustSave":
case "Corrupted":
if (empty($url)) {
- $this->logger->info("Track without url: " . $fileId . " status " . $trackerStatus, array("app" => $this->appName));
+ $this->logger->error("Track without url: " . $fileId . " status " . $trackerStatus, array("app" => $this->appName));
return new JSONResponse(["message" => $this->trans->t("Url not found")], Http::STATUS_BAD_REQUEST);
}
- $userId = $users[0];
- $user = $this->userManager->get($userId);
- if (!empty($user)) {
- $this->logger->info("setupFS " . $userId, array("app" => $this->appName));
- \OC_Util::tearDownFS();
- \OC_Util::setupFS($userId);
-
- $this->userSession->setUser($user);
- } else {
- $ownerId = $hashData->ownerId;
-
- \OC_Util::tearDownFS();
- \OC_Util::setupFS($ownerId);
- }
+ try {
+ $userId = $users[0];
+ $user = $this->userManager->get($userId);
+ if (!empty($user)) {
+ \OC_Util::tearDownFS();
+ \OC_Util::setupFS($userId);
+
+ $this->userSession->setUser($user);
+ } else {
+ $ownerId = $hashData->ownerId;
+
+ \OC_Util::tearDownFS();
+ if (!empty($ownerId)) {
+ \OC_Util::setupFS($ownerId);
+ }
+ }
- $token = $hashData->token;
- list ($file, $error) = empty($token) ? $this->getFile($userId, $fileId) : $this->getFileByToken($fileId, $token);
+ $token = isset($hashData->token) ? $hashData->token : NULL;
+ list ($file, $error) = empty($token) ? $this->getFile($userId, $fileId) : $this->getFileByToken($fileId, $token);
- if (isset($error)) {
- return $error;
- }
+ if (isset($error)) {
+ return $error;
+ }
- $fileName = $file->getName();
- $curExt = strtolower(pathinfo($fileName, PATHINFO_EXTENSION));
- $downloadExt = strtolower(pathinfo($url, PATHINFO_EXTENSION));
+ $documentServerUrl = $this->config->GetDocumentServerInternalUrl(true);
+ if (!empty($documentServerUrl)) {
+ $from = $this->config->GetDocumentServerUrl();
- $documentService = new DocumentService($this->trans, $this->config);
- if ($downloadExt !== $curExt) {
- $key = DocumentService::GenerateRevisionId($fileId . $url);
+ if (!preg_match("/^https?:\/\//i", $from)) {
+ $parsedUrl = parse_url($url);
+ $from = $parsedUrl["scheme"] . "://" . $parsedUrl["host"] . (array_key_exists("port", $parsedUrl) ? (":" . $parsedUrl["port"]) : "") . $from;
+ }
- try {
- $url = $documentService->GetConvertedUri($url, $downloadExt, $curExt, $key);
- } catch (\Exception $e) {
- $this->logger->error("GetConvertedUri on save error: " . $e->getMessage(), array("app" => $this->appName));
- return new JSONResponse(["message" => $e->getMessage()], Http::STATUS_INTERNAL_SERVER_ERROR);
+ if ($from !== $documentServerUrl)
+ {
+ $this->logger->debug("Replace in track from " . $from . " to " . $documentServerUrl, array("app" => $this->appName));
+ $url = str_replace($from, $documentServerUrl, $url);
+ }
}
- }
- $documentServerUrl = $this->config->GetDocumentServerInternalUrl(true);
- if (!empty($documentServerUrl)) {
- $from = $this->config->GetDocumentServerUrl();
-
- if (!preg_match("/^https?:\/\//i", $from)) {
- $parsedUrl = parse_url($url);
- $from = $parsedUrl["scheme"] . "://" . $parsedUrl["host"] . (array_key_exists("port", $parsedUrl) ? (":" . $parsedUrl["port"]) : "") . $from;
+ $fileName = $file->getName();
+ $curExt = strtolower(pathinfo($fileName, PATHINFO_EXTENSION));
+ $downloadExt = strtolower(pathinfo($url, PATHINFO_EXTENSION));
+
+ $documentService = new DocumentService($this->trans, $this->config);
+ if ($downloadExt !== $curExt) {
+ $key = DocumentService::GenerateRevisionId($fileId . $url);
+
+ try {
+ $this->logger->debug("GetConvertedUri from " . $downloadExt . " to " . $curExt . " " . $url, array("app" => $this->appName));
+ $url = $documentService->GetConvertedUri($url, $downloadExt, $curExt, $key);
+ } catch (\Exception $e) {
+ $this->logger->error("GetConvertedUri on save error: " . $e->getMessage(), array("app" => $this->appName));
+ return new JSONResponse(["message" => $e->getMessage()], Http::STATUS_INTERNAL_SERVER_ERROR);
+ }
}
- if ($from !== $documentServerUrl)
- {
- $this->logger->debug("Replace in track from " . $from . " to " . $documentServerUrl, array("app" => $this->appName));
- $url = str_replace($from, $documentServerUrl, $url);
+ if (($newData = $documentService->Request($url))) {
+ $file->putContent($newData);
+ $error = 0;
}
- }
-
- if (($newData = $documentService->Request($url))) {
- $file->putContent($newData);
- $error = 0;
+ } catch (\Exception $e) {
+ $this->logger->error("Track " . $trackerStatus . " error: " . $e->getMessage(), array("app" => $this->appName));
}
break;
@@ -429,13 +440,13 @@ class CallbackController extends Controller {
$files = $this->root->getUserFolder($userId)->getById($fileId);
if (empty($files)) {
- $this->logger->info("Files not found: " . $fileId, array("app" => $this->appName));
+ $this->logger->error("Files not found: " . $fileId, array("app" => $this->appName));
return new JSONResponse(["message" => $this->trans->t("Files not found")], Http::STATUS_NOT_FOUND);
}
$file = $files[0];
if (! $file instanceof File) {
- $this->logger->info("File not found: " . $fileId, array("app" => $this->appName));
+ $this->logger->error("File not found: " . $fileId, array("app" => $this->appName));
return new JSONResponse(["message" => $this->trans->t("File not found")], Http::STATUS_NOT_FOUND);
}
@@ -457,7 +468,12 @@ class CallbackController extends Controller {
return [NULL, $error];
}
- $node = $share->getNode();
+ try {
+ $node = $share->getNode();
+ } catch (NotFoundException $e) {
+ $this->logger->error("getFileByToken error: " . $e->getMessage(), array("app" => $this->appName));
+ return [NULL, $this->trans->t("File not found")];
+ }
if ($node instanceof Folder) {
$file = $node->getById($fileId)[0];
@@ -480,7 +496,14 @@ class CallbackController extends Controller {
return [NULL, $this->trans->t("FileId is empty")];
}
- $share = $this->shareManager->getShareByToken($token);
+ $share;
+ try {
+ $share = $this->shareManager->getShareByToken($token);
+ } catch (ShareNotFound $e) {
+ $this->logger->error("getShare error: " . $e->getMessage(), array("app" => $this->appName));
+ $share = NULL;
+ }
+
if ($share === NULL || $share === false) {
return [NULL, $this->trans->t("You do not have enough permissions to view the file")];
}
diff --git a/controller/editorcontroller.php b/controller/editorcontroller.php
index d5a28bc..de03e26 100644
--- a/controller/editorcontroller.php
+++ b/controller/editorcontroller.php
@@ -3,43 +3,49 @@
*
* (c) Copyright Ascensio System Limited 2010-2018
*
- * This program is freeware. You can redistribute it and/or modify it under the terms of the GNU
- * General Public License (GPL) version 3 as published by the Free Software Foundation (https://www.gnu.org/copyleft/gpl.html).
- * In accordance with Section 7(a) of the GNU GPL its Section 15 shall be amended to the effect that
- * Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights.
+ * 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
+ * (AGPL) version 3 as published by the Free Software Foundation.
+ * In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
+ * that Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights.
*
- * THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR
- * FITNESS FOR A PARTICULAR PURPOSE. For more details, see GNU GPL at https://www.gnu.org/copyleft/gpl.html
+ * This program is distributed WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * For details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
- * You can contact Ascensio System SIA by email at sales@onlyoffice.com
+ * You can contact Ascensio System SIA at 17-2 Elijas street, Riga, Latvia, EU, LV-1021.
*
- * The interactive user interfaces in modified source and object code versions of ONLYOFFICE must display
- * Appropriate Legal Notices, as required under Section 5 of the GNU GPL version 3.
+ * The interactive user interfaces in modified source and object code versions of the Program
+ * must display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3.
*
- * Pursuant to Section 7 § 3(b) of the GNU GPL you must retain the original ONLYOFFICE logo which contains
- * relevant author attributions when distributing the software. If the display of the logo in its graphic
- * form is not reasonably feasible for technical reasons, you must include the words "Powered by ONLYOFFICE"
- * in every copy of the program you distribute.
- * Pursuant to Section 7 § 3(e) we decline to grant you any rights under trademark law for use of our trademarks.
+ * Pursuant to Section 7(b) of the License you must retain the original Product logo when distributing the program.
+ * Pursuant to Section 7(e) we decline to grant you any rights under trademark law for use of our trademarks.
+ *
+ * All the Product's GUI elements, including illustrations and icon sets, as well as technical
+ * writing content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International.
+ * See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
namespace OCA\Onlyoffice\Controller;
-use OCP\AppFramework\Http\TemplateResponse;
-use OCP\AppFramework\Http\ContentSecurityPolicy;
use OCP\AppFramework\Controller;
+use OCP\AppFramework\Http\ContentSecurityPolicy;
+use OCP\AppFramework\Http\RedirectResponse;
+use OCP\AppFramework\Http\TemplateResponse;
use OCP\AutoloadNotAllowedException;
use OCP\Constants;
use OCP\Files\FileInfo;
use OCP\Files\Folder;
use OCP\Files\IRootFolder;
+use OCP\Files\NotFoundException;
use OCP\IL10N;
use OCP\ILogger;
use OCP\IRequest;
use OCP\ISession;
use OCP\IURLGenerator;
use OCP\IUserSession;
+use OCP\Share\Exceptions\ShareNotFound;
use OCP\Share\IManager;
use OC\Files\Filesystem;
@@ -179,11 +185,11 @@ class EditorController extends Controller {
$folder = $userFolder->get($dir);
if ($folder === NULL) {
- $this->logger->info("Folder for file creation was not found: " . $dir, array("app" => $this->appName));
+ $this->logger->error("Folder for file creation was not found: " . $dir, array("app" => $this->appName));
return ["error" => $this->trans->t("The required folder was not found")];
}
if (!$folder->isCreatable()) {
- $this->logger->info("Folder for file creation without permission: " . $dir, array("app" => $this->appName));
+ $this->logger->error("Folder for file creation without permission: " . $dir, array("app" => $this->appName));
return ["error" => $this->trans->t("You don't have enough permission to create")];
}
@@ -201,7 +207,7 @@ class EditorController extends Controller {
$template = file_get_contents($templatePath);
if (!$template) {
- $this->logger->info("Template for file creation not found: " . $templatePath, array("app" => $this->appName));
+ $this->logger->error("Template for file creation not found: " . $templatePath, array("app" => $this->appName));
return ["error" => $this->trans->t("Template not found")];
}
@@ -214,7 +220,7 @@ class EditorController extends Controller {
$fileInfo = $view->getFileInfo($filePath);
if ($fileInfo === false) {
- $this->logger->info("File not found: " . $filePath, array("app" => $this->appName));
+ $this->logger->error("File not found: " . $filePath, array("app" => $this->appName));
return ["error" => $this->trans->t("File not found")];
}
@@ -254,7 +260,7 @@ class EditorController extends Controller {
}
if (!isset($format["conv"]) || $format["conv"] !== TRUE) {
- $this->logger->debug("Conversion is not required: " . $fileName, array("app" => $this->appName));
+ $this->logger->info("Conversion is not required: " . $fileName, array("app" => $this->appName));
return ["error" => $this->trans->t("Conversion is not required")];
}
@@ -321,15 +327,21 @@ class EditorController extends Controller {
* @param integer $fileId - file identifier
* @param string $token - access token
*
- * @return TemplateResponse
+ * @return TemplateResponse|RedirectResponse
*
* @NoAdminRequired
* @NoCSRFRequired
- * @PublicPage
*/
public function index($fileId, $token = NULL) {
$this->logger->debug("Open: " . $fileId, array("app" => $this->appName));
+ if (empty($token) && !$this->userSession->isLoggedIn()) {
+ $redirectUrl = $this->urlGenerator->linkToRoute("core.login.showLoginForm", [
+ "redirect_url" => $this->request->getRequestUri()
+ ]);
+ return new RedirectResponse($redirectUrl);
+ }
+
$documentServerUrl = $this->config->GetDocumentServerUrl();
if (empty($documentServerUrl)) {
@@ -370,8 +382,8 @@ class EditorController extends Controller {
* @NoCSRFRequired
* @PublicPage
*/
- public function PublicPage($token) {
- return $this->index(0, $token);
+ public function PublicPage($fileId, $token) {
+ return $this->index($fileId, $token);
}
/**
@@ -427,7 +439,13 @@ class EditorController extends Controller {
$editable = $file->isUpdateable()
&& (empty($token) || ($this->getShare($token)[0]->getPermissions() & Constants::PERMISSION_UPDATE) === Constants::PERMISSION_UPDATE);
if ($editable && $canEdit) {
- $hashCallback = $this->crypt->GetHash(["fileId" => $fileId, "ownerId" => $file->getOwner()->getUID(), "token" => $token, "action" => "track"]);
+ $ownerId = NULL;
+ $owner = $file->getOwner();
+ if (!empty($owner)) {
+ $ownerId = $owner->getUID();
+ }
+
+ $hashCallback = $this->crypt->GetHash(["fileId" => $fileId, "ownerId" => $ownerId, "token" => $token, "action" => "track"]);
$callback = $this->urlGenerator->linkToRouteAbsolute($this->appName . ".callback.track", ["doc" => $hashCallback]);
if (!empty($this->config->GetStorageUrl())) {
@@ -465,6 +483,9 @@ class EditorController extends Controller {
$params["editorConfig"]["customization"]["goback"] = [
"url" => $folderLink
];
+ if ($this->config->GetSameTab()) {
+ $params["editorConfig"]["customization"]["goback"]["blank"] = false;
+ }
}
$params = $this->setCustomization($params);
@@ -522,7 +543,12 @@ class EditorController extends Controller {
return [NULL, $this->trans->t("You do not have enough permissions to view the file")];
}
- $node = $share->getNode();
+ try {
+ $node = $share->getNode();
+ } catch (NotFoundException $e) {
+ $this->logger->error("getFileByToken error: " . $e->getMessage(), array("app" => $this->appName));
+ return [NULL, $this->trans->t("File not found")];
+ }
if ($node instanceof Folder) {
$file = $node->getById($fileId)[0];
@@ -545,7 +571,14 @@ class EditorController extends Controller {
return [NULL, $this->trans->t("FileId is empty")];
}
- $share = $this->shareManager->getShareByToken($token);
+ $share;
+ try {
+ $share = $this->shareManager->getShareByToken($token);
+ } catch (ShareNotFound $e) {
+ $this->logger->error("getShare error: " . $e->getMessage(), array("app" => $this->appName));
+ $share = NULL;
+ }
+
if ($share === NULL || $share === false) {
return [NULL, $this->trans->t("You do not have enough permissions to view the file")];
}
diff --git a/controller/settingscontroller.php b/controller/settingscontroller.php
index f8175c5..39d3621 100644
--- a/controller/settingscontroller.php
+++ b/controller/settingscontroller.php
@@ -3,24 +3,27 @@
*
* (c) Copyright Ascensio System Limited 2010-2018
*
- * This program is freeware. You can redistribute it and/or modify it under the terms of the GNU
- * General Public License (GPL) version 3 as published by the Free Software Foundation (https://www.gnu.org/copyleft/gpl.html).
- * In accordance with Section 7(a) of the GNU GPL its Section 15 shall be amended to the effect that
- * Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights.
+ * 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
+ * (AGPL) version 3 as published by the Free Software Foundation.
+ * In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
+ * that Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights.
*
- * THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR
- * FITNESS FOR A PARTICULAR PURPOSE. For more details, see GNU GPL at https://www.gnu.org/copyleft/gpl.html
+ * This program is distributed WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * For details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
- * You can contact Ascensio System SIA by email at sales@onlyoffice.com
+ * You can contact Ascensio System SIA at 17-2 Elijas street, Riga, Latvia, EU, LV-1021.
*
- * The interactive user interfaces in modified source and object code versions of ONLYOFFICE must display
- * Appropriate Legal Notices, as required under Section 5 of the GNU GPL version 3.
+ * The interactive user interfaces in modified source and object code versions of the Program
+ * must display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3.
*
- * Pursuant to Section 7 § 3(b) of the GNU GPL you must retain the original ONLYOFFICE logo which contains
- * relevant author attributions when distributing the software. If the display of the logo in its graphic
- * form is not reasonably feasible for technical reasons, you must include the words "Powered by ONLYOFFICE"
- * in every copy of the program you distribute.
- * Pursuant to Section 7 § 3(e) we decline to grant you any rights under trademark law for use of our trademarks.
+ * Pursuant to Section 7(b) of the License you must retain the original Product logo when distributing the program.
+ * Pursuant to Section 7(e) we decline to grant you any rights under trademark law for use of our trademarks.
+ *
+ * All the Product's GUI elements, including illustrations and icon sets, as well as technical
+ * writing content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International.
+ * See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
@@ -110,21 +113,13 @@ class SettingsController extends Controller {
* @return TemplateResponse
*/
public function index() {
- $formats = $this->formats();
- $defFormats = array();
- foreach ($formats as $format => $setting) {
- if (array_key_exists("edit", $setting) && $setting["edit"]) {
- $defFormats[$format] = array_key_exists("def", $setting) && $setting["def"];
- }
- }
-
$data = [
"documentserver" => $this->config->GetDocumentServerUrl(),
"documentserverInternal" => $this->config->GetDocumentServerInternalUrl(true),
"storageUrl" => $this->config->GetStorageUrl(),
"secret" => $this->config->GetDocumentServerSecret(),
"currentServer" => $this->urlGenerator->getAbsoluteURL("/"),
- "defFormats" => $defFormats,
+ "formats" => $this->formats(),
"sameTab" => $this->config->GetSameTab(),
"encryption" => $this->checkEncryptionModule()
];
@@ -203,13 +198,12 @@ class SettingsController extends Controller {
* @NoAdminRequired
*/
private function formats() {
- $defFormats = $this->config->GetDefaultFormats();
-
$result = $this->config->formats;
- foreach ($result as $format => $setting) {
- if (array_key_exists("edit", $setting) && $setting["edit"]
- && array_key_exists($format, $defFormats)) {
- $result[$format]["def"] = ($defFormats[$format] === true || $defFormats[$format] === "true");
+
+ $defFormats = $this->config->GetDefaultFormats();
+ foreach ($defFormats as $format => $setting) {
+ if (array_key_exists($format, $result)) {
+ $result[$format]["def"] = ($setting === true || $setting === "true");
}
}
@@ -227,11 +221,34 @@ class SettingsController extends Controller {
private function checkDocServiceUrl() {
try {
+ $documentServerUrl = $this->config->GetDocumentServerUrl();
if (substr($this->urlGenerator->getAbsoluteURL("/"), 0, strlen("https")) === "https"
- && substr($this->config->GetDocumentServerUrl("/"), 0, strlen("https")) !== "https") {
+ && preg_match("/^https?:\/\//i", $documentServerUrl)
+ && substr($documentServerUrl, 0, strlen("https")) !== "https") {
throw new \Exception($this->trans->t("Mixed Active Content is not allowed. HTTPS address for Document Server is required."));
}
+ } catch (\Exception $e) {
+ $this->logger->error("Protocol on check error: " . $e->getMessage(), array("app" => $this->appName));
+ return $e->getMessage();
+ }
+
+ try {
+
+ $documentService = new DocumentService($this->trans, $this->config);
+
+ $healthcheckResponse = $documentService->HealthcheckRequest();
+ if (!$healthcheckResponse) {
+ throw new \Exception($this->trans->t("Bad healthcheck status"));
+ }
+
+ } catch (\Exception $e) {
+ $this->logger->error("HealthcheckRequest on check error: " . $e->getMessage(), array("app" => $this->appName));
+ return $e->getMessage();
+ }
+
+ try {
+
$documentService = new DocumentService($this->trans, $this->config);
$commandResponse = $documentService->CommandRequest("version");
@@ -247,16 +264,33 @@ class SettingsController extends Controller {
throw new \Exception($this->trans->t("Not supported version"));
}
+ } catch (\Exception $e) {
+ $this->logger->error("CommandRequest on check error: " . $e->getMessage(), array("app" => $this->appName));
+ return $e->getMessage();
+ }
+
+ $convertedFileUri;
+ try {
+
$hashUrl = $this->crypt->GetHash(["action" => "empty"]);
$fileUrl = $this->urlGenerator->linkToRouteAbsolute($this->appName . ".callback.emptyfile", ["doc" => $hashUrl]);
if (!empty($this->config->GetStorageUrl())) {
$fileUrl = str_replace($this->urlGenerator->getAbsoluteURL("/"), $this->config->GetStorageUrl(), $fileUrl);
}
- $documentService->GetConvertedUri($fileUrl, "docx", "docx", "check_" . rand());
+ $convertedFileUri = $documentService->GetConvertedUri($fileUrl, "docx", "docx", "check_" . rand());
} catch (\Exception $e) {
- $this->logger->error("CommandRequest on check error: " . $e->getMessage(), array("app" => $this->appName));
+ $this->logger->error("GetConvertedUri on check error: " . $e->getMessage(), array("app" => $this->appName));
+ return $e->getMessage();
+ }
+
+ try {
+ if ($documentService->Request($convertedFileUri) === FALSE) {
+ throw new \Exception($this->trans->t("Error occurred in the document service"));
+ }
+ } catch (\Exception $e) {
+ $this->logger->error("Request converted file on check error: " . $convertedFileUri . " " . $e->getMessage(), array("app" => $this->appName));
return $e->getMessage();
}
diff --git a/css/editor.css b/css/editor.css
index 758ac6d..7d74b5c 100644
--- a/css/editor.css
+++ b/css/editor.css
@@ -2,24 +2,27 @@
*
* (c) Copyright Ascensio System Limited 2010-2018
*
- * This program is freeware. You can redistribute it and/or modify it under the terms of the GNU
- * General Public License (GPL) version 3 as published by the Free Software Foundation (https://www.gnu.org/copyleft/gpl.html).
- * In accordance with Section 7(a) of the GNU GPL its Section 15 shall be amended to the effect that
- * Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights.
+ * 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
+ * (AGPL) version 3 as published by the Free Software Foundation.
+ * In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
+ * that Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights.
*
- * THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR
- * FITNESS FOR A PARTICULAR PURPOSE. For more details, see GNU GPL at https://www.gnu.org/copyleft/gpl.html
+ * This program is distributed WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * For details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
- * You can contact Ascensio System SIA by email at sales@onlyoffice.com
+ * You can contact Ascensio System SIA at 17-2 Elijas street, Riga, Latvia, EU, LV-1021.
*
- * The interactive user interfaces in modified source and object code versions of ONLYOFFICE must display
- * Appropriate Legal Notices, as required under Section 5 of the GNU GPL version 3.
+ * The interactive user interfaces in modified source and object code versions of the Program
+ * must display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3.
*
- * Pursuant to Section 7 § 3(b) of the GNU GPL you must retain the original ONLYOFFICE logo which contains
- * relevant author attributions when distributing the software. If the display of the logo in its graphic
- * form is not reasonably feasible for technical reasons, you must include the words "Powered by ONLYOFFICE"
- * in every copy of the program you distribute.
- * Pursuant to Section 7 § 3(e) we decline to grant you any rights under trademark law for use of our trademarks.
+ * Pursuant to Section 7(b) of the License you must retain the original Product logo when distributing the program.
+ * Pursuant to Section 7(e) we decline to grant you any rights under trademark law for use of our trademarks.
+ *
+ * All the Product's GUI elements, including illustrations and icon sets, as well as technical
+ * writing content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International.
+ * See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
diff --git a/css/main.css b/css/main.css
index 9f4fb11..40cbb0c 100644
--- a/css/main.css
+++ b/css/main.css
@@ -2,24 +2,27 @@
*
* (c) Copyright Ascensio System Limited 2010-2018
*
- * This program is freeware. You can redistribute it and/or modify it under the terms of the GNU
- * General Public License (GPL) version 3 as published by the Free Software Foundation (https://www.gnu.org/copyleft/gpl.html).
- * In accordance with Section 7(a) of the GNU GPL its Section 15 shall be amended to the effect that
- * Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights.
+ * 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
+ * (AGPL) version 3 as published by the Free Software Foundation.
+ * In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
+ * that Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights.
*
- * THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR
- * FITNESS FOR A PARTICULAR PURPOSE. For more details, see GNU GPL at https://www.gnu.org/copyleft/gpl.html
+ * This program is distributed WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * For details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
- * You can contact Ascensio System SIA by email at sales@onlyoffice.com
+ * You can contact Ascensio System SIA at 17-2 Elijas street, Riga, Latvia, EU, LV-1021.
*
- * The interactive user interfaces in modified source and object code versions of ONLYOFFICE must display
- * Appropriate Legal Notices, as required under Section 5 of the GNU GPL version 3.
+ * The interactive user interfaces in modified source and object code versions of the Program
+ * must display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3.
*
- * Pursuant to Section 7 § 3(b) of the GNU GPL you must retain the original ONLYOFFICE logo which contains
- * relevant author attributions when distributing the software. If the display of the logo in its graphic
- * form is not reasonably feasible for technical reasons, you must include the words "Powered by ONLYOFFICE"
- * in every copy of the program you distribute.
- * Pursuant to Section 7 § 3(e) we decline to grant you any rights under trademark law for use of our trademarks.
+ * Pursuant to Section 7(b) of the License you must retain the original Product logo when distributing the program.
+ * Pursuant to Section 7(e) we decline to grant you any rights under trademark law for use of our trademarks.
+ *
+ * All the Product's GUI elements, including illustrations and icon sets, as well as technical
+ * writing content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International.
+ * See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
diff --git a/css/settings.css b/css/settings.css
index e960290..bda57ac 100644
--- a/css/settings.css
+++ b/css/settings.css
@@ -2,24 +2,27 @@
*
* (c) Copyright Ascensio System Limited 2010-2018
*
- * This program is freeware. You can redistribute it and/or modify it under the terms of the GNU
- * General Public License (GPL) version 3 as published by the Free Software Foundation (https://www.gnu.org/copyleft/gpl.html).
- * In accordance with Section 7(a) of the GNU GPL its Section 15 shall be amended to the effect that
- * Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights.
+ * 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
+ * (AGPL) version 3 as published by the Free Software Foundation.
+ * In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
+ * that Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights.
*
- * THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR
- * FITNESS FOR A PARTICULAR PURPOSE. For more details, see GNU GPL at https://www.gnu.org/copyleft/gpl.html
+ * This program is distributed WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * For details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
- * You can contact Ascensio System SIA by email at sales@onlyoffice.com
+ * You can contact Ascensio System SIA at 17-2 Elijas street, Riga, Latvia, EU, LV-1021.
*
- * The interactive user interfaces in modified source and object code versions of ONLYOFFICE must display
- * Appropriate Legal Notices, as required under Section 5 of the GNU GPL version 3.
+ * The interactive user interfaces in modified source and object code versions of the Program
+ * must display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3.
*
- * Pursuant to Section 7 § 3(b) of the GNU GPL you must retain the original ONLYOFFICE logo which contains
- * relevant author attributions when distributing the software. If the display of the logo in its graphic
- * form is not reasonably feasible for technical reasons, you must include the words "Powered by ONLYOFFICE"
- * in every copy of the program you distribute.
- * Pursuant to Section 7 § 3(e) we decline to grant you any rights under trademark law for use of our trademarks.
+ * Pursuant to Section 7(b) of the License you must retain the original Product logo when distributing the program.
+ * Pursuant to Section 7(e) we decline to grant you any rights under trademark law for use of our trademarks.
+ *
+ * All the Product's GUI elements, including illustrations and icon sets, as well as technical
+ * writing content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International.
+ * See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
@@ -46,3 +49,8 @@
.onlyoffice-error {
color: red;
}
+.onlyoffice-exts {
+ column-width: 100px;
+ -moz-column-width: 100px;
+ -webkit-column-width: 100px;
+}
diff --git a/js/editor.js b/js/editor.js
index 803edee..dee29c1 100644
--- a/js/editor.js
+++ b/js/editor.js
@@ -2,24 +2,27 @@
*
* (c) Copyright Ascensio System Limited 2010-2018
*
- * This program is freeware. You can redistribute it and/or modify it under the terms of the GNU
- * General Public License (GPL) version 3 as published by the Free Software Foundation (https://www.gnu.org/copyleft/gpl.html).
- * In accordance with Section 7(a) of the GNU GPL its Section 15 shall be amended to the effect that
- * Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights.
+ * 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
+ * (AGPL) version 3 as published by the Free Software Foundation.
+ * In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
+ * that Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights.
*
- * THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR
- * FITNESS FOR A PARTICULAR PURPOSE. For more details, see GNU GPL at https://www.gnu.org/copyleft/gpl.html
+ * This program is distributed WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * For details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
- * You can contact Ascensio System SIA by email at sales@onlyoffice.com
+ * You can contact Ascensio System SIA at 17-2 Elijas street, Riga, Latvia, EU, LV-1021.
*
- * The interactive user interfaces in modified source and object code versions of ONLYOFFICE must display
- * Appropriate Legal Notices, as required under Section 5 of the GNU GPL version 3.
+ * The interactive user interfaces in modified source and object code versions of the Program
+ * must display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3.
*
- * Pursuant to Section 7 § 3(b) of the GNU GPL you must retain the original ONLYOFFICE logo which contains
- * relevant author attributions when distributing the software. If the display of the logo in its graphic
- * form is not reasonably feasible for technical reasons, you must include the words "Powered by ONLYOFFICE"
- * in every copy of the program you distribute.
- * Pursuant to Section 7 § 3(e) we decline to grant you any rights under trademark law for use of our trademarks.
+ * Pursuant to Section 7(b) of the License you must retain the original Product logo when distributing the program.
+ * Pursuant to Section 7(e) we decline to grant you any rights under trademark law for use of our trademarks.
+ *
+ * All the Product's GUI elements, including illustrations and icon sets, as well as technical
+ * writing content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International.
+ * See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
@@ -44,13 +47,13 @@
return;
}
- if (typeof DocsAPI === "undefined" && !error.length) {
+ if (typeof DocsAPI === "undefined") {
displayError(t(OCA.Onlyoffice.AppName, "ONLYOFFICE cannot be reached. Please contact admin"));
return;
}
$.ajax({
- url: OC.generateUrl("apps/onlyoffice/ajax/config/" + fileId + (fileToken ? "?token=" + encodeURIComponent(fileToken) : "")),
+ url: OC.generateUrl("apps/onlyoffice/ajax/config/" + (fileId || 0) + (fileToken ? "?token=" + encodeURIComponent(fileToken) : "")),
success: function onSuccess(config) {
if (config) {
if (config.error != null) {
diff --git a/js/main.js b/js/main.js
index bf81776..e87de71 100644
--- a/js/main.js
+++ b/js/main.js
@@ -2,24 +2,27 @@
*
* (c) Copyright Ascensio System Limited 2010-2018
*
- * This program is freeware. You can redistribute it and/or modify it under the terms of the GNU
- * General Public License (GPL) version 3 as published by the Free Software Foundation (https://www.gnu.org/copyleft/gpl.html).
- * In accordance with Section 7(a) of the GNU GPL its Section 15 shall be amended to the effect that
- * Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights.
+ * 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
+ * (AGPL) version 3 as published by the Free Software Foundation.
+ * In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
+ * that Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights.
*
- * THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR
- * FITNESS FOR A PARTICULAR PURPOSE. For more details, see GNU GPL at https://www.gnu.org/copyleft/gpl.html
+ * This program is distributed WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * For details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
- * You can contact Ascensio System SIA by email at sales@onlyoffice.com
+ * You can contact Ascensio System SIA at 17-2 Elijas street, Riga, Latvia, EU, LV-1021.
*
- * The interactive user interfaces in modified source and object code versions of ONLYOFFICE must display
- * Appropriate Legal Notices, as required under Section 5 of the GNU GPL version 3.
+ * The interactive user interfaces in modified source and object code versions of the Program
+ * must display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3.
*
- * Pursuant to Section 7 § 3(b) of the GNU GPL you must retain the original ONLYOFFICE logo which contains
- * relevant author attributions when distributing the software. If the display of the logo in its graphic
- * form is not reasonably feasible for technical reasons, you must include the words "Powered by ONLYOFFICE"
- * in every copy of the program you distribute.
- * Pursuant to Section 7 § 3(e) we decline to grant you any rights under trademark law for use of our trademarks.
+ * Pursuant to Section 7(b) of the License you must retain the original Product logo when distributing the program.
+ * Pursuant to Section 7(e) we decline to grant you any rights under trademark law for use of our trademarks.
+ *
+ * All the Product's GUI elements, including illustrations and icon sets, as well as technical
+ * writing content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International.
+ * See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
@@ -80,7 +83,7 @@
});
if ($("#isPublic").val()) {
- url += "?token=" + encodeURIComponent($("#sharingToken").val());
+ url = OC.generateUrl("apps/" + OCA.Onlyoffice.AppName + "/s/" + encodeURIComponent($("#sharingToken").val())) + "?fileId=" + fileId;
}
if (winEditor && winEditor.location) {
@@ -92,44 +95,36 @@
}
};
- OCA.Onlyoffice.FileClick = function (fileName, context, attr) {
+ OCA.Onlyoffice.FileClick = function (fileName, context) {
+ var fileInfoModel = context.fileInfoModel || context.fileList.getModelForFile(fileName);
+ OCA.Onlyoffice.OpenEditor(fileInfoModel.id);
+ };
+
+ OCA.Onlyoffice.FileConvertClick = function (fileName, context) {
var fileInfoModel = context.fileInfoModel || context.fileList.getModelForFile(fileName);
var fileList = context.fileList;
- if (!attr.conv || (fileList.dirInfo.permissions & OC.PERMISSION_CREATE) !== OC.PERMISSION_CREATE || $("#isPublic").val()) {
- OCA.Onlyoffice.OpenEditor(fileInfoModel.id);
- return;
- }
- OC.dialogs.confirm(t(OCA.Onlyoffice.AppName, "The document file you open will be converted to the Office Open XML format for faster viewing and editing."),
- t(OCA.Onlyoffice.AppName, "Convert and open document"),
- function (convert) {
- if (!convert) {
- OCA.Onlyoffice.OpenEditor(fileInfoModel.id);
+ $.post(OC.generateUrl("apps/" + OCA.Onlyoffice.AppName + "/ajax/convert"),
+ {
+ fileId: fileInfoModel.id
+ },
+ function onSuccess(response) {
+ if (response.error) {
+ var row = OC.Notification.show(response.error);
+ setTimeout(function () {
+ OC.Notification.hide(row);
+ }, 3000);
return;
}
- $.post(OC.generateUrl("apps/" + OCA.Onlyoffice.AppName + "/ajax/convert"),
- {
- fileId: fileInfoModel.id
- },
- function onSuccess(response) {
- if (response.error) {
- var row = OC.Notification.show(response.error);
- setTimeout(function () {
- OC.Notification.hide(row);
- }, 3000);
- return;
- }
-
- if (response.parentId == fileList.dirInfo.id) {
- fileList.add(response, { animate: true });
- }
-
- var row = OC.Notification.show(t(OCA.Onlyoffice.AppName, "File created"));
- setTimeout(function () {
- OC.Notification.hide(row);
- }, 3000);
- });
+ if (response.parentId == fileList.dirInfo.id) {
+ fileList.add(response, { animate: true });
+ }
+
+ var row = OC.Notification.show(t(OCA.Onlyoffice.AppName, "File created"));
+ setTimeout(function () {
+ OC.Notification.hide(row);
+ }, 3000);
});
};
@@ -169,14 +164,25 @@
icon: function () {
return OC.imagePath(OCA.Onlyoffice.AppName, "app-dark");
},
- actionHandler: function (fileName, context) {
- OCA.Onlyoffice.FileClick(fileName, context, attr);
- }
+ actionHandler: OCA.Onlyoffice.FileClick
});
if (attr.def) {
fileList.fileActions.setDefault(attr.mime, "onlyofficeOpen");
}
+
+ if (!$("#isPublic").val() && attr.conv) {
+ fileList.fileActions.registerAction({
+ name: "onlyofficeConvert",
+ displayName: t(OCA.Onlyoffice.AppName, "Convert with ONLYOFFICE"),
+ mime: attr.mime,
+ permissions: OC.PERMISSION_READ,
+ icon: function () {
+ return OC.imagePath(OCA.Onlyoffice.AppName, "app-dark");
+ },
+ actionHandler: OCA.Onlyoffice.FileConvertClick
+ });
+ }
});
}
@@ -230,7 +236,7 @@
var initPage = function(){
if ($("#isPublic").val() && !$("#dir").val().length) {
var fileName = $("#filename").val();
- var extension = fileName.substr(fileName.lastIndexOf(".") + 1);
+ var extension = fileName.substr(fileName.lastIndexOf(".") + 1).toLowerCase();
var initSharedButton = function() {
var mimes = OCA.Onlyoffice.setting.formats;
diff --git a/js/settings.js b/js/settings.js
index 2839347..3bcc1bb 100644
--- a/js/settings.js
+++ b/js/settings.js
@@ -2,24 +2,27 @@
*
* (c) Copyright Ascensio System Limited 2010-2018
*
- * This program is freeware. You can redistribute it and/or modify it under the terms of the GNU
- * General Public License (GPL) version 3 as published by the Free Software Foundation (https://www.gnu.org/copyleft/gpl.html).
- * In accordance with Section 7(a) of the GNU GPL its Section 15 shall be amended to the effect that
- * Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights.
+ * 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
+ * (AGPL) version 3 as published by the Free Software Foundation.
+ * In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
+ * that Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights.
*
- * THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR
- * FITNESS FOR A PARTICULAR PURPOSE. For more details, see GNU GPL at https://www.gnu.org/copyleft/gpl.html
+ * This program is distributed WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * For details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
- * You can contact Ascensio System SIA by email at sales@onlyoffice.com
+ * You can contact Ascensio System SIA at 17-2 Elijas street, Riga, Latvia, EU, LV-1021.
*
- * The interactive user interfaces in modified source and object code versions of ONLYOFFICE must display
- * Appropriate Legal Notices, as required under Section 5 of the GNU GPL version 3.
+ * The interactive user interfaces in modified source and object code versions of the Program
+ * must display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3.
*
- * Pursuant to Section 7 § 3(b) of the GNU GPL you must retain the original ONLYOFFICE logo which contains
- * relevant author attributions when distributing the software. If the display of the logo in its graphic
- * form is not reasonably feasible for technical reasons, you must include the words "Powered by ONLYOFFICE"
- * in every copy of the program you distribute.
- * Pursuant to Section 7 § 3(e) we decline to grant you any rights under trademark law for use of our trademarks.
+ * Pursuant to Section 7(b) of the License you must retain the original Product logo when distributing the program.
+ * Pursuant to Section 7(e) we decline to grant you any rights under trademark law for use of our trademarks.
+ *
+ * All the Product's GUI elements, including illustrations and icon sets, as well as technical
+ * writing content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International.
+ * See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
diff --git a/l10n/de.js b/l10n/de.js
index 360368c..99905c9 100644
--- a/l10n/de.js
+++ b/l10n/de.js
@@ -1,4 +1,4 @@
-OC.L10N.register(
+OC.L10N.register(
"onlyoffice",
{
"Access deny" : "Zugriff verweigern",
@@ -8,23 +8,22 @@ OC.L10N.register(
"Not permitted" : "Nicht erlaubt",
"Download failed" : "Download fehlgeschlagen",
"The required folder was not found" : "Der gewünschte Ordner wurde nicht gefunden",
- "You don't have enough permission to create" : "Sie haben nicht genug Berechtigung zum Erstellen",
+ "You don't have enough permission to create" : "Du hast nicht genug Berechtigung zum Erstellen",
"Template not found" : "Vorlage nicht gefunden",
"Can't create file" : "Datei kann nicht erstellt werden",
"Format do not supported" : "Dateiformat wird nicht unterstützt",
"Conversion not required" : "Umsetzung ist nicht erforderlich",
"Failed download converted file" : "Fehler beim Herunterladen der konvertierten Datei",
- "ONLYOFFICE app not configured. Please contact admin" : "ONLYOFFICE App ist nicht konfiguriert. Bitte wenden Sie sich an Ihren Administrator",
+ "ONLYOFFICE app not configured. Please contact admin" : "ONLYOFFICE App ist nicht konfiguriert. Bitte wende Dich an Deinen Administrator",
"FileId is empty" : "Datei-ID ist leer",
- "You do not have enough permissions to view the file" : "Sie haben nicht genug Berechtigungen zum Ansehen der Datei",
+ "You do not have enough permissions to view the file" : "Du hast nicht genug Berechtigungen zum Ansehen der Datei",
"Error occurred in the document service" : "Im Dokumentenservice ist ein Fehler aufgetreten",
"Not supported version" : "Nicht unterstützte Version",
- "ONLYOFFICE not reached. Please contact admin" : "ONLYOFFICE ist zurzeit nicht erreichbar. Bitte wenden Sie sich an Ihren Administrator",
+ "ONLYOFFICE not reached. Please contact admin" : "ONLYOFFICE ist zurzeit nicht erreichbar. Bitte wende Dich an Deinen Administrator",
"Loading, please wait." : "Laden... Bitte warten.",
"File created" : "Erstellte Datei",
- "The document file you open will be converted to the Office Open XML format for faster viewing and editing." : "Das aktuell geöffnete Dokument wird in ein Office Open XML Dateiformat für schnellere Ansicht und Bearbeitung konvertiert.",
- "Convert and open document" : "Dokument konvertieren und öffnen",
"Open in ONLYOFFICE" : "In ONLYOFFICE öffnen",
+ "Convert with ONLYOFFICE" : "Mit ONLYOFFICE umwandeln",
"Document" : "Dokument",
"Spreadsheet" : "Tabelle",
"Presentation" : "Präsentation",
@@ -34,8 +33,8 @@ OC.L10N.register(
"Server can't read xml" : "Server kann eine xml-Datei nicht einlesen",
"Bad Response. Errors: " : "Bad Response. Fehler:",
"Documentation" : "Dokumentation",
- "ONLYOFFICE Document Service Location specifies the address of the server with the document services installed. Please change the '<documentserver>' for the server address in the below line." : "ONLYOFFICE Document Servicestandort gibt die Adresse des Servers mit den installierten Dokumentdiensten an. Bitte ändern Sie '<documenterver>' für die Serveradresse in der folgenden Zeile.",
- "Encryption App is enabled, the application cannot work. You can continue working with the application if you enable master key." : "App Verschlüsselung ist aktiviert. Die Anwendung kann nicht funktionieren. Sie können mit der Anwendung weiterarbeiten, wenn Sie den Hauptschlüssel aktivieren.",
+ "ONLYOFFICE Document Service Location specifies the address of the server with the document services installed. Please change the '<documentserver>' for the server address in the below line." : "ONLYOFFICE Document Servicestandort gibt die Adresse des Servers mit den installierten Dokumentdiensten an. Ändere bitte '<documenterver>' für die Serveradresse in der folgenden Zeile.",
+ "Encryption App is enabled, the application cannot work. You can continue working with the application if you enable master key." : "App Verschlüsselung ist aktiviert. Die Anwendung kann nicht funktionieren. Du kannst mit der Anwendung weiterarbeiten, wenn Du den Hauptschlüssel aktivierst.",
"Document Editing Service address" : "Serviceadresse der Dokumentbearbeitung",
"Advanced server settings" : "Erweiterte Servereinstellungen",
"Document Editing Service address for internal requests from the server" : "Serviceadresse der Dokumentbearbeitung für interne Anforderungen vom Server",
diff --git a/l10n/de.json b/l10n/de.json
index 2d7d9bd..bf6bd41 100644
--- a/l10n/de.json
+++ b/l10n/de.json
@@ -1,4 +1,4 @@
-{ "translations": {
+{ "translations": {
"Access deny" : "Zugriff verweigern",
"Invalid request" : "Ungültige Anfrage",
"Files not found" : "Dateien nicht gefunden",
@@ -6,23 +6,22 @@
"Not permitted" : "Nicht erlaubt",
"Download failed" : "Download fehlgeschlagen",
"The required folder was not found" : "Der gewünschte Ordner wurde nicht gefunden",
- "You don't have enough permission to create" : "Sie haben nicht genug Berechtigung zum Erstellen",
+ "You don't have enough permission to create" : "Du hast nicht genug Berechtigung zum Erstellen",
"Template not found" : "Vorlage nicht gefunden",
"Can't create file" : "Datei kann nicht erstellt werden",
"Format do not supported" : "Dateiformat wird nicht unterstützt",
"Conversion not required" : "Umsetzung ist nicht erforderlich",
"Failed download converted file" : "Fehler beim Herunterladen der konvertierten Datei",
- "ONLYOFFICE app not configured. Please contact admin" : "ONLYOFFICE App ist nicht konfiguriert. Bitte wenden Sie sich an Ihren Administrator",
+ "ONLYOFFICE app not configured. Please contact admin" : "ONLYOFFICE App ist nicht konfiguriert. Bitte wende Dich an Deinen Administrator",
"FileId is empty" : "Datei-ID ist leer",
- "You do not have enough permissions to view the file" : "Sie haben nicht genug Berechtigungen zum Ansehen der Datei",
+ "You do not have enough permissions to view the file" : "Du hast nicht genug Berechtigungen zum Ansehen der Datei",
"Error occurred in the document service" : "Im Dokumentenservice ist ein Fehler aufgetreten",
"Not supported version" : "Nicht unterstützte Version",
- "ONLYOFFICE not reached. Please contact admin" : "ONLYOFFICE ist zurzeit nicht erreichbar. Bitte wenden Sie sich an Ihren Administrator",
+ "ONLYOFFICE not reached. Please contact admin" : "ONLYOFFICE ist zurzeit nicht erreichbar. Bitte wende Dich an Deinen Administrator",
"Loading, please wait." : "Laden... Bitte warten.",
"File created" : "Erstellte Datei",
- "The document file you open will be converted to the Office Open XML format for faster viewing and editing." : "Das aktuell geöffnete Dokument wird in ein Office Open XML Dateiformat für schnellere Ansicht und Bearbeitung konvertiert.",
- "Convert and open document" : "Dokument konvertieren und öffnen",
"Open in ONLYOFFICE" : "In ONLYOFFICE öffnen",
+ "Convert with ONLYOFFICE" : "Mit ONLYOFFICE umwandeln",
"Document" : "Dokument",
"Spreadsheet" : "Tabelle",
"Presentation" : "Präsentation",
@@ -32,8 +31,8 @@
"Server can't read xml" : "Server kann eine xml-Datei nicht einlesen",
"Bad Response. Errors: " : "Bad Response. Fehler:",
"Documentation" : "Dokumentation",
- "ONLYOFFICE Document Service Location specifies the address of the server with the document services installed. Please change the '<documentserver>' for the server address in the below line." : "ONLYOFFICE Document Servicestandort gibt die Adresse des Servers mit den installierten Dokumentdiensten an. Bitte ändern Sie '<documenterver>' für die Serveradresse in der folgenden Zeile.",
- "Encryption App is enabled, the application cannot work. You can continue working with the application if you enable master key." : "App Verschlüsselung ist aktiviert. Die Anwendung kann nicht funktionieren. Sie können mit der Anwendung weiterarbeiten, wenn Sie den Hauptschlüssel aktivieren.",
+ "ONLYOFFICE Document Service Location specifies the address of the server with the document services installed. Please change the '<documentserver>' for the server address in the below line." : "ONLYOFFICE Document Servicestandort gibt die Adresse des Servers mit den installierten Dokumentdiensten an. Ändere bitte '<documenterver>' für die Serveradresse in der folgenden Zeile.",
+ "Encryption App is enabled, the application cannot work. You can continue working with the application if you enable master key." : "App Verschlüsselung ist aktiviert. Die Anwendung kann nicht funktionieren. Du kannst mit der Anwendung weiterarbeiten, wenn Du den Hauptschlüssel aktivierst.",
"Document Editing Service address" : "Serviceadresse der Dokumentbearbeitung",
"Advanced server settings" : "Erweiterte Servereinstellungen",
"Document Editing Service address for internal requests from the server" : "Serviceadresse der Dokumentbearbeitung für interne Anforderungen vom Server",
diff --git a/l10n/de_DE.js b/l10n/de_DE.js
new file mode 100644
index 0000000..5538e9e
--- /dev/null
+++ b/l10n/de_DE.js
@@ -0,0 +1,48 @@
+OC.L10N.register(
+ "onlyoffice",
+ {
+ "Access deny" : "Zugriff verweigern",
+ "Invalid request" : "Ungültige Anfrage",
+ "Files not found" : "Dateien nicht gefunden",
+ "File not found" : "Datei nicht gefunden",
+ "Not permitted" : "Nicht erlaubt",
+ "Download failed" : "Download fehlgeschlagen",
+ "The required folder was not found" : "Der gewünschte Ordner wurde nicht gefunden",
+ "You don't have enough permission to create" : "Sie haben nicht genug Berechtigung zum Erstellen",
+ "Template not found" : "Vorlage nicht gefunden",
+ "Can't create file" : "Datei kann nicht erstellt werden",
+ "Format do not supported" : "Dateiformat wird nicht unterstützt",
+ "Conversion not required" : "Umsetzung ist nicht erforderlich",
+ "Failed download converted file" : "Fehler beim Herunterladen der konvertierten Datei",
+ "ONLYOFFICE app not configured. Please contact admin" : "ONLYOFFICE App ist nicht konfiguriert. Bitte wenden Sie sich an Ihren Administrator",
+ "FileId is empty" : "Datei-ID ist leer",
+ "You do not have enough permissions to view the file" : "Sie haben nicht genug Berechtigungen zum Ansehen der Datei",
+ "Error occurred in the document service" : "Im Dokumentenservice ist ein Fehler aufgetreten",
+ "Not supported version" : "Nicht unterstützte Version",
+ "ONLYOFFICE not reached. Please contact admin" : "ONLYOFFICE ist zurzeit nicht erreichbar. Bitte wenden Sie sich an Ihren Administrator",
+ "Loading, please wait." : "Laden... Bitte warten.",
+ "File created" : "Erstellte Datei",
+ "Open in ONLYOFFICE" : "In ONLYOFFICE öffnen",
+ "Convert with ONLYOFFICE" : "Mit ONLYOFFICE umwandeln",
+ "Document" : "Dokument",
+ "Spreadsheet" : "Tabelle",
+ "Presentation" : "Präsentation",
+ "Error when trying to connect" : "Fehler beim Anschließen",
+ "Settings have been successfully updated" : "Einstellungen wurden erfolgreich aktualisiert",
+ "Bad Request or timeout error" : "Bad Request oder Timeout Fehlermeldung",
+ "Server can't read xml" : "Server kann eine xml-Datei nicht einlesen",
+ "Bad Response. Errors: " : "Bad Response. Fehler:",
+ "Documentation" : "Dokumentation",
+ "ONLYOFFICE Document Service Location specifies the address of the server with the document services installed. Please change the '<documentserver>' for the server address in the below line." : "ONLYOFFICE Document Servicestandort gibt die Adresse des Servers mit den installierten Dokumentdiensten an. Bitte ändern Sie '<documenterver>' für die Serveradresse in der folgenden Zeile.",
+ "Encryption App is enabled, the application cannot work. You can continue working with the application if you enable master key." : "App Verschlüsselung ist aktiviert. Die Anwendung kann nicht funktionieren. Sie können mit der Anwendung weiterarbeiten, wenn Sie den Hauptschlüssel aktivieren.",
+ "Document Editing Service address" : "Serviceadresse der Dokumentbearbeitung",
+ "Advanced server settings" : "Erweiterte Servereinstellungen",
+ "Document Editing Service address for internal requests from the server" : "Serviceadresse der Dokumentbearbeitung für interne Anforderungen vom Server",
+ "Server address for internal requests from the Document Editing Service" : "Serveradresse für interne Anforderungen vom Dokumentbearbeitung-Service",
+ "Secret key (leave blank to disable)" : "Geheimer Schlüssel (freilassen, um zu deaktivieren)",
+ "Open file in the same tab" : "Datei in der gleichen Registerkarte öffnen",
+ "The default application for opening the format" : "Die Standardanwendung zum Öffnen des Formats",
+ "Save" : "Speichern",
+ "Mixed Active Content is not allowed. HTTPS address for Document Server is required." : "Mixed Active Content ist nicht möglich. HTTPS-Adresse für Document Server ist erforderlich."
+},
+"nplurals=2; plural=(n != 1);");
diff --git a/l10n/de_DE.json b/l10n/de_DE.json
new file mode 100644
index 0000000..3f12625
--- /dev/null
+++ b/l10n/de_DE.json
@@ -0,0 +1,46 @@
+{ "translations": {
+ "Access deny" : "Zugriff verweigern",
+ "Invalid request" : "Ungültige Anfrage",
+ "Files not found" : "Dateien nicht gefunden",
+ "File not found" : "Datei nicht gefunden",
+ "Not permitted" : "Nicht erlaubt",
+ "Download failed" : "Download fehlgeschlagen",
+ "The required folder was not found" : "Der gewünschte Ordner wurde nicht gefunden",
+ "You don't have enough permission to create" : "Sie haben nicht genug Berechtigung zum Erstellen",
+ "Template not found" : "Vorlage nicht gefunden",
+ "Can't create file" : "Datei kann nicht erstellt werden",
+ "Format do not supported" : "Dateiformat wird nicht unterstützt",
+ "Conversion not required" : "Umsetzung ist nicht erforderlich",
+ "Failed download converted file" : "Fehler beim Herunterladen der konvertierten Datei",
+ "ONLYOFFICE app not configured. Please contact admin" : "ONLYOFFICE App ist nicht konfiguriert. Bitte wenden Sie sich an Ihren Administrator",
+ "FileId is empty" : "Datei-ID ist leer",
+ "You do not have enough permissions to view the file" : "Sie haben nicht genug Berechtigungen zum Ansehen der Datei",
+ "Error occurred in the document service" : "Im Dokumentenservice ist ein Fehler aufgetreten",
+ "Not supported version" : "Nicht unterstützte Version",
+ "ONLYOFFICE not reached. Please contact admin" : "ONLYOFFICE ist zurzeit nicht erreichbar. Bitte wenden Sie sich an Ihren Administrator",
+ "Loading, please wait." : "Laden... Bitte warten.",
+ "File created" : "Erstellte Datei",
+ "Open in ONLYOFFICE" : "In ONLYOFFICE öffnen",
+ "Convert with ONLYOFFICE" : "Mit ONLYOFFICE umwandeln",
+ "Document" : "Dokument",
+ "Spreadsheet" : "Tabelle",
+ "Presentation" : "Präsentation",
+ "Error when trying to connect" : "Fehler beim Anschließen",
+ "Settings have been successfully updated" : "Einstellungen wurden erfolgreich aktualisiert",
+ "Bad Request or timeout error" : "Bad Request oder Timeout Fehlermeldung",
+ "Server can't read xml" : "Server kann eine xml-Datei nicht einlesen",
+ "Bad Response. Errors: " : "Bad Response. Fehler:",
+ "Documentation" : "Dokumentation",
+ "ONLYOFFICE Document Service Location specifies the address of the server with the document services installed. Please change the '<documentserver>' for the server address in the below line." : "ONLYOFFICE Document Servicestandort gibt die Adresse des Servers mit den installierten Dokumentdiensten an. Bitte ändern Sie '<documenterver>' für die Serveradresse in der folgenden Zeile.",
+ "Encryption App is enabled, the application cannot work. You can continue working with the application if you enable master key." : "App Verschlüsselung ist aktiviert. Die Anwendung kann nicht funktionieren. Sie können mit der Anwendung weiterarbeiten, wenn Sie den Hauptschlüssel aktivieren.",
+ "Document Editing Service address" : "Serviceadresse der Dokumentbearbeitung",
+ "Advanced server settings" : "Erweiterte Servereinstellungen",
+ "Document Editing Service address for internal requests from the server" : "Serviceadresse der Dokumentbearbeitung für interne Anforderungen vom Server",
+ "Server address for internal requests from the Document Editing Service" : "Serveradresse für interne Anforderungen vom Dokumentbearbeitung-Service",
+ "Secret key (leave blank to disable)" : "Geheimer Schlüssel (freilassen, um zu deaktivieren)",
+ "Open file in the same tab" : "Datei in der gleichen Registerkarte öffnen",
+ "The default application for opening the format" : "Die Standardanwendung zum Öffnen des Formats",
+ "Save" : "Speichern",
+ "Mixed Active Content is not allowed. HTTPS address for Document Server is required." : "Mixed Active Content ist nicht möglich. HTTPS-Adresse für Document Server ist erforderlich."
+},"pluralForm" :"nplurals=2; plural=(n != 1);"
+} \ No newline at end of file
diff --git a/l10n/es.js b/l10n/es.js
index b630e42..ce0b556 100644
--- a/l10n/es.js
+++ b/l10n/es.js
@@ -22,9 +22,8 @@ OC.L10N.register(
"ONLYOFFICE cannot be reached. Please contact admin" : "No se puede acceder al ONLYOFFICE. Por favor, contacte con admin",
"Loading, please wait." : "Cargando, espere, por favor.",
"File created" : "Archivo creado",
- "The document file you open will be converted to the Office Open XML format for faster viewing and editing." : "El archivo de documento que Usted abre será convertido en el formato Office Open XML para visualización y edición más rápida.",
- "Convert and open document" : "Convertir y abrir documento",
"Open in ONLYOFFICE" : "Abrir en ONLYOFFICE",
+ "Convert with ONLYOFFICE" : "Convertir con ONLYOFFICE",
"Document" : "Documento",
"Spreadsheet" : "Hoja de cálculo",
"Presentation" : "Presentación",
diff --git a/l10n/es.json b/l10n/es.json
index 972e145..3ac89ad 100644
--- a/l10n/es.json
+++ b/l10n/es.json
@@ -20,9 +20,8 @@
"ONLYOFFICE cannot be reached. Please contact admin" : "No se puede acceder al ONLYOFFICE. Por favor, contacte con admin",
"Loading, please wait." : "Cargando, espere, por favor.",
"File created" : "Archivo creado",
- "The document file you open will be converted to the Office Open XML format for faster viewing and editing." : "El archivo de documento que Usted abre será convertido en el formato Office Open XML para visualización y edición más rápida.",
- "Convert and open document" : "Convertir y abrir documento",
"Open in ONLYOFFICE" : "Abrir en ONLYOFFICE",
+ "Convert with ONLYOFFICE" : "Convertir con ONLYOFFICE",
"Document" : "Documento",
"Spreadsheet" : "Hoja de cálculo",
"Presentation" : "Presentación",
diff --git a/l10n/pt_BR.js b/l10n/pt_BR.js
index 580207e..0910c03 100644
--- a/l10n/pt_BR.js
+++ b/l10n/pt_BR.js
@@ -22,9 +22,8 @@ OC.L10N.register(
"ONLYOFFICE cannot be reached. Please contact admin" : "Não foi possível conectar ao ONLYOFFICE. Favor contatar o administrador.",
"Loading, please wait." : "Carregando, por favor aguarde.",
"File created" : "Arquivo criado",
- "The document file you open will be converted to the Office Open XML format for faster viewing and editing." : "O documento será convertido para o formato Office Open XML para melhor edição e visualização.",
- "Convert and open document" : "Converter e abrir o documento",
"Open in ONLYOFFICE" : "Abrir no ONLYOFFICE",
+ "Convert with ONLYOFFICE" : "Converta com ONLYOFFICE",
"Document" : "Documento",
"Spreadsheet" : "Planilha",
"Presentation" : "Apresentação",
diff --git a/l10n/pt_BR.json b/l10n/pt_BR.json
index 943df08..fd294aa 100644
--- a/l10n/pt_BR.json
+++ b/l10n/pt_BR.json
@@ -20,9 +20,8 @@
"ONLYOFFICE cannot be reached. Please contact admin" : "Não foi possível conectar ao ONLYOFFICE. Favor contatar o administrador.",
"Loading, please wait." : "Carregando, por favor aguarde.",
"File created" : "Arquivo criado",
- "The document file you open will be converted to the Office Open XML format for faster viewing and editing." : "O documento será convertido para o formato Office Open XML para melhor edição e visualização.",
- "Convert and open document" : "Converter e abrir o documento",
"Open in ONLYOFFICE" : "Abrir no ONLYOFFICE",
+ "Convert with ONLYOFFICE" : "Converta com ONLYOFFICE",
"Document" : "Documento",
"Spreadsheet" : "Planilha",
"Presentation" : "Apresentação",
diff --git a/l10n/ru.js b/l10n/ru.js
index f5105c2..1289d5f 100644
--- a/l10n/ru.js
+++ b/l10n/ru.js
@@ -22,9 +22,8 @@ OC.L10N.register(
"ONLYOFFICE cannot be reached. Please contact admin" : "Приложение ONLYOFFICE недоступно. Пожалуйста, свяжитесь с администратором",
"Loading, please wait." : "Загрузка. Пожалуйста, подождите.",
"File created" : "Файл создан",
- "The document file you open will be converted to the Office Open XML format for faster viewing and editing." : "Открываемый файл документа будет преобразован в формат Office Open XML для быстрого просмотра и редактирования.",
- "Convert and open document" : "Преобразовать и открыть документ",
"Open in ONLYOFFICE" : "Открыть в ONLYOFFICE",
+ "Convert with ONLYOFFICE" : "Конвертировать в ONLYOFFICE",
"Document" : "Документ",
"Spreadsheet" : "Электронная таблица",
"Presentation" : "Презентация",
diff --git a/l10n/ru.json b/l10n/ru.json
index 395357f..dd931cf 100644
--- a/l10n/ru.json
+++ b/l10n/ru.json
@@ -20,9 +20,8 @@
"ONLYOFFICE cannot be reached. Please contact admin" : "Приложение ONLYOFFICE недоступно. Пожалуйста, свяжитесь с администратором",
"Loading, please wait." : "Загрузка. Пожалуйста, подождите.",
"File created" : "Файл создан",
- "The document file you open will be converted to the Office Open XML format for faster viewing and editing." : "Открываемый файл документа будет преобразован в формат Office Open XML для быстрого просмотра и редактирования.",
- "Convert and open document" : "Преобразовать и открыть документ",
"Open in ONLYOFFICE" : "Открыть в ONLYOFFICE",
+ "Convert with ONLYOFFICE" : "Конвертировать в ONLYOFFICE",
"Document" : "Документ",
"Spreadsheet" : "Электронная таблица",
"Presentation" : "Презентация",
diff --git a/lib/adminsection.php b/lib/adminsection.php
index e2e1c91..d182c71 100644
--- a/lib/adminsection.php
+++ b/lib/adminsection.php
@@ -3,24 +3,27 @@
*
* (c) Copyright Ascensio System Limited 2010-2018
*
- * This program is freeware. You can redistribute it and/or modify it under the terms of the GNU
- * General Public License (GPL) version 3 as published by the Free Software Foundation (https://www.gnu.org/copyleft/gpl.html).
- * In accordance with Section 7(a) of the GNU GPL its Section 15 shall be amended to the effect that
- * Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights.
+ * 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
+ * (AGPL) version 3 as published by the Free Software Foundation.
+ * In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
+ * that Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights.
*
- * THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR
- * FITNESS FOR A PARTICULAR PURPOSE. For more details, see GNU GPL at https://www.gnu.org/copyleft/gpl.html
+ * This program is distributed WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * For details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
- * You can contact Ascensio System SIA by email at sales@onlyoffice.com
+ * You can contact Ascensio System SIA at 17-2 Elijas street, Riga, Latvia, EU, LV-1021.
*
- * The interactive user interfaces in modified source and object code versions of ONLYOFFICE must display
- * Appropriate Legal Notices, as required under Section 5 of the GNU GPL version 3.
+ * The interactive user interfaces in modified source and object code versions of the Program
+ * must display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3.
*
- * Pursuant to Section 7 § 3(b) of the GNU GPL you must retain the original ONLYOFFICE logo which contains
- * relevant author attributions when distributing the software. If the display of the logo in its graphic
- * form is not reasonably feasible for technical reasons, you must include the words "Powered by ONLYOFFICE"
- * in every copy of the program you distribute.
- * Pursuant to Section 7 § 3(e) we decline to grant you any rights under trademark law for use of our trademarks.
+ * Pursuant to Section 7(b) of the License you must retain the original Product logo when distributing the program.
+ * Pursuant to Section 7(e) we decline to grant you any rights under trademark law for use of our trademarks.
+ *
+ * All the Product's GUI elements, including illustrations and icon sets, as well as technical
+ * writing content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International.
+ * See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
diff --git a/lib/adminsettings.php b/lib/adminsettings.php
index 211c6ed..9f96d86 100644
--- a/lib/adminsettings.php
+++ b/lib/adminsettings.php
@@ -3,24 +3,27 @@
*
* (c) Copyright Ascensio System Limited 2010-2018
*
- * This program is freeware. You can redistribute it and/or modify it under the terms of the GNU
- * General Public License (GPL) version 3 as published by the Free Software Foundation (https://www.gnu.org/copyleft/gpl.html).
- * In accordance with Section 7(a) of the GNU GPL its Section 15 shall be amended to the effect that
- * Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights.
+ * 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
+ * (AGPL) version 3 as published by the Free Software Foundation.
+ * In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
+ * that Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights.
*
- * THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR
- * FITNESS FOR A PARTICULAR PURPOSE. For more details, see GNU GPL at https://www.gnu.org/copyleft/gpl.html
+ * This program is distributed WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * For details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
- * You can contact Ascensio System SIA by email at sales@onlyoffice.com
+ * You can contact Ascensio System SIA at 17-2 Elijas street, Riga, Latvia, EU, LV-1021.
*
- * The interactive user interfaces in modified source and object code versions of ONLYOFFICE must display
- * Appropriate Legal Notices, as required under Section 5 of the GNU GPL version 3.
+ * The interactive user interfaces in modified source and object code versions of the Program
+ * must display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3.
*
- * Pursuant to Section 7 § 3(b) of the GNU GPL you must retain the original ONLYOFFICE logo which contains
- * relevant author attributions when distributing the software. If the display of the logo in its graphic
- * form is not reasonably feasible for technical reasons, you must include the words "Powered by ONLYOFFICE"
- * in every copy of the program you distribute.
- * Pursuant to Section 7 § 3(e) we decline to grant you any rights under trademark law for use of our trademarks.
+ * Pursuant to Section 7(b) of the License you must retain the original Product logo when distributing the program.
+ * Pursuant to Section 7(e) we decline to grant you any rights under trademark law for use of our trademarks.
+ *
+ * All the Product's GUI elements, including illustrations and icon sets, as well as technical
+ * writing content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International.
+ * See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
diff --git a/lib/appconfig.php b/lib/appconfig.php
index 02f497e..07df837 100644
--- a/lib/appconfig.php
+++ b/lib/appconfig.php
@@ -3,24 +3,27 @@
*
* (c) Copyright Ascensio System Limited 2010-2018
*
- * This program is freeware. You can redistribute it and/or modify it under the terms of the GNU
- * General Public License (GPL) version 3 as published by the Free Software Foundation (https://www.gnu.org/copyleft/gpl.html).
- * In accordance with Section 7(a) of the GNU GPL its Section 15 shall be amended to the effect that
- * Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights.
+ * 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
+ * (AGPL) version 3 as published by the Free Software Foundation.
+ * In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
+ * that Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights.
*
- * THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR
- * FITNESS FOR A PARTICULAR PURPOSE. For more details, see GNU GPL at https://www.gnu.org/copyleft/gpl.html
+ * This program is distributed WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * For details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
- * You can contact Ascensio System SIA by email at sales@onlyoffice.com
+ * You can contact Ascensio System SIA at 17-2 Elijas street, Riga, Latvia, EU, LV-1021.
*
- * The interactive user interfaces in modified source and object code versions of ONLYOFFICE must display
- * Appropriate Legal Notices, as required under Section 5 of the GNU GPL version 3.
+ * The interactive user interfaces in modified source and object code versions of the Program
+ * must display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3.
*
- * Pursuant to Section 7 § 3(b) of the GNU GPL you must retain the original ONLYOFFICE logo which contains
- * relevant author attributions when distributing the software. If the display of the logo in its graphic
- * form is not reasonably feasible for technical reasons, you must include the words "Powered by ONLYOFFICE"
- * in every copy of the program you distribute.
- * Pursuant to Section 7 § 3(e) we decline to grant you any rights under trademark law for use of our trademarks.
+ * Pursuant to Section 7(b) of the License you must retain the original Product logo when distributing the program.
+ * Pursuant to Section 7(e) we decline to grant you any rights under trademark law for use of our trademarks.
+ *
+ * All the Product's GUI elements, including illustrations and icon sets, as well as technical
+ * writing content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International.
+ * See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
@@ -435,33 +438,45 @@ class AppConfig {
* @var array
*/
public $formats = [
- "docx" => [ "mime" => "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "type" => "text", "edit" => true, "def" => true ],
- "xlsx" => [ "mime" => "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "type" => "spreadsheet", "edit" => true, "def" => true ],
- "pptx" => [ "mime" => "application/vnd.openxmlformats-officedocument.presentationml.presentation", "type" => "presentation", "edit" => true, "def" => true ],
- "ppsx" => [ "mime" => "application/vnd.openxmlformats-officedocument.presentationml.slideshow", "type" => "presentation", "edit" => true, "def" => true ],
- "txt" => [ "mime" => "text/plain", "type" => "text", "edit" => true ],
"csv" => [ "mime" => "text/csv", "type" => "spreadsheet", "edit" => true ],
- "docm" => [ "mime" => "application/vnd.ms-word.document.macroEnabled.12", "type" => "text", "conv" => true ],
- "xlsm" => [ "mime" => "application/vnd.ms-excel.sheet.macroEnabled.12", "type" => "spreadsheet", "conv" => true ],
- "xltx" => [ "mime" => "application/vnd.openxmlformats-officedocument.spreadsheetml.template", "type" => "spreadsheet", "conv" => true ],
- "xltm" => [ "mime" => "application/vnd.ms-excel.template.macroEnabled.12", "type" => "spreadsheet", "conv" => true ],
- "pptm" => [ "mime" => "application/vnd.ms-powerpoint.presentation.macroEnabled.12", "type" => "presentation", "conv" => true ],
- "ppsm" => [ "mime" => "application/vnd.ms-powerpoint.slideshow.macroEnabled.12", "type" => "presentation", "conv" => true ],
- "potx" => [ "mime" => "application/vnd.openxmlformats-officedocument.presentationml.template", "type" => "presentation", "conv" => true ],
- "potm" => [ "mime" => "application/vnd.ms-powerpoint.template.macroEnabled.12", "type" => "presentation", "conv" => true ],
- "odt" => [ "mime" => "application/vnd.oasis.opendocument.text", "type" => "text", "conv" => true ],
- "ods" => [ "mime" => "application/vnd.oasis.opendocument.spreadsheet", "type" => "spreadsheet", "conv" => true ],
- "odp" => [ "mime" => "application/vnd.oasis.opendocument.presentation", "type" => "presentation", "conv" => true ],
+ "djvu" => [ "mime" => "image/vnd.djvu", "type" => "text" ],
"doc" => [ "mime" => "application/msword", "type" => "text", "conv" => true ],
- "xls" => [ "mime" => "application/vnd.ms-excel", "type" => "spreadsheet", "conv" => true ],
- "ppt" => [ "mime" => "application/vnd.ms-powerpoint", "type" => "presentation", "conv" => true ],
+ "docm" => [ "mime" => "application/vnd.ms-word.document.macroEnabled.12", "type" => "text", "conv" => true ],
+ "docx" => [ "mime" => "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "type" => "text", "edit" => true, "def" => true ],
+ "dot" => [ "mime" => "application/msword", "type" => "text", "conv" => true ],
+ "dotm" => [ "mime" => "application/vnd.ms-word.template.macroEnabled.12", "type" => "text", "conv" => true ],
+ "dotx" => [ "mime" => "application/vnd.openxmlformats-officedocument.wordprocessingml.template", "type" => "text", "conv" => true ],
"epub" => [ "mime" => "application/epub+zip", "type" => "text", "conv" => true ],
- "rtf" => [ "mime" => "text/rtf", "type" => "text", "type" => "text", "conv" => true ],
- "mht" => [ "mime" => "message/rfc822", "conv" => true ],
- "html" => [ "mime" => "text/html", "type" => "text", "conv" => true ],
+ "fodp" => [ "mime" => "application/vnd.oasis.opendocument.presentation", "type" => "presentation", "conv" => true ],
+ "fods" => [ "mime" => "application/vnd.oasis.opendocument.spreadsheet", "type" => "spreadsheet", "conv" => true ],
+ "fodt" => [ "mime" => "application/vnd.oasis.opendocument.text", "type" => "text", "conv" => true ],
"htm" => [ "mime" => "text/html", "type" => "text", "conv" => true ],
- "xps" => [ "mime" => "application/vnd.ms-xpsdocument", "type" => "text" ],
+ "html" => [ "mime" => "text/html", "type" => "text", "conv" => true ],
+ "mht" => [ "mime" => "message/rfc822", "conv" => true ],
+ "odp" => [ "mime" => "application/vnd.oasis.opendocument.presentation", "type" => "presentation", "conv" => true ],
+ "ods" => [ "mime" => "application/vnd.oasis.opendocument.spreadsheet", "type" => "spreadsheet", "conv" => true ],
+ "odt" => [ "mime" => "application/vnd.oasis.opendocument.text", "type" => "text", "conv" => true ],
+ "otp" => [ "mime" => "application/vnd.oasis.opendocument.presentation-template", "type" => "presentation", "conv" => true ],
+ "ots" => [ "mime" => "application/vnd.oasis.opendocument.spreadsheet-template", "type" => "spreadsheet", "conv" => true ],
+ "ott" => [ "mime" => "application/vnd.oasis.opendocument.text-template", "type" => "text", "conv" => true ],
"pdf" => [ "mime" => "application/pdf", "type" => "text" ],
- "djvu" => [ "mime" => "image/vnd.djvu", "type" => "text" ]
+ "pot" => [ "mime" => "application/mspowerpoint", "type" => "presentation", "conv" => true ],
+ "potm" => [ "mime" => "application/vnd.ms-powerpoint.template.macroEnabled.12", "type" => "presentation", "conv" => true ],
+ "potx" => [ "mime" => "application/vnd.openxmlformats-officedocument.presentationml.template", "type" => "presentation", "conv" => true ],
+ "pps" => [ "mime" => "application/vnd.ms-powerpoint", "type" => "presentation", "conv" => true ],
+ "ppsm" => [ "mime" => "application/vnd.ms-powerpoint.slideshow.macroEnabled.12", "type" => "presentation", "conv" => true ],
+ "ppsx" => [ "mime" => "application/vnd.openxmlformats-officedocument.presentationml.slideshow", "type" => "presentation", "edit" => true, "def" => true ],
+ "ppt" => [ "mime" => "application/vnd.ms-powerpoint", "type" => "presentation", "conv" => true ],
+ "pptm" => [ "mime" => "application/vnd.ms-powerpoint.presentation.macroEnabled.12", "type" => "presentation", "conv" => true ],
+ "pptx" => [ "mime" => "application/vnd.openxmlformats-officedocument.presentationml.presentation", "type" => "presentation", "edit" => true, "def" => true ],
+ "rtf" => [ "mime" => "text/rtf", "type" => "text", "conv" => true ],
+ "txt" => [ "mime" => "text/plain", "type" => "text", "edit" => true ],
+ "xls" => [ "mime" => "application/vnd.ms-excel", "type" => "spreadsheet", "conv" => true ],
+ "xlsm" => [ "mime" => "application/vnd.ms-excel.sheet.macroEnabled.12", "type" => "spreadsheet", "conv" => true ],
+ "xlsx" => [ "mime" => "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "type" => "spreadsheet", "edit" => true, "def" => true ],
+ "xlt" => [ "mime" => "application/excel", "type" => "spreadsheet", "conv" => true ],
+ "xltm" => [ "mime" => "application/vnd.ms-excel.template.macroEnabled.12", "type" => "spreadsheet", "conv" => true ],
+ "xltx" => [ "mime" => "application/vnd.openxmlformats-officedocument.spreadsheetml.template", "type" => "spreadsheet", "conv" => true ],
+ "xps" => [ "mime" => "application/vnd.ms-xpsdocument", "type" => "text" ]
];
}
diff --git a/lib/crypt.php b/lib/crypt.php
index 9c31e66..b7790ff 100644
--- a/lib/crypt.php
+++ b/lib/crypt.php
@@ -3,24 +3,27 @@
*
* (c) Copyright Ascensio System Limited 2010-2018
*
- * This program is freeware. You can redistribute it and/or modify it under the terms of the GNU
- * General Public License (GPL) version 3 as published by the Free Software Foundation (https://www.gnu.org/copyleft/gpl.html).
- * In accordance with Section 7(a) of the GNU GPL its Section 15 shall be amended to the effect that
- * Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights.
+ * 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
+ * (AGPL) version 3 as published by the Free Software Foundation.
+ * In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
+ * that Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights.
*
- * THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR
- * FITNESS FOR A PARTICULAR PURPOSE. For more details, see GNU GPL at https://www.gnu.org/copyleft/gpl.html
+ * This program is distributed WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * For details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
- * You can contact Ascensio System SIA by email at sales@onlyoffice.com
+ * You can contact Ascensio System SIA at 17-2 Elijas street, Riga, Latvia, EU, LV-1021.
*
- * The interactive user interfaces in modified source and object code versions of ONLYOFFICE must display
- * Appropriate Legal Notices, as required under Section 5 of the GNU GPL version 3.
+ * The interactive user interfaces in modified source and object code versions of the Program
+ * must display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3.
*
- * Pursuant to Section 7 § 3(b) of the GNU GPL you must retain the original ONLYOFFICE logo which contains
- * relevant author attributions when distributing the software. If the display of the logo in its graphic
- * form is not reasonably feasible for technical reasons, you must include the words "Powered by ONLYOFFICE"
- * in every copy of the program you distribute.
- * Pursuant to Section 7 § 3(e) we decline to grant you any rights under trademark law for use of our trademarks.
+ * Pursuant to Section 7(b) of the License you must retain the original Product logo when distributing the program.
+ * Pursuant to Section 7(e) we decline to grant you any rights under trademark law for use of our trademarks.
+ *
+ * All the Product's GUI elements, including illustrations and icon sets, as well as technical
+ * writing content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International.
+ * See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
diff --git a/lib/documentservice.php b/lib/documentservice.php
index 6c78abc..621b02c 100644
--- a/lib/documentservice.php
+++ b/lib/documentservice.php
@@ -3,24 +3,27 @@
*
* (c) Copyright Ascensio System Limited 2010-2018
*
- * This program is freeware. You can redistribute it and/or modify it under the terms of the GNU
- * General Public License (GPL) version 3 as published by the Free Software Foundation (https://www.gnu.org/copyleft/gpl.html).
- * In accordance with Section 7(a) of the GNU GPL its Section 15 shall be amended to the effect that
- * Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights.
+ * 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
+ * (AGPL) version 3 as published by the Free Software Foundation.
+ * In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
+ * that Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights.
*
- * THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR
- * FITNESS FOR A PARTICULAR PURPOSE. For more details, see GNU GPL at https://www.gnu.org/copyleft/gpl.html
+ * This program is distributed WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * For details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
- * You can contact Ascensio System SIA by email at sales@onlyoffice.com
+ * You can contact Ascensio System SIA at 17-2 Elijas street, Riga, Latvia, EU, LV-1021.
*
- * The interactive user interfaces in modified source and object code versions of ONLYOFFICE must display
- * Appropriate Legal Notices, as required under Section 5 of the GNU GPL version 3.
+ * The interactive user interfaces in modified source and object code versions of the Program
+ * must display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3.
*
- * Pursuant to Section 7 § 3(b) of the GNU GPL you must retain the original ONLYOFFICE logo which contains
- * relevant author attributions when distributing the software. If the display of the logo in its graphic
- * form is not reasonably feasible for technical reasons, you must include the words "Powered by ONLYOFFICE"
- * in every copy of the program you distribute.
- * Pursuant to Section 7 § 3(e) we decline to grant you any rights under trademark law for use of our trademarks.
+ * Pursuant to Section 7(b) of the License you must retain the original Product logo when distributing the program.
+ * Pursuant to Section 7(e) we decline to grant you any rights under trademark law for use of our trademarks.
+ *
+ * All the Product's GUI elements, including illustrations and icon sets, as well as technical
+ * writing content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International.
+ * See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
@@ -246,6 +249,33 @@ class DocumentService {
}
/**
+ * Request health status
+ *
+ * @return boolean
+ */
+ function HealthcheckRequest() {
+
+ $documentServerUrl = $this->config->GetDocumentServerInternalUrl(false);
+
+ if (empty($documentServerUrl)) {
+ throw new \Exception($this->trans->t("ONLYOFFICE app is not configured. Please contact admin"));
+ }
+
+ $urlHealthcheck = $documentServerUrl . "healthcheck";
+
+ $opts = array("http" => array(
+ "timeout" => "60"
+ )
+ );
+
+ if (($response = $this->Request($urlHealthcheck, $opts)) === FALSE) {
+ throw new \Exception ($this->trans->t("Bad Request or timeout error"));
+ }
+
+ return $response === "true";
+ }
+
+ /**
* Send command
*
* @param string $method - type of command
diff --git a/settings.php b/settings.php
index a592d4d..ceeb6be 100644
--- a/settings.php
+++ b/settings.php
@@ -3,24 +3,27 @@
*
* (c) Copyright Ascensio System Limited 2010-2018
*
- * This program is freeware. You can redistribute it and/or modify it under the terms of the GNU
- * General Public License (GPL) version 3 as published by the Free Software Foundation (https://www.gnu.org/copyleft/gpl.html).
- * In accordance with Section 7(a) of the GNU GPL its Section 15 shall be amended to the effect that
- * Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights.
+ * 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
+ * (AGPL) version 3 as published by the Free Software Foundation.
+ * In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
+ * that Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights.
*
- * THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR
- * FITNESS FOR A PARTICULAR PURPOSE. For more details, see GNU GPL at https://www.gnu.org/copyleft/gpl.html
+ * This program is distributed WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * For details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
- * You can contact Ascensio System SIA by email at sales@onlyoffice.com
+ * You can contact Ascensio System SIA at 17-2 Elijas street, Riga, Latvia, EU, LV-1021.
*
- * The interactive user interfaces in modified source and object code versions of ONLYOFFICE must display
- * Appropriate Legal Notices, as required under Section 5 of the GNU GPL version 3.
+ * The interactive user interfaces in modified source and object code versions of the Program
+ * must display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3.
*
- * Pursuant to Section 7 § 3(b) of the GNU GPL you must retain the original ONLYOFFICE logo which contains
- * relevant author attributions when distributing the software. If the display of the logo in its graphic
- * form is not reasonably feasible for technical reasons, you must include the words "Powered by ONLYOFFICE"
- * in every copy of the program you distribute.
- * Pursuant to Section 7 § 3(e) we decline to grant you any rights under trademark law for use of our trademarks.
+ * Pursuant to Section 7(b) of the License you must retain the original Product logo when distributing the program.
+ * Pursuant to Section 7(e) we decline to grant you any rights under trademark law for use of our trademarks.
+ *
+ * All the Product's GUI elements, including illustrations and icon sets, as well as technical
+ * writing content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International.
+ * See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
diff --git a/templates/editor.php b/templates/editor.php
index 6bc02fb..3be8b52 100644
--- a/templates/editor.php
+++ b/templates/editor.php
@@ -3,24 +3,27 @@
*
* (c) Copyright Ascensio System Limited 2010-2018
*
- * This program is freeware. You can redistribute it and/or modify it under the terms of the GNU
- * General Public License (GPL) version 3 as published by the Free Software Foundation (https://www.gnu.org/copyleft/gpl.html).
- * In accordance with Section 7(a) of the GNU GPL its Section 15 shall be amended to the effect that
- * Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights.
+ * 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
+ * (AGPL) version 3 as published by the Free Software Foundation.
+ * In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
+ * that Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights.
*
- * THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR
- * FITNESS FOR A PARTICULAR PURPOSE. For more details, see GNU GPL at https://www.gnu.org/copyleft/gpl.html
+ * This program is distributed WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * For details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
- * You can contact Ascensio System SIA by email at sales@onlyoffice.com
+ * You can contact Ascensio System SIA at 17-2 Elijas street, Riga, Latvia, EU, LV-1021.
*
- * The interactive user interfaces in modified source and object code versions of ONLYOFFICE must display
- * Appropriate Legal Notices, as required under Section 5 of the GNU GPL version 3.
+ * The interactive user interfaces in modified source and object code versions of the Program
+ * must display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3.
*
- * Pursuant to Section 7 § 3(b) of the GNU GPL you must retain the original ONLYOFFICE logo which contains
- * relevant author attributions when distributing the software. If the display of the logo in its graphic
- * form is not reasonably feasible for technical reasons, you must include the words "Powered by ONLYOFFICE"
- * in every copy of the program you distribute.
- * Pursuant to Section 7 § 3(e) we decline to grant you any rights under trademark law for use of our trademarks.
+ * Pursuant to Section 7(b) of the License you must retain the original Product logo when distributing the program.
+ * Pursuant to Section 7(e) we decline to grant you any rights under trademark law for use of our trademarks.
+ *
+ * All the Product's GUI elements, including illustrations and icon sets, as well as technical
+ * writing content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International.
+ * See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
diff --git a/templates/settings.php b/templates/settings.php
index dbe2a2f..f9e99ec 100644
--- a/templates/settings.php
+++ b/templates/settings.php
@@ -3,24 +3,27 @@
*
* (c) Copyright Ascensio System Limited 2010-2018
*
- * This program is freeware. You can redistribute it and/or modify it under the terms of the GNU
- * General Public License (GPL) version 3 as published by the Free Software Foundation (https://www.gnu.org/copyleft/gpl.html).
- * In accordance with Section 7(a) of the GNU GPL its Section 15 shall be amended to the effect that
- * Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights.
+ * 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
+ * (AGPL) version 3 as published by the Free Software Foundation.
+ * In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
+ * that Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights.
*
- * THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR
- * FITNESS FOR A PARTICULAR PURPOSE. For more details, see GNU GPL at https://www.gnu.org/copyleft/gpl.html
+ * This program is distributed WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * For details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
- * You can contact Ascensio System SIA by email at sales@onlyoffice.com
+ * You can contact Ascensio System SIA at 17-2 Elijas street, Riga, Latvia, EU, LV-1021.
*
- * The interactive user interfaces in modified source and object code versions of ONLYOFFICE must display
- * Appropriate Legal Notices, as required under Section 5 of the GNU GPL version 3.
+ * The interactive user interfaces in modified source and object code versions of the Program
+ * must display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3.
*
- * Pursuant to Section 7 § 3(b) of the GNU GPL you must retain the original ONLYOFFICE logo which contains
- * relevant author attributions when distributing the software. If the display of the logo in its graphic
- * form is not reasonably feasible for technical reasons, you must include the words "Powered by ONLYOFFICE"
- * in every copy of the program you distribute.
- * Pursuant to Section 7 § 3(e) we decline to grant you any rights under trademark law for use of our trademarks.
+ * Pursuant to Section 7(b) of the License you must retain the original Product logo when distributing the program.
+ * Pursuant to Section 7(e) we decline to grant you any rights under trademark law for use of our trademarks.
+ *
+ * All the Product's GUI elements, including illustrations and icon sets, as well as technical
+ * writing content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International.
+ * See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
@@ -64,15 +67,17 @@
<br />
<h3 class="onlyoffice-header"><?php p($l->t("The default application for opening the format")) ?></h3>
- <?php foreach ($_["defFormats"] as $format => $setting) { ?>
- <p>
- <input type="checkbox" class="checkbox"
- id="onlyofficeDefFormat<?php p($format) ?>"
- name="<?php p($format) ?>"
- <?php if ($setting) { ?>checked="checked"<?php } ?> />
- <label for="onlyofficeDefFormat<?php p($format) ?>"><?php p($format) ?></label>
- </p>
- <?php } ?>
+ <div class="onlyoffice-exts">
+ <?php foreach ($_["formats"] as $format => $setting) { ?>
+ <div>
+ <input type="checkbox" class="checkbox"
+ id="onlyofficeDefFormat<?php p($format) ?>"
+ name="<?php p($format) ?>"
+ <?php if ($setting["def"]) { ?>checked="checked"<?php } ?> />
+ <label for="onlyofficeDefFormat<?php p($format) ?>"><?php p($format) ?></label>
+ </div>
+ <?php } ?>
+ </div>
<a id="onlyofficeSave" class="button onlyoffice-header"><?php p($l->t("Save")) ?></a>
</div> \ No newline at end of file