diff --git a/CHANGELOG.md b/CHANGELOG.md index a79cf804..9fe4aad5 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 dad3e270..7e2378cb 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 f4cbcc06..7ddc0624 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 907764f4..85897576 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 e3025e4a..8c41b309 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -7,7 +7,7 @@ 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. agpl Ascensio System SIA - 1.3.0 + 1.4.0 Onlyoffice diff --git a/appinfo/routes.php b/appinfo/routes.php index 53556226..53a8c0db 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 284e7d8a..14ce9f3a 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\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 @@ public function download($doc) { 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 @@ public function download($doc) { 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 @@ public function download($doc) { 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 @@ public function download($doc) { 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 @@ public function emptyfile($doc) { 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 @@ public function emptyfile($doc) { 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 @@ public function emptyfile($doc) { 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 @@ public function track($doc, $users, $key, $status, $url) { 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 @@ public function track($doc, $users, $key, $status, $url) { 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 @@ public function track($doc, $users, $key, $status, $url) { $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 @@ public function track($doc, $users, $key, $status, $url) { 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 @@ private function getFile($userId, $fileId) { $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 @@ private function getFileByToken($fileId, $token) { 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 @@ private function getShare($token) { 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 d5a28bcf..de03e26c 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 @@ public function create($name, $dir) { $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 @@ public function create($name, $dir) { $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 @@ public function create($name, $dir) { $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 @@ public function convert($fileId) { } 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 @@ public function convert($fileId) { * @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 @@ public function index($fileId, $token = NULL) { * @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 @@ public function config($fileId, $token = NULL) { $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 @@ public function config($fileId, $token = NULL) { $params["editorConfig"]["customization"]["goback"] = [ "url" => $folderLink ]; + if ($this->config->GetSameTab()) { + $params["editorConfig"]["customization"]["goback"]["blank"] = false; + } } $params = $this->setCustomization($params); @@ -522,7 +543,12 @@ private function getFileByToken($fileId, $token) { 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 @@ private function getShare($token) { 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 f8175c50..39d3621b 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 @@ public function __construct($AppName, * @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 @@ public function GetSettings() { * @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 @@ private function formats() { 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 @@ private function checkDocServiceUrl() { 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 758ac6d0..7d74b5ca 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 9f4fb11b..40cbb0cc 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 e9602902..bda57aca 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 803edee7..dee29c11 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 bf817761..e87de710 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 2839347c..3bcc1bbc 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 360368c3..99905c93 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 '' for the server address in the below line." : "ONLYOFFICE Document Servicestandort gibt die Adresse des Servers mit den installierten Dokumentdiensten an. Bitte ändern Sie '' 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 '' for the server address in the below line." : "ONLYOFFICE Document Servicestandort gibt die Adresse des Servers mit den installierten Dokumentdiensten an. Ändere bitte '' 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 2d7d9bd8..bf6bd416 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 '' for the server address in the below line." : "ONLYOFFICE Document Servicestandort gibt die Adresse des Servers mit den installierten Dokumentdiensten an. Bitte ändern Sie '' 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 '' for the server address in the below line." : "ONLYOFFICE Document Servicestandort gibt die Adresse des Servers mit den installierten Dokumentdiensten an. Ändere bitte '' 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 00000000..5538e9e9 --- /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 '' for the server address in the below line." : "ONLYOFFICE Document Servicestandort gibt die Adresse des Servers mit den installierten Dokumentdiensten an. Bitte ändern Sie '' 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 00000000..3f126251 --- /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 '' for the server address in the below line." : "ONLYOFFICE Document Servicestandort gibt die Adresse des Servers mit den installierten Dokumentdiensten an. Bitte ändern Sie '' 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 b630e420..ce0b5563 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 972e145a..3ac89add 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 580207ee..0910c031 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 943df085..fd294aa1 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 f5105c25..1289d5f4 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 395357f6..dd931cf6 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 e2e1c912..d182c71c 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 211c6ed8..9f96d864 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 02f497e8..07df837a 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 @@ public function SettingsAreSuccessful() { * @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 9c31e661..b7790ff7 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 6c78abca..621b02cd 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 * */ @@ -245,6 +248,33 @@ function ProcessConvServResponceError($errorCode) { throw new \Exception($errorMessage); } + /** + * 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 * diff --git a/settings.php b/settings.php index a592d4d5..ceeb6bec 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 6bc02fbf..3be8b52c 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 dbe2a2f0..f9e99ec4 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 @@

t("The default application for opening the format")) ?>

- $setting) { ?> -

- checked="checked" /> - -

- +
+ $setting) { ?> +
+ checked="checked" /> + +
+ +
t("Save")) ?> \ No newline at end of file