diff --git a/CHANGELOG.md b/CHANGELOG.md index e46938dd..09bfa965 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # Change Log +## 3.0.1 +## Added +- "save as" to the folder +- inserting images from the folder +- Mail Merge +- connection to the demo server + +## Changed +- updated files for compatibility with MS Office v2016 + ## 2.3.1 ## Added - editor customization diff --git a/appinfo/app.php b/appinfo/app.php index a1febdeb..281b5c36 100644 --- a/appinfo/app.php +++ b/appinfo/app.php @@ -13,7 +13,7 @@ * 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 at 17-2 Elijas street, Riga, Latvia, EU, LV-1021. + * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha street, Riga, Latvia, EU, LV-1050. * * 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. diff --git a/appinfo/application.php b/appinfo/application.php index edc59fea..0dd63c3f 100644 --- a/appinfo/application.php +++ b/appinfo/application.php @@ -13,7 +13,7 @@ * 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 at 17-2 Elijas street, Riga, Latvia, EU, LV-1021. + * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha street, Riga, Latvia, EU, LV-1050. * * 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. diff --git a/appinfo/info.xml b/appinfo/info.xml index 15caa759..e753ca09 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -6,7 +6,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 - 2.3.1 + 3.0.1 Onlyoffice diff --git a/appinfo/routes.php b/appinfo/routes.php index c5d16c15..c5a9cf82 100644 --- a/appinfo/routes.php +++ b/appinfo/routes.php @@ -13,7 +13,7 @@ * 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 at 17-2 Elijas street, Riga, Latvia, EU, LV-1021. + * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha street, Riga, Latvia, EU, LV-1050. * * 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. @@ -37,6 +37,8 @@ ["name" => "editor#config", "url" => "/ajax/config/{fileId}", "verb" => "GET"], ["name" => "editor#create", "url" => "/ajax/new", "verb" => "POST"], ["name" => "editor#convert", "url" => "/ajax/convert", "verb" => "POST"], + ["name" => "editor#save", "url" => "/ajax/save", "verb" => "POST"], + ["name" => "editor#url", "url" => "/ajax/url", "verb" => "GET"], ["name" => "settings#save_address", "url" => "/ajax/settings/address", "verb" => "PUT"], ["name" => "settings#save_common", "url" => "/ajax/settings/common", "verb" => "PUT"], ["name" => "settings#get_settings", "url" => "/ajax/settings", "verb" => "GET"], diff --git a/assets/bg_BG/new.docx b/assets/bg_BG/new.docx index b26d3215..c528e528 100644 Binary files a/assets/bg_BG/new.docx and b/assets/bg_BG/new.docx differ diff --git a/assets/bg_BG/new.pptx b/assets/bg_BG/new.pptx index 5bf9f504..d6273aea 100644 Binary files a/assets/bg_BG/new.pptx and b/assets/bg_BG/new.pptx differ diff --git a/assets/bg_BG/new.xlsx b/assets/bg_BG/new.xlsx index 79d0e099..43095f39 100644 Binary files a/assets/bg_BG/new.xlsx and b/assets/bg_BG/new.xlsx differ diff --git a/assets/cs/new.docx b/assets/cs/new.docx index 863bb2ed..cd19d53f 100644 Binary files a/assets/cs/new.docx and b/assets/cs/new.docx differ diff --git a/assets/cs/new.pptx b/assets/cs/new.pptx index 7e678b4a..58b2f270 100644 Binary files a/assets/cs/new.pptx and b/assets/cs/new.pptx differ diff --git a/assets/de/new.docx b/assets/de/new.docx index 7697bab2..c5c6daab 100644 Binary files a/assets/de/new.docx and b/assets/de/new.docx differ diff --git a/assets/de/new.pptx b/assets/de/new.pptx index a44d78a7..44206d1e 100644 Binary files a/assets/de/new.pptx and b/assets/de/new.pptx differ diff --git a/assets/de_DE/new.docx b/assets/de_DE/new.docx index 7697bab2..c5c6daab 100644 Binary files a/assets/de_DE/new.docx and b/assets/de_DE/new.docx differ diff --git a/assets/de_DE/new.pptx b/assets/de_DE/new.pptx index a44d78a7..44206d1e 100644 Binary files a/assets/de_DE/new.pptx and b/assets/de_DE/new.pptx differ diff --git a/assets/el/new.docx b/assets/el/new.docx index b6971810..ba5d6f1d 100644 Binary files a/assets/el/new.docx and b/assets/el/new.docx differ diff --git a/assets/el/new.pptx b/assets/el/new.pptx index eaca76f5..99e52bb3 100644 Binary files a/assets/el/new.pptx and b/assets/el/new.pptx differ diff --git a/assets/en/new.docx b/assets/en/new.docx index 3433b6ee..99c1e6ed 100644 Binary files a/assets/en/new.docx and b/assets/en/new.docx differ diff --git a/assets/en/new.pptx b/assets/en/new.pptx index 904db460..f4e4bdf0 100644 Binary files a/assets/en/new.pptx and b/assets/en/new.pptx differ diff --git a/assets/en/new.xlsx b/assets/en/new.xlsx index ab1038c9..4bc868db 100644 Binary files a/assets/en/new.xlsx and b/assets/en/new.xlsx differ diff --git a/assets/es/new.docx b/assets/es/new.docx index 5354fac3..40a6fb60 100644 Binary files a/assets/es/new.docx and b/assets/es/new.docx differ diff --git a/assets/es/new.pptx b/assets/es/new.pptx index ce9934e1..7aa064e3 100644 Binary files a/assets/es/new.pptx and b/assets/es/new.pptx differ diff --git a/assets/fr/new.docx b/assets/fr/new.docx index 04cf5f9e..865113e7 100644 Binary files a/assets/fr/new.docx and b/assets/fr/new.docx differ diff --git a/assets/fr/new.pptx b/assets/fr/new.pptx index 6eaf4e03..c60475d9 100644 Binary files a/assets/fr/new.pptx and b/assets/fr/new.pptx differ diff --git a/assets/it/new.docx b/assets/it/new.docx index e84d795a..c40e4458 100644 Binary files a/assets/it/new.docx and b/assets/it/new.docx differ diff --git a/assets/it/new.pptx b/assets/it/new.pptx index 457b1a1f..739b1e85 100644 Binary files a/assets/it/new.pptx and b/assets/it/new.pptx differ diff --git a/assets/ko/new.docx b/assets/ko/new.docx index 6f331d48..bfbe0916 100644 Binary files a/assets/ko/new.docx and b/assets/ko/new.docx differ diff --git a/assets/ko/new.pptx b/assets/ko/new.pptx index 5b4ac960..d4ce7628 100644 Binary files a/assets/ko/new.pptx and b/assets/ko/new.pptx differ diff --git a/assets/nl/new.docx b/assets/nl/new.docx index c0e4917f..dc35bd39 100644 Binary files a/assets/nl/new.docx and b/assets/nl/new.docx differ diff --git a/assets/nl/new.pptx b/assets/nl/new.pptx index b28324c2..d85f5612 100644 Binary files a/assets/nl/new.pptx and b/assets/nl/new.pptx differ diff --git a/assets/nl/new.xlsx b/assets/nl/new.xlsx index 3472c3bb..a2c38912 100644 Binary files a/assets/nl/new.xlsx and b/assets/nl/new.xlsx differ diff --git a/assets/pl/new.docx b/assets/pl/new.docx index e97de5ce..9964336f 100644 Binary files a/assets/pl/new.docx and b/assets/pl/new.docx differ diff --git a/assets/pl/new.pptx b/assets/pl/new.pptx index 1686a4f7..1f543d48 100644 Binary files a/assets/pl/new.pptx and b/assets/pl/new.pptx differ diff --git a/assets/pt_BR/new.docx b/assets/pt_BR/new.docx index a924ff6b..70554fde 100644 Binary files a/assets/pt_BR/new.docx and b/assets/pt_BR/new.docx differ diff --git a/assets/pt_BR/new.pptx b/assets/pt_BR/new.pptx index 26564492..73a85ae0 100644 Binary files a/assets/pt_BR/new.pptx and b/assets/pt_BR/new.pptx differ diff --git a/assets/pt_PT/new.docx b/assets/pt_PT/new.docx index 700f7e38..ebe556f9 100644 Binary files a/assets/pt_PT/new.docx and b/assets/pt_PT/new.docx differ diff --git a/assets/pt_PT/new.pptx b/assets/pt_PT/new.pptx index 0f182340..7395b3b0 100644 Binary files a/assets/pt_PT/new.pptx and b/assets/pt_PT/new.pptx differ diff --git a/assets/ru/new.docx b/assets/ru/new.docx index 875dad53..ab7bd1ca 100644 Binary files a/assets/ru/new.docx and b/assets/ru/new.docx differ diff --git a/assets/ru/new.pptx b/assets/ru/new.pptx index 0848cb72..868a23c6 100644 Binary files a/assets/ru/new.pptx and b/assets/ru/new.pptx differ diff --git a/assets/sv/new.docx b/assets/sv/new.docx index 84a1020b..b341ecce 100644 Binary files a/assets/sv/new.docx and b/assets/sv/new.docx differ diff --git a/assets/sv/new.pptx b/assets/sv/new.pptx index f59d9bd9..55b1a817 100644 Binary files a/assets/sv/new.pptx and b/assets/sv/new.pptx differ diff --git a/assets/sv/new.xlsx b/assets/sv/new.xlsx index 3a4fac67..ce7c1b43 100644 Binary files a/assets/sv/new.xlsx and b/assets/sv/new.xlsx differ diff --git a/assets/zh_CN/new.docx b/assets/zh_CN/new.docx index d0262e2b..f74a7296 100644 Binary files a/assets/zh_CN/new.docx and b/assets/zh_CN/new.docx differ diff --git a/assets/zh_CN/new.pptx b/assets/zh_CN/new.pptx index d4b5985f..4ab6f7e3 100644 Binary files a/assets/zh_CN/new.pptx and b/assets/zh_CN/new.pptx differ diff --git a/controller/callbackcontroller.php b/controller/callbackcontroller.php index 7f1a6acb..89ec7a56 100644 --- a/controller/callbackcontroller.php +++ b/controller/callbackcontroller.php @@ -13,7 +13,7 @@ * 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 at 17-2 Elijas street, Riga, Latvia, EU, LV-1021. + * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha street, Riga, Latvia, EU, LV-1050. * * 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. @@ -346,7 +346,6 @@ public function track($doc, $users, $key, $status, $url, $token) { try { $decodedHeader = \Firebase\JWT\JWT::decode($header, $this->config->GetDocumentServerSecret(), array("HS256")); - $this->logger->debug("Track HEADER : " . json_encode($decodedHeader), array("app" => $this->appName)); $payload = $decodedHeader->payload; } catch (\UnexpectedValueException $e) { @@ -400,25 +399,11 @@ public function track($doc, $users, $key, $status, $url, $token) { list ($file, $error) = !empty($ownerId) ? $this->getFile($ownerId, $fileId) : $this->getFileByToken($fileId, $token); if (isset($error)) { - $this->logger->error("track error" . $fileId ." " . $error, array("app" => $this->appName)); + $this->logger->error("track error" . $fileId ." " . json_encode($error->getData()), array("app" => $this->appName)); return $error; } - $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; - } - - if ($from !== $documentServerUrl) - { - $this->logger->debug("Replace in track from " . $from . " to " . $documentServerUrl, array("app" => $this->appName)); - $url = str_replace($from, $documentServerUrl, $url); - } - } + $url = $this->config->ReplaceDocumentServerUrlToInternal($url); $fileName = $file->getName(); $curExt = strtolower(pathinfo($fileName, PATHINFO_EXTENSION)); @@ -453,7 +438,7 @@ public function track($doc, $users, $key, $status, $url, $token) { break; } - $this->logger->debug("Track: " . $fileId . " status " . $status . " result " . $error, array("app" => $this->appName)); + $this->logger->debug("Track: " . $fileId . " status " . $status . " result " . $result, array("app" => $this->appName)); return new JSONResponse(["error" => $result], Http::STATUS_OK); } diff --git a/controller/editorcontroller.php b/controller/editorcontroller.php index 91c40837..9fc5fff8 100644 --- a/controller/editorcontroller.php +++ b/controller/editorcontroller.php @@ -13,7 +13,7 @@ * 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 at 17-2 Elijas street, Riga, Latvia, EU, LV-1021. + * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha street, Riga, Latvia, EU, LV-1050. * * 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. @@ -221,7 +221,7 @@ public function create($name, $dir, $token = NULL) { $ext = strtolower("." . pathinfo($name, PATHINFO_EXTENSION)); - $lang = \OC::$server->getL10NFactory("")->get("")->getLanguageCode(); + $lang = $this->trans->getLanguageCode(); $templatePath = $this->getTemplatePath($lang, $ext); if (!file_exists($templatePath)) { @@ -365,6 +365,114 @@ public function convert($fileId, $token = NULL) { return $result; } + /** + * Save file to folder + * + * @param string $name - file name + * @param string $dir - folder path + * @param string $url - file url + * + * @return array + * + * @NoAdminRequired + * @PublicPage + */ + public function save($name, $dir, $url) { + $this->logger->debug("Save: " . $name, array("app" => $this->appName)); + + if (!$this->config->isUserAllowedToUse()) { + return ["error" => $this->trans->t("Not permitted")]; + } + + $userId = $this->userSession->getUser()->getUID(); + $userFolder = $this->root->getUserFolder($userId); + + $folder = $userFolder->get($dir); + + if ($folder === NULL) { + $this->logger->error("Folder for saving file was not found: " . $dir, array("app" => $this->appName)); + return ["error" => $this->trans->t("The required folder was not found")]; + } + if (!$folder->isCreatable()) { + $this->logger->error("Folder for saving file without permission: " . $dir, array("app" => $this->appName)); + return ["error" => $this->trans->t("You don't have enough permission to create")]; + } + + $url = $this->config->ReplaceDocumentServerUrlToInternal($url); + + try { + $documentService = new DocumentService($this->trans, $this->config); + $newData = $documentService->Request($url); + } catch (\Exception $e) { + $this->logger->error("Failed to download file for saving: " . $url . " " . $e->getMessage(), array("app" => $this->appName)); + return ["error" => $this->trans->t("Download failed")]; + } + + $name = $folder->getNonExistingName($name); + + try { + $file = $folder->newFile($name); + + $file->putContent($newData); + } catch (NotPermittedException $e) { + $this->logger->error("Can't save file: " . $name, array("app" => $this->appName)); + return ["error" => $this->trans->t("Can't create file")]; + } + + $fileInfo = $file->getFileInfo(); + + $result = Helper::formatFileInfo($fileInfo); + return $result; + } + + /** + * Get presigned url to file + * + * @param string $filePath - file path + * + * @return array + * + * @NoAdminRequired + */ + public function url($filePath) { + $this->logger->debug("Save: " . $name, array("app" => $this->appName)); + + if (!$this->config->isUserAllowedToUse()) { + return ["error" => $this->trans->t("Not permitted")]; + } + + $userId = $this->userSession->getUser()->getUID(); + $userFolder = $this->root->getUserFolder($userId); + + $file = $userFolder->get($filePath); + + if ($file === NULL) { + $this->logger->error("File for generate presigned url was not found: " . $dir, array("app" => $this->appName)); + return ["error" => $this->trans->t("File not found")]; + } + if (!$file->isReadable()) { + $this->logger->error("Folder for saving file without permission: " . $dir, array("app" => $this->appName)); + return ["error" => $this->trans->t("You do not have enough permissions to view the file")]; + } + + $fileName = $file->getName(); + $ext = strtolower(pathinfo($fileName, PATHINFO_EXTENSION)); + $fileId = $file->getId(); + $fileUrl = $this->getUrl($fileId); + + $result = [ + "fileType" => $ext, + "url" => $fileUrl + ]; + + if (!empty($this->config->GetDocumentServerSecret())) { + $token = \Firebase\JWT\JWT::encode($result, $this->config->GetDocumentServerSecret()); + $result["token"] = $token; + } + + return $result; + } + /** * Print editor section * @@ -491,7 +599,7 @@ public function config($fileId, $filePath = NULL, $token = NULL, $desktop = fals ], "documentType" => $format["type"], "editorConfig" => [ - "lang" => str_replace("_", "-", \OC::$server->getL10NFactory("")->get("")->getLanguageCode()) + "lang" => str_replace("_", "-", $this->trans->getLanguageCode()) ] ]; @@ -617,6 +725,10 @@ public function config($fileId, $filePath = NULL, $token = NULL, $desktop = fals $params = $this->setCustomization($params); + if ($this->config->UseDemo()) { + $params["editorConfig"]["tenant"] = $this->config->GetSystemValue("instanceid", true); + } + if (!empty($this->config->GetDocumentServerSecret())) { $token = \Firebase\JWT\JWT::encode($params, $this->config->GetDocumentServerSecret()); $params["token"] = $token; @@ -765,7 +877,7 @@ private function getShare($token) { * @return string */ private function getKey($file) { - $instanceId = $this->config->getSystemValue("instanceid", true); + $instanceId = $this->config->GetSystemValue("instanceid", true); $fileId = $file->getId(); @@ -837,27 +949,27 @@ private function setCustomization($params) { /* from system config */ - $customer = $this->config->getSystemValue($this->config->_customization_customer); + $customer = $this->config->GetSystemValue($this->config->_customization_customer); if (isset($customer)) { $params["editorConfig"]["customization"]["customer"] = $customer; } - $feedback = $this->config->getSystemValue($this->config->_customization_feedback); + $feedback = $this->config->GetSystemValue($this->config->_customization_feedback); if (isset($feedback)) { $params["editorConfig"]["customization"]["feedback"] = $feedback; } - $loaderLogo = $this->config->getSystemValue($this->config->_customization_loaderLogo); + $loaderLogo = $this->config->GetSystemValue($this->config->_customization_loaderLogo); if (isset($loaderLogo)) { $params["editorConfig"]["customization"]["loaderLogo"] = $loaderLogo; } - $loaderName = $this->config->getSystemValue($this->config->_customization_loaderName); + $loaderName = $this->config->GetSystemValue($this->config->_customization_loaderName); if (isset($loaderName)) { $params["editorConfig"]["customization"]["loaderName"] = $loaderName; } - $logo = $this->config->getSystemValue($this->config->_customization_logo); + $logo = $this->config->GetSystemValue($this->config->_customization_logo); if (isset($logo)) { $params["editorConfig"]["customization"]["logo"] = $logo; } diff --git a/controller/settingscontroller.php b/controller/settingscontroller.php index d88f212a..d4a980d2 100644 --- a/controller/settingscontroller.php +++ b/controller/settingscontroller.php @@ -13,7 +13,7 @@ * 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 at 17-2 Elijas street, Riga, Latvia, EU, LV-1021. + * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha street, Riga, Latvia, EU, LV-1050. * * 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. @@ -113,10 +113,11 @@ public function __construct($AppName, */ public function index() { $data = [ - "documentserver" => $this->config->GetDocumentServerUrl(), + "documentserver" => $this->config->GetDocumentServerUrl(true), "documentserverInternal" => $this->config->GetDocumentServerInternalUrl(true), "storageUrl" => $this->config->GetStorageUrl(), - "secret" => $this->config->GetDocumentServerSecret(), + "secret" => $this->config->GetDocumentServerSecret(true), + "demo" => $this->config->GetDemoData(), "currentServer" => $this->urlGenerator->getAbsoluteURL("/"), "formats" => $this->config->FormatsSetting(), "sameTab" => $this->config->GetSameTab(), @@ -139,39 +140,43 @@ public function index() { * @param string $documentserverInternal - document service address available from ownCloud * @param string $storageUrl - ownCloud address available from document server * @param string $secret - secret key for signature - * @param array $defFormats - formats array with default action - * @param array $editFormats - editable formats array - * @param bool $sameTab - open in same tab - * @param array $limitGroups - list of groups + * @param bool $demo - use demo server * * @return array */ public function SaveAddress($documentserver, $documentserverInternal, $storageUrl, - $secret + $secret, + $demo ) { - $this->config->SetDocumentServerUrl($documentserver); - $this->config->SetDocumentServerInternalUrl($documentserverInternal); + if (!$this->config->SelectDemo($demo === true)) { + $error = $this->trans->t("The 30-day test period is over, you can no longer connect to demo ONLYOFFICE Document Server."); + } + if ($demo !== true) { + $this->config->SetDocumentServerUrl($documentserver); + $this->config->SetDocumentServerInternalUrl($documentserverInternal); + $this->config->SetDocumentServerSecret($secret); + } $this->config->SetStorageUrl($storageUrl); - $this->config->SetDocumentServerSecret($secret); - $documentserver = $this->config->GetDocumentServerUrl(); - $error = NULL; - if (!empty($documentserver)) { - $error = $this->checkDocServiceUrl(); - $this->config->SetSettingsError($error); - } + if (empty($error)) { + $documentserver = $this->config->GetDocumentServerUrl(); + if (!empty($documentserver)) { + $error = $this->checkDocServiceUrl(); + $this->config->SetSettingsError($error); + } - if ($this->config->checkEncryptionModule() === true) { - $this->logger->info("SaveSettings when encryption is enabled", array("app" => $this->appName)); + if ($this->config->checkEncryptionModule() === true) { + $this->logger->info("SaveSettings when encryption is enabled", array("app" => $this->appName)); + } } return [ - "documentserver" => $this->config->GetDocumentServerUrl(), + "documentserver" => $this->config->GetDocumentServerUrl(true), "documentserverInternal" => $this->config->GetDocumentServerInternalUrl(true), "storageUrl" => $this->config->GetStorageUrl(), - "secret" => $this->config->GetDocumentServerSecret(), + "secret" => $this->config->GetDocumentServerSecret(true), "error" => $error ]; } diff --git a/css/editor.css b/css/editor.css index 9e56e137..21f52fd9 100644 --- a/css/editor.css +++ b/css/editor.css @@ -12,7 +12,7 @@ * 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 at 17-2 Elijas street, Riga, Latvia, EU, LV-1021. + * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha street, Riga, Latvia, EU, LV-1050. * * 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. diff --git a/css/main.css b/css/main.css index aff580fd..d08922cd 100644 --- a/css/main.css +++ b/css/main.css @@ -12,7 +12,7 @@ * 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 at 17-2 Elijas street, Riga, Latvia, EU, LV-1021. + * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha street, Riga, Latvia, EU, LV-1050. * * 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. diff --git a/css/settings.css b/css/settings.css index a3dbf5c1..2d503d8b 100644 --- a/css/settings.css +++ b/css/settings.css @@ -12,7 +12,7 @@ * 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 at 17-2 Elijas street, Riga, Latvia, EU, LV-1021. + * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha street, Riga, Latvia, EU, LV-1050. * * 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. @@ -51,6 +51,12 @@ display: inline-block; margin-bottom: -3px; } +#onlyofficeAddrSave { + float: left; +} +.onlyoffice-demo { + margin-left: 90px; +} #s2id_onlyofficeLimitGroups { margin-bottom: 16px; } diff --git a/js/desktop.js b/js/desktop.js index 534a6db9..e8bc18e2 100644 --- a/js/desktop.js +++ b/js/desktop.js @@ -12,7 +12,7 @@ * 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 at 17-2 Elijas street, Riga, Latvia, EU, LV-1021. + * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha street, Riga, Latvia, EU, LV-1050. * * 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. diff --git a/js/editor.js b/js/editor.js index d9fc896d..17dc619f 100644 --- a/js/editor.js +++ b/js/editor.js @@ -12,7 +12,7 @@ * 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 at 17-2 Elijas street, Riga, Latvia, EU, LV-1021. + * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha street, Riga, Latvia, EU, LV-1050. * * 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. @@ -80,6 +80,10 @@ return; } + if (config.editorConfig.tenant) { + displayError(t(OCA.Onlyoffice.AppName, "You are using public demo ONLYOFFICE Document Server. Please do not store private sensitive data.")); + } + var docIsChanged = null; var docIsChangedTimeout = null; @@ -92,7 +96,7 @@ docIsChanged = event.data; }; - if (event.data) { + if (event === false || event.data) { titleChange(); } else { docIsChangedTimeout = setTimeout(titleChange, 500); @@ -105,16 +109,110 @@ "onDocumentStateChange": setPageTitle, }; - var docEditor = new DocsAPI.DocEditor("iframeEditor", config); + if (OC.currentUser) { + config.events.onRequestSaveAs = OCA.Onlyoffice.onRequestSaveAs; + config.events.onRequestInsertImage = OCA.Onlyoffice.onRequestInsertImage; + config.events.onRequestMailMergeRecipients = OCA.Onlyoffice.onRequestMailMergeRecipients; + } + + OCA.Onlyoffice.docEditor = new DocsAPI.DocEditor("iframeEditor", config); if (config.type === "mobile" && $("#app > iframe").css("position") === "fixed") { - $("#app > iframe").css("height", "calc(100% - 45px)") + $("#app > iframe").css("height", "calc(100% - 45px)"); } } } }); }; + OCA.Onlyoffice.onRequestSaveAs = function(event) { + var title = event.data.title; + var url = event.data.url; + + var saveAs = function(fileDir) { + var saveData = { + name: title, + dir: fileDir, + url: url + }; + + $.post(OC.generateUrl("apps/" + OCA.Onlyoffice.AppName + "/ajax/save"), + saveData, + function onSuccess(response) { + if (response.error) { + OC.Notification.show(response.error, { + type: "error", + timeout: 3 + }); + return; + } + + OC.Notification.show(t(OCA.Onlyoffice.AppName, "File saved") + " (" + response.name + ")", { + timeout: 3 + }); + }); + }; + + OC.dialogs.filepicker(t(OCA.Onlyoffice.AppName, "Save as"), saveAs, false, "httpd/unix-directory"); + }; + + OCA.Onlyoffice.onRequestInsertImage = function() { + + var insertImage = function(filePath) { + $.get(OC.generateUrl("apps/" + OCA.Onlyoffice.AppName + "/ajax/url?filePath={filePath}", + { + filePath: filePath + }), + function onSuccess(response) { + if (response.error) { + OC.Notification.show(response.error, { + type: "error", + timeout: 3 + }); + return; + } + + OCA.Onlyoffice.docEditor.insertImage(response); + }); + }; + + var imageMimes = [ + "image/bmp", "image/x-bmp", "image/x-bitmap", "application/bmp", + "image/gif", + "image/jpeg", "image/jpg", "application/jpg", "application/x-jpg", + "image/png", "image/x-png", "application/png", "application/x-png" + ]; + + OC.dialogs.filepicker(t(OCA.Onlyoffice.AppName, "Insert image"), insertImage, false, imageMimes); + }; + + OCA.Onlyoffice.onRequestMailMergeRecipients = function() { + + var setRecipient = function(filePath) { + $.get(OC.generateUrl("apps/" + OCA.Onlyoffice.AppName + "/ajax/url?filePath={filePath}", + { + filePath: filePath + }), + function onSuccess(response) { + if (response.error) { + OC.Notification.show(response.error, { + type: "error", + timeout: 3 + }); + return; + } + + OCA.Onlyoffice.docEditor.setMailMergeRecipients(response); + }); + }; + + var recipientMimes = [ + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" + ]; + + OC.dialogs.filepicker(t(OCA.Onlyoffice.AppName, "Select recipients"), setRecipient, false, recipientMimes); + }; + $(document).ready(OCA.Onlyoffice.InitEditor); })(jQuery, OCA); diff --git a/js/main.js b/js/main.js index e5d00ec1..73f5c59b 100644 --- a/js/main.js +++ b/js/main.js @@ -12,7 +12,7 @@ * 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 at 17-2 Elijas street, Riga, Latvia, EU, LV-1021. + * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha street, Riga, Latvia, EU, LV-1050. * * 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. diff --git a/js/settings.js b/js/settings.js index 052a3218..0103043b 100644 --- a/js/settings.js +++ b/js/settings.js @@ -12,7 +12,7 @@ * 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 at 17-2 Elijas street, Riga, Latvia, EU, LV-1021. + * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha street, Riga, Latvia, EU, LV-1050. * * 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. @@ -63,6 +63,13 @@ $("#onlyofficeGroups").click(groupListToggle); groupListToggle(); + var demoToggle = function() { + $("#onlyofficeAddrSettings input:not(#onlyofficeStorageUrl)").prop("disabled", $("#onlyofficeDemo").prop("checked")); + }; + + $("#onlyofficeDemo").click(demoToggle); + demoToggle(); + $("#onlyofficeAddrSave").click(function () { $(".section-onlyoffice").addClass("icon-loading"); @@ -75,6 +82,7 @@ var onlyofficeInternalUrl = ($("#onlyofficeInternalUrl:visible").val() || "").trim(); var onlyofficeStorageUrl = ($("#onlyofficeStorageUrl:visible").val() || "").trim(); var onlyofficeSecret = $("#onlyofficeSecret:visible").val() || ""; + var demo = $("#onlyofficeDemo").prop("checked"); $.ajax({ method: "PUT", @@ -83,17 +91,18 @@ documentserver: onlyofficeUrl, documentserverInternal: onlyofficeInternalUrl, storageUrl: onlyofficeStorageUrl, - secret: onlyofficeSecret + secret: onlyofficeSecret, + demo: demo }, success: function onSuccess(response) { $(".section-onlyoffice").removeClass("icon-loading"); - if (response && response.documentserver != null) { + if (response && (response.documentserver != null || demo)) { $("#onlyofficeUrl").val(response.documentserver); $("#onlyofficeInternalUrl").val(response.documentserverInternal); $("#onlyofficeStorageUrl").val(response.storageUrl); $("#onlyofficeSecret").val(response.secret); - $(".section-onlyoffice-2").toggleClass("onlyoffice-hide", !response.documentserver.length || !!response.error.length); + $(".section-onlyoffice-2").toggleClass("onlyoffice-hide", (!response.documentserver.length && !demo) || !!response.error.length); var message = response.error diff --git a/l10n/bg_BG.js b/l10n/bg_BG.js index b53e6474..75a43433 100644 --- a/l10n/bg_BG.js +++ b/l10n/bg_BG.js @@ -49,6 +49,10 @@ OC.L10N.register( "review" : "преглед", "form filling" : "попълване на формуляр", "comment" : "коментар", - "download" : "изтегли" + "download" : "изтегли", + "Save as" : "Запази като", + "File saved" : "Файлът е запазен", + "Insert image" : "Вмъкване на изображение", + "Select recipients" : "Изберете получатели" }, "nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);"); diff --git a/l10n/bg_BG.json b/l10n/bg_BG.json index 00fe1dc2..a0c041ac 100644 --- a/l10n/bg_BG.json +++ b/l10n/bg_BG.json @@ -47,6 +47,10 @@ "review" : "преглед", "form filling" : "попълване на формуляр", "comment" : "коментар", - "download" : "изтегли" + "download" : "изтегли", + "Save as" : "Запази като", + "File saved" : "Файлът е запазен", + "Insert image" : "Вмъкване на изображение", + "Select recipients" : "Изберете получатели" },"pluralForm" :"nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);" } \ No newline at end of file diff --git a/l10n/de.js b/l10n/de.js index 89a59a8e..7ea63097 100644 --- a/l10n/de.js +++ b/l10n/de.js @@ -53,11 +53,19 @@ OC.L10N.register( "Server settings" : "Servereinstellungen", "Common settings" : "Allgemeine Einstellungen", "Editor customization settings" : "Editor-Einstellungen", - "The customization section allows to customize the editor interface" : "Die Anpassungssektion ermöglicht die Anpassung der Editoroberfläche", + "The customization section allows personalizing the editor interface" : "Die Anpassungssektion ermöglicht die Anpassung der Editoroberfläche", "Display Chat menu button" : "Chat-Taste anzeigen", "Display the header more compact" : "Kompakten Header anzeigen", "Display Feedback & Support menu button" : "Feedback-& Support-Taste anzeigen", "Display Help menu button" : "Hilfetaste anzeigen", - "Display toolbar tabs" : "Symbolleiste-Registerkarten anzeigen" + "Display toolbar tabs" : "Symbolleiste-Registerkarten anzeigen", + "Save as" : "Speichern als", + "File saved" : "Datei wurde gespeichert", + "Insert image" : "Bild einfügen", + "Select recipients" : "Empfänger auswählen", + "Connect to demo ONLYOFFICE Document Server" : "Verbindung zu Demo ONLYOFFICE Document Server herstellen", + "This is a public test server, please do not use it for private sensitive data. The server will be available during a 30-day period." : "Dies ist ein öffentlicher Testserver. Bitte verwende beim Testen keine privaten sensiblen Daten. Der Server ist 30 Tage lang verfügbar.", + "The 30-day test period is over, you can no longer connect to demo ONLYOFFICE Document Server." : "Der 30-tägige Testzeitraum ist abgelaufen. Du kannst keine Verbindung mehr zu Demo ONLYOFFICE Document Server herstellen.", + "You are using public demo ONLYOFFICE Document Server. Please do not store private sensitive data." : "Du verwendest den öffentlichen Demo ONLYOFFICE Document Server. Bitte benutze ihn nicht zum Speichern von Deinen privaten sensiblen Daten." }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/de.json b/l10n/de.json index fcd09abd..fe19bdbd 100644 --- a/l10n/de.json +++ b/l10n/de.json @@ -51,11 +51,19 @@ "Server settings" : "Servereinstellungen", "Common settings" : "Allgemeine Einstellungen", "Editor customization settings" : "Editor-Einstellungen", - "The customization section allows to customize the editor interface" : "Die Anpassungssektion ermöglicht die Anpassung der Editoroberfläche", + "The customization section allows personalizing the editor interface" : "Die Anpassungssektion ermöglicht die Anpassung der Editoroberfläche", "Display Chat menu button" : "Chat-Taste anzeigen", "Display the header more compact" : "Kompakten Header anzeigen", "Display Feedback & Support menu button" : "Feedback-& Support-Taste anzeigen", "Display Help menu button" : "Hilfetaste anzeigen", - "Display toolbar tabs" : "Symbolleiste-Registerkarten anzeigen" + "Display toolbar tabs" : "Symbolleiste-Registerkarten anzeigen", + "Save as" : "Speichern als", + "File saved" : "Datei wurde gespeichert", + "Insert image" : "Bild einfügen", + "Select recipients" : "Empfänger auswählen", + "Connect to demo ONLYOFFICE Document Server" : "Verbindung zu Demo ONLYOFFICE Document Server herstellen", + "This is a public test server, please do not use it for private sensitive data. The server will be available during a 30-day period." : "Dies ist ein öffentlicher Testserver. Bitte verwende beim Testen keine privaten sensiblen Daten. Der Server ist 30 Tage lang verfügbar.", + "The 30-day test period is over, you can no longer connect to demo ONLYOFFICE Document Server." : "Der 30-tägige Testzeitraum ist abgelaufen. Du kannst keine Verbindung mehr zu Demo ONLYOFFICE Document Server herstellen.", + "You are using public demo ONLYOFFICE Document Server. Please do not store private sensitive data." : "Du verwendest den öffentlichen Demo ONLYOFFICE Document Server. Bitte benutze ihn nicht zum Speichern von Deinen privaten sensiblen Daten." },"pluralForm" :"nplurals=2; plural=(n != 1);" } \ No newline at end of file diff --git a/l10n/de_DE.js b/l10n/de_DE.js index bb51e6a4..09c4e071 100644 --- a/l10n/de_DE.js +++ b/l10n/de_DE.js @@ -53,11 +53,19 @@ OC.L10N.register( "Server settings" : "Servereinstellungen", "Common settings" : "Allgemeine Einstellungen", "Editor customization settings" : "Editor-Einstellungen", - "The customization section allows to customize the editor interface" : "Die Anpassungssektion ermöglicht die Anpassung der Editoroberfläche", + "The customization section allows personalizing the editor interface" : "Die Anpassungssektion ermöglicht die Anpassung der Editoroberfläche", "Display Chat menu button" : "Chat-Taste anzeigen", "Display the header more compact" : "Kompakten Header anzeigen", "Display Feedback & Support menu button" : "Feedback-& Support-Taste anzeigen", "Display Help menu button" : "Hilfetaste anzeigen", - "Display toolbar tabs" : "Symbolleiste-Registerkarten anzeigen" + "Display toolbar tabs" : "Symbolleiste-Registerkarten anzeigen", + "Save as" : "Speichern als", + "File saved" : "Datei wurde gespeichert", + "Insert image" : "Bild einfügen", + "Select recipients" : "Empfänger auswählen", + "Connect to demo ONLYOFFICE Document Server" : "Verbindung zu Demo ONLYOFFICE Document Server herstellen", + "This is a public test server, please do not use it for private sensitive data. The server will be available during a 30-day period." : "Dies ist ein öffentlicher Testserver. Bitte verwenden Sie beim Testen keine privaten sensiblen Daten. Der Server ist 30 Tage lang verfügbar.", + "The 30-day test period is over, you can no longer connect to demo ONLYOFFICE Document Server." : "Der 30-tägige Testzeitraum ist abgelaufen. Sie können keine Verbindung mehr zu Demo ONLYOFFICE Document Server herstellen.", + "You are using public demo ONLYOFFICE Document Server. Please do not store private sensitive data." : "Sie verwenden den öffentlichen Demo ONLYOFFICE Document Server. Bitte benutzen Sie ihn nicht zum Speichern von Ihren privaten sensiblen Daten." }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/de_DE.json b/l10n/de_DE.json index 663bd114..e8213887 100644 --- a/l10n/de_DE.json +++ b/l10n/de_DE.json @@ -51,11 +51,19 @@ "Server settings" : "Servereinstellungen", "Common settings" : "Allgemeine Einstellungen", "Editor customization settings" : "Editor-Einstellungen", - "The customization section allows to customize the editor interface" : "Die Anpassungssektion ermöglicht die Anpassung der Editoroberfläche", + "The customization section allows personalizing the editor interface" : "Die Anpassungssektion ermöglicht die Anpassung der Editoroberfläche", "Display Chat menu button" : "Chat-Taste anzeigen", "Display the header more compact" : "Kompakten Header anzeigen", "Display Feedback & Support menu button" : "Feedback-& Support-Taste anzeigen", "Display Help menu button" : "Hilfetaste anzeigen", - "Display toolbar tabs" : "Symbolleiste-Registerkarten anzeigen" + "Display toolbar tabs" : "Symbolleiste-Registerkarten anzeigen", + "Save as" : "Speichern als", + "File saved" : "Datei wurde gespeichert", + "Insert image" : "Bild einfügen", + "Select recipients" : "Empfänger auswählen", + "Connect to demo ONLYOFFICE Document Server" : "Verbindung zu Demo ONLYOFFICE Document Server herstellen", + "This is a public test server, please do not use it for private sensitive data. The server will be available during a 30-day period." : "Dies ist ein öffentlicher Testserver. Bitte verwenden Sie beim Testen keine privaten sensiblen Daten. Der Server ist 30 Tage lang verfügbar.", + "The 30-day test period is over, you can no longer connect to demo ONLYOFFICE Document Server." : "Der 30-tägige Testzeitraum ist abgelaufen. Sie können keine Verbindung mehr zu Demo ONLYOFFICE Document Server herstellen.", + "You are using public demo ONLYOFFICE Document Server. Please do not store private sensitive data." : "Sie verwenden den öffentlichen Demo ONLYOFFICE Document Server. Bitte benutzen Sie ihn nicht zum Speichern von Ihren privaten sensiblen Daten." },"pluralForm" :"nplurals=2; plural=(n != 1);" } \ No newline at end of file diff --git a/l10n/es.js b/l10n/es.js index 2e3f2059..e677bc85 100644 --- a/l10n/es.js +++ b/l10n/es.js @@ -53,11 +53,15 @@ OC.L10N.register( "Server settings" : "Ajustes de servidor", "Common settings" : "Ajustes comunes", "Editor customization settings" : "Ajustes del editor", - "The customization section allows to customize the editor interface" : "La sección de personalización permite customizar la interfaz del editor", + "The customization section allows personalizing the editor interface" : "La sección de personalización permite customizar la interfaz del editor", "Display Chat menu button" : "Mostrar el botón de Chat", "Display the header more compact" : "Mostrar el encabezado más compacto", "Display Feedback & Support menu button" : "Mostrar el botón de Feedback y Soporte", "Display Help menu button" : "Mostrar el botón de Ayuda", - "Display toolbar tabs" : "Mostrar pestañas de barra de herramientas" + "Display toolbar tabs" : "Mostrar pestañas de barra de herramientas", + "Save as" : "Guardar como", + "File saved" : "El archivo ha sido guardado", + "Insert image" : "Insertar imagen", + "Select recipients" : "Seleccionar destinatarios" }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/es.json b/l10n/es.json index 6d2b5345..bad2ffc4 100644 --- a/l10n/es.json +++ b/l10n/es.json @@ -51,11 +51,15 @@ "Server settings" : "Ajustes de servidor", "Common settings" : "Ajustes comunes", "Editor customization settings" : "Ajustes del editor", - "The customization section allows to customize the editor interface" : "La sección de personalización permite customizar la interfaz del editor", + "The customization section allows personalizing the editor interface" : "La sección de personalización permite customizar la interfaz del editor", "Display Chat menu button" : "Mostrar el botón de Chat", "Display the header more compact" : "Mostrar el encabezado más compacto", "Display Feedback & Support menu button" : "Mostrar el botón de Feedback y Soporte", "Display Help menu button" : "Mostrar el botón de Ayuda", - "Display toolbar tabs" : "Mostrar pestañas de barra de herramientas" + "Display toolbar tabs" : "Mostrar pestañas de barra de herramientas", + "Save as" : "Guardar como", + "File saved" : "El archivo ha sido guardado", + "Insert image" : "Insertar imagen", + "Select recipients" : "Seleccionar destinatarios" },"pluralForm" :"nplurals=2; plural=(n != 1);" } \ No newline at end of file diff --git a/l10n/fr.js b/l10n/fr.js index 2ea909e5..fe0e15f6 100644 --- a/l10n/fr.js +++ b/l10n/fr.js @@ -53,11 +53,15 @@ OC.L10N.register( "Server settings" : "Paramètres du serveur", "Common settings" : "Paramètres communs", "Editor customization settings" : "Paramètres de personnalisation de l'éditeur", - "The customization section allows to customize the editor interface" : "La section de personnalisation permet de personnaliser l'interface de l'éditeur", + "The customization section allows personalizing the editor interface" : "La section de personnalisation permet de personnaliser l'interface de l'éditeur", "Display Chat menu button" : "Afficher le bouton du menu du chat", "Display the header more compact" : "Afficher l'en-tête plus compact", "Display Feedback & Support menu button" : "Afficher le bouton du menu 'Feedback & Support'", "Display Help menu button" : "Afficher le bouton du menu 'Aide'", - "Display toolbar tabs" : "Afficher les onglets de la barre d'outils" + "Display toolbar tabs" : "Afficher les onglets de la barre d'outils", + "Save as" : "Enregistrer sous", + "File saved" : "Le fichier a été enregistré", + "Insert image" : "Insérer une image", + "Select recipients" : "Sélectionner les destinataires" }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/fr.json b/l10n/fr.json index 9b19ecde..add34f70 100644 --- a/l10n/fr.json +++ b/l10n/fr.json @@ -51,11 +51,15 @@ "Server settings" : "Paramètres du serveur", "Common settings" : "Paramètres communs", "Editor customization settings" : "Paramètres de personnalisation de l'éditeur", - "The customization section allows to customize the editor interface" : "La section de personnalisation permet de personnaliser l'interface de l'éditeur", + "The customization section allows personalizing the editor interface" : "La section de personnalisation permet de personnaliser l'interface de l'éditeur", "Display Chat menu button" : "Afficher le bouton du menu du chat", "Display the header more compact" : "Afficher l'en-tête plus compact", "Display Feedback & Support menu button" : "Afficher le bouton du menu 'Feedback & Support'", "Display Help menu button" : "Afficher le bouton du menu 'Aide'", - "Display toolbar tabs" : "Afficher les onglets de la barre d'outils" + "Display toolbar tabs" : "Afficher les onglets de la barre d'outils", + "Save as" : "Enregistrer sous", + "File saved" : "Le fichier a été enregistré", + "Insert image" : "Insérer une image", + "Select recipients" : "Sélectionner les destinataires" },"pluralForm" :"nplurals=2; plural=(n != 1);" } diff --git a/l10n/pt_BR.js b/l10n/pt_BR.js index 28d36898..b9974bad 100644 --- a/l10n/pt_BR.js +++ b/l10n/pt_BR.js @@ -47,7 +47,22 @@ OC.L10N.register( "Mixed Active Content is not allowed. HTTPS address for Document Server is required." : "Conteúdo Misto não é permitido. É necessário um endereço HTTPS para o Servidor de Documentos.", "Restrict access to editors to following groups" : "Acesso apenas para os seguintes grupos", "review" : "revisar", + "form filling" : "preenchimento de formularios", "comment" : "comente", - "download" : "baixar" + "modify filter" : "modificar filtro", + "download" : "baixar", + "Server settings" : "Configurações do servidor", + "Common settings" : "Configurações comuns", + "Editor customization settings" : "Configurações de personalização do editor", + "The customization section allows personalizing the editor interface" : "Seção de customização permite personalizar a interface do editor", + "Display Chat menu button" : "Exibir o botão do menu do bate-papo", + "Display the header more compact" : "Exibir o cabeçalho mais compacto", + "Display Feedback & Support menu button" : "Exibir o botão do menu de feedback e suporte", + "Display Help menu button" : "Exibir o botão do menu Ajuda", + "Display toolbar tabs" : "Exibir guias da barra de ferramentas", + "Save as" : "Salvar como", + "File saved" : "O arquivo foi salvo", + "Insert image" : "Inserir imagem", + "Select recipients" : "Selecione os destinatários" }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/pt_BR.json b/l10n/pt_BR.json index a5f8b32b..c2c7dd58 100644 --- a/l10n/pt_BR.json +++ b/l10n/pt_BR.json @@ -45,7 +45,22 @@ "Mixed Active Content is not allowed. HTTPS address for Document Server is required." : "Conteúdo Misto não é permitido. É necessário um endereço HTTPS para o Servidor de Documentos.", "Restrict access to editors to following groups" : "Acesso apenas para os seguintes grupos", "review" : "revisar", + "form filling" : "preenchimento de formularios", "comment" : "comente", - "download" : "baixar" + "modify filter" : "modificar filtro", + "download" : "baixar", + "Server settings" : "Configurações do servidor", + "Common settings" : "Configurações comuns", + "Editor customization settings" : "Configurações de personalização do editor", + "The customization section allows personalizing the editor interface" : "Seção de customização permite personalizar a interface do editor", + "Display Chat menu button" : "Exibir o botão do menu do bate-papo", + "Display the header more compact" : "Exibir o cabeçalho mais compacto", + "Display Feedback & Support menu button" : "Exibir o botão do menu de feedback e suporte", + "Display Help menu button" : "Exibir o botão do menu Ajuda", + "Display toolbar tabs" : "Exibir guias da barra de ferramentas", + "Save as" : "Salvar como", + "File saved" : "O arquivo foi salvo", + "Insert image" : "Inserir imagem", + "Select recipients" : "Selecione os destinatários" },"pluralForm" :"nplurals=2; plural=(n != 1);" } diff --git a/l10n/ru.js b/l10n/ru.js index 293cf028..c2fec753 100644 --- a/l10n/ru.js +++ b/l10n/ru.js @@ -54,11 +54,19 @@ OC.L10N.register( "Server settings" : "Настройки сервера", "Common settings" : "Общие настройки", "Editor customization settings" : "Настройка редактора", - "The customization section allows to customize the editor interface" : "Раздел настройки позволяет изменить интерфейс редактора", + "The customization section allows personalizing the editor interface" : "Раздел настройки позволяет изменить интерфейс редактора", "Display Chat menu button" : "Отображать кнопку чата", "Display the header more compact" : "Отображать заголовок компактным", "Display Feedback & Support menu button" : "Отображать кнопку Обратной связи и поддержки", "Display Help menu button" : "Отображать кнопку справки", - "Display toolbar tabs" : "Отображать вкладки панели инструментов" + "Display toolbar tabs" : "Отображать вкладки панели инструментов", + "Save as" : "Сохранить как", + "File saved" : "Файл сохранён", + "Insert image" : "Вставить изображение", + "Select recipients" : "Выберите получателей", + "Connect to demo ONLYOFFICE Document Server" : "Подключиться к демонстрационному Серверу Документов ONLYOFFICE", + "This is a public test server, please do not use it for private sensitive data. The server will be available during a 30-day period." : "Это публичный тестовый сервер, пожалуйста, не используйте его для личных конфиденциальных данных. Сервер будет доступен в течение 30 дней.", + "The 30-day test period is over, you can no longer connect to demo ONLYOFFICE Document Server." : "30-дневный тестовый период закончен, вы больше не можете подключаться к демонстрационному Серверу Документов ONLYOFFICE", + "You are using public demo ONLYOFFICE Document Server. Please do not store private sensitive data." : "Вы используете публичный демонстрационный сервер документов ONLYOFFICE. Пожалуйста, не храните конфиденциальные данные." }, "nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);"); diff --git a/l10n/ru.json b/l10n/ru.json index e2676de8..19fded67 100644 --- a/l10n/ru.json +++ b/l10n/ru.json @@ -52,11 +52,19 @@ "Server settings" : "Настройки сервера", "Common settings" : "Общие настройки", "Editor customization settings" : "Настройка редактора", - "The customization section allows to customize the editor interface" : "Раздел настройки позволяет изменить интерфейс редактора", + "The customization section allows personalizing the editor interface" : "Раздел настройки позволяет изменить интерфейс редактора", "Display Chat menu button" : "Отображать кнопку чата", "Display the header more compact" : "Отображать заголовок компактным", "Display Feedback & Support menu button" : "Отображать кнопку Обратной связи и поддержки", "Display Help menu button" : "Отображать кнопку справки", - "Display toolbar tabs" : "Отображать вкладки панели инструментов" + "Display toolbar tabs" : "Отображать вкладки панели инструментов", + "Save as" : "Сохранить как", + "File saved" : "Файл сохранён", + "Insert image" : "Вставить изображение", + "Select recipients" : "Выберите получателей", + "Connect to demo ONLYOFFICE Document Server" : "Подключиться к демонстрационному Серверу Документов ONLYOFFICE", + "This is a public test server, please do not use it for private sensitive data. The server will be available during a 30-day period." : "Это публичный тестовый сервер, пожалуйста, не используйте его для личных конфиденциальных данных. Сервер будет доступен в течение 30 дней.", + "The 30-day test period is over, you can no longer connect to demo ONLYOFFICE Document Server." : "30-дневный тестовый период закончен, вы больше не можете подключаться к демонстрационному Серверу Документов ONLYOFFICE", + "You are using public demo ONLYOFFICE Document Server. Please do not store private sensitive data." : "Вы используете публичный демонстрационный сервер документов ONLYOFFICE. Пожалуйста, не храните конфиденциальные данные." },"pluralForm" :"nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);" } \ No newline at end of file diff --git a/l10n/sv.js b/l10n/sv.js index 8c5542e9..0ad6351d 100644 --- a/l10n/sv.js +++ b/l10n/sv.js @@ -48,6 +48,19 @@ OC.L10N.register( "Restrict access to editors to following groups" : "Begränsa åtkomst till följande grupper", "review" : "granska", "comment" : "kommentar", - "download" : "ladda ner" + "download" : "ladda ner", + "Server settings" : "Serverinställningar", + "Common settings" : "Allmänna inställningar", + "Editor customization settings" : "Anpassningar ONLYOFFICE ", + "The customization section allows personalizing the editor interface" : "Denna del tillåter anpassningar av redigeringsgränssnittet", + "Display Chat menu button" : "Visa chatt", + "Display the header more compact" : "Visa kompakt sidhuvud", + "Display Feedback & Support menu button" : "Visa Feedback & Support i menyn", + "Display Help menu button" : "Visa hjälp i menyn", + "Display toolbar tabs" : "Visa flikar i verktygsfältet", + "Save as" : "Spara som", + "File saved" : "Filen har sparats", + "Insert image" : "Infoga bild", + "Select recipients" : "Välj mottagare" }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/sv.json b/l10n/sv.json index 9e28e695..0b077409 100644 --- a/l10n/sv.json +++ b/l10n/sv.json @@ -46,6 +46,19 @@ "Restrict access to editors to following groups" : "Begränsa åtkomst till följande grupper", "review" : "granska", "comment" : "kommentar", - "download" : "ladda ner" + "download" : "ladda ner", + "Server settings" : "Serverinställningar", + "Common settings" : "Allmänna inställningar", + "Editor customization settings" : "Anpassningar ONLYOFFICE ", + "The customization section allows personalizing the editor interface" : "Denna del tillåter anpassningar av redigeringsgränssnittet", + "Display Chat menu button" : "Visa chatt", + "Display the header more compact" : "Visa kompakt sidhuvud", + "Display Feedback & Support menu button" : "Visa Feedback & Support i menyn", + "Display Help menu button" : "Visa hjälp i menyn", + "Display toolbar tabs" : "Visa flikar i verktygsfältet", + "Save as" : "Spara som", + "File saved" : "Filen har sparats", + "Insert image" : "Infoga bild", + "Select recipients" : "Välj mottagare" },"pluralForm" :"nplurals=2; plural=(n != 1);" } \ No newline at end of file diff --git a/lib/adminsettings.php b/lib/adminsettings.php index f62a44eb..44744e06 100644 --- a/lib/adminsettings.php +++ b/lib/adminsettings.php @@ -13,7 +13,7 @@ * 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 at 17-2 Elijas street, Riga, Latvia, EU, LV-1021. + * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha street, Riga, Latvia, EU, LV-1050. * * 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. diff --git a/lib/appconfig.php b/lib/appconfig.php index 2d9cbabb..5c705a94 100644 --- a/lib/appconfig.php +++ b/lib/appconfig.php @@ -13,7 +13,7 @@ * 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 at 17-2 Elijas street, Riga, Latvia, EU, LV-1021. + * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha street, Riga, Latvia, EU, LV-1050. * * 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. @@ -29,6 +29,9 @@ namespace OCA\Onlyoffice; +use \DateInterval; +use \DateTime; + use OCP\IConfig; use OCP\ILogger; @@ -60,6 +63,13 @@ class AppConfig { */ private $logger; + /** + * The config key for the demo server + * + * @var string + */ + private $_demo = "demo"; + /** * The config key for the document server address * @@ -244,6 +254,70 @@ public function GetSystemValue($key, $system = false) { return NULL; } + /** + * Switch on demo server + * + * @param bool $value - select demo + * + * @return bool + */ + public function SelectDemo($value) { + $this->logger->info("Select demo: " . json_encode($value), array("app" => $this->appName)); + + $data = $this->GetDemoData(); + + if ($value === true && !$data["available"]) { + $this->logger->info("Trial demo is overdue: " . json_encode($data), array("app" => $this->appName)); + return false; + } + + $data["enabled"] = $value === true; + if (!isset($data["start"])) { + $data["start"] = new DateTime(); + } + + $this->config->setAppValue($this->appName, $this->_demo, json_encode($data)); + return true; + } + + /** + * Get demo data + * + * @return array + */ + public function GetDemoData() { + $data = $this->config->getAppValue($this->appName, $this->_demo, ""); + + if (empty($data)) { + return [ + "available" => true, + "enabled" => false + ]; + } + $data = json_decode($data, true); + + $overdue = new DateTime(isset($data["start"]) ? $data["start"]["date"] : NULL); + $overdue->add(new DateInterval("P" . $this->DEMO_PARAM["TRIAL"] . "D")); + if ($overdue > new DateTime()) { + $data["available"] = true; + $data["enabled"] = $data["enabled"] === true; + } else { + $data["available"] = false; + $data["enabled"] = false; + } + + return $data; + } + + /** + * Get status of demo server + * + * @return bool + */ + public function UseDemo() { + return $this->GetDemoData()["enabled"] === true; + } + /** * Save the document service address to the application configuration * @@ -266,12 +340,18 @@ public function SetDocumentServerUrl($documentServer) { /** * Get the document service address from the application configuration * + * @param bool $origin - take origin + * * @return string */ - public function GetDocumentServerUrl() { + public function GetDocumentServerUrl($origin = false) { + if (!$origin && $this->UseDemo()) { + return $this->DEMO_PARAM["ADDR"]; + } + $url = $this->config->getAppValue($this->appName, $this->_documentserver, ""); if (empty($url)) { - $url = $this->getSystemValue($this->_documentserver); + $url = $this->GetSystemValue($this->_documentserver); } if ($url !== "/") { $url = rtrim($url, "/"); @@ -285,7 +365,7 @@ public function GetDocumentServerUrl() { /** * Save the document service address available from ownCloud to the application configuration * - * @param string $documentServer - document service address + * @param string $documentServerInternal - document service address */ public function SetDocumentServerInternalUrl($documentServerInternal) { $documentServerInternal = rtrim(trim($documentServerInternal), "/"); @@ -308,10 +388,14 @@ public function SetDocumentServerInternalUrl($documentServerInternal) { * * @return string */ - public function GetDocumentServerInternalUrl($origin) { + public function GetDocumentServerInternalUrl($origin = false) { + if (!$origin && $this->UseDemo()) { + return $this->GetDocumentServerUrl(); + } + $url = $this->config->getAppValue($this->appName, $this->_documentserverInternal, ""); if (empty($url)) { - $url = $this->getSystemValue($this->_documentserverInternal); + $url = $this->GetSystemValue($this->_documentserverInternal); } if (!$origin && empty($url)) { $url = $this->GetDocumentServerUrl(); @@ -319,6 +403,33 @@ public function GetDocumentServerInternalUrl($origin) { return $url; } + /** + * Replace domain in document server url with internal address from configuration + * + * @param string $url - document server url + * + * @return string + */ + public function ReplaceDocumentServerUrlToInternal($url) { + $documentServerUrl = $this->GetDocumentServerInternalUrl(); + if (!empty($documentServerUrl)) { + $from = $this->GetDocumentServerUrl(); + + if (!preg_match("/^https?:\/\//i", $from)) { + $parsedUrl = parse_url($url); + $from = $parsedUrl["scheme"] . "://" . $parsedUrl["host"] . (array_key_exists("port", $parsedUrl) ? (":" . $parsedUrl["port"]) : "") . $from; + } + + if ($from !== $documentServerUrl) + { + $this->logger->debug("Replace url from " . $from . " to " . $documentServerUrl, array("app" => $this->appName)); + $url = str_replace($from, $documentServerUrl, $url); + } + } + + return $url; + } + /** * Save the ownCloud address available from document server to the application configuration * @@ -346,7 +457,7 @@ public function SetStorageUrl($storageUrl) { public function GetStorageUrl() { $url = $this->config->getAppValue($this->appName, $this->_storageUrl, ""); if (empty($url)) { - $url = $this->getSystemValue($this->_storageUrl); + $url = $this->GetSystemValue($this->_storageUrl); } return $url; } @@ -369,12 +480,18 @@ public function SetDocumentServerSecret($secret) { /** * Get the document service secret key from the application configuration * + * @param bool $origin - take origin + * * @return string */ - public function GetDocumentServerSecret() { + public function GetDocumentServerSecret($origin = false) { + if (!$origin && $this->UseDemo()) { + return $this->DEMO_PARAM["SECRET"]; + } + $secret = $this->config->getAppValue($this->appName, $this->_jwtSecret, ""); if (empty($secret)) { - $secret = $this->getSystemValue($this->_jwtSecret); + $secret = $this->GetSystemValue($this->_jwtSecret); } return $secret; } @@ -385,7 +502,11 @@ public function GetDocumentServerSecret() { * @return string */ public function GetSKey() { - return $this->config->getSystemValue($this->_cryptSecret, true); + $secret = $this->GetDocumentServerSecret(); + if (empty($secret)) { + $secret = $this->GetSystemValue($this->_cryptSecret, true); + } + return $secret; } /** @@ -631,7 +752,7 @@ public function isUserAllowedToUse() { * @return bool */ public function TurnOffVerification() { - $turnOff = $this->getSystemValue($this->_verification); + $turnOff = $this->GetSystemValue($this->_verification); return $turnOff === true; } @@ -641,7 +762,11 @@ public function TurnOffVerification() { * @return string */ public function JwtHeader() { - $header = $this->getSystemValue($this->_jwtHeader); + if ($this->UseDemo()) { + return $this->DEMO_PARAM["HEADER"]; + } + + $header = $this->GetSystemValue($this->_jwtHeader); if (empty($header)) { $header = "Authorization"; } @@ -754,4 +879,14 @@ public function FormatsSetting() { "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 ] ]; + + /** + * DEMO DATA + */ + private $DEMO_PARAM = [ + "ADDR" => "https://onlinedocs.onlyoffice.com/", + "HEADER" => "AuthorizationJWT", + "SECRET" => "sn2puSUF7muF5Jas", + "TRIAL" => 30 + ]; } diff --git a/lib/crypt.php b/lib/crypt.php index ec37a123..5ee6fe2b 100644 --- a/lib/crypt.php +++ b/lib/crypt.php @@ -13,7 +13,7 @@ * 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 at 17-2 Elijas street, Riga, Latvia, EU, LV-1021. + * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha street, Riga, Latvia, EU, LV-1050. * * 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. @@ -39,17 +39,17 @@ class Crypt { /** - * The secret key from the application configuration + * Application configuration * - * @var string + * @var OCA\Onlyoffice\AppConfig */ - private $skey; + private $config; /** * @param OCA\Onlyoffice\AppConfig $config - application configutarion */ public function __construct(AppConfig $appConfig) { - $this->skey = $appConfig->GetSKey(); + $this->config = $appConfig; } /** @@ -60,7 +60,7 @@ public function __construct(AppConfig $appConfig) { * @return string */ public function GetHash($object) { - return \Firebase\JWT\JWT::encode($object, $this->skey); + return \Firebase\JWT\JWT::encode($object, $this->config->GetSKey()); } /** @@ -77,7 +77,7 @@ public function ReadHash($token) { return [$result, "token is empty"]; } try { - $result = \Firebase\JWT\JWT::decode($token, $this->skey, array("HS256")); + $result = \Firebase\JWT\JWT::decode($token, $this->config->GetSKey(), array("HS256")); } catch (\UnexpectedValueException $e) { $error = $e->getMessage(); } diff --git a/lib/documentservice.php b/lib/documentservice.php index ec807184..bef5c048 100644 --- a/lib/documentservice.php +++ b/lib/documentservice.php @@ -13,7 +13,7 @@ * 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 at 17-2 Elijas street, Riga, Latvia, EU, LV-1021. + * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha street, Riga, Latvia, EU, LV-1050. * * 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. @@ -118,7 +118,7 @@ function GetConvertedUri($document_uri, $from_extension, $to_extension, $documen * @return array */ function SendRequestToConvertService($document_uri, $from_extension, $to_extension, $document_revision_id, $is_async) { - $documentServerUrl = $this->config->GetDocumentServerInternalUrl(false); + $documentServerUrl = $this->config->GetDocumentServerInternalUrl(); if (empty($documentServerUrl)) { throw new \Exception($this->trans->t("ONLYOFFICE app is not configured. Please contact admin")); @@ -147,6 +147,10 @@ function SendRequestToConvertService($document_uri, $from_extension, $to_extensi "key" => $document_revision_id ]; + if ($this->config->UseDemo()) { + $data["tenant"] = $this->config->GetSystemValue("instanceid", true); + } + $opts = array( "timeout" => "120", "headers" => [ @@ -241,7 +245,7 @@ function ProcessConvServResponceError($errorCode) { */ function HealthcheckRequest() { - $documentServerUrl = $this->config->GetDocumentServerInternalUrl(false); + $documentServerUrl = $this->config->GetDocumentServerInternalUrl(); if (empty($documentServerUrl)) { throw new \Exception($this->trans->t("ONLYOFFICE app is not configured. Please contact admin")); @@ -263,7 +267,7 @@ function HealthcheckRequest() { */ function CommandRequest($method) { - $documentServerUrl = $this->config->GetDocumentServerInternalUrl(false); + $documentServerUrl = $this->config->GetDocumentServerInternalUrl(); if (empty($documentServerUrl)) { throw new \Exception($this->trans->t("ONLYOFFICE app is not configured. Please contact admin")); @@ -360,9 +364,6 @@ public function Request($url, $method = "get", $opts = NULL) { if ($method === "post") { $response = $client->post($url, $opts); } else { - //todo: remove after release v5.3.0 - $url = str_replace("==&expires=", "&expires=", $url); - $response = $client->get($url, $opts); } diff --git a/screenshots/main.png b/screenshots/main.png index 594f0038..6d42ad95 100644 Binary files a/screenshots/main.png and b/screenshots/main.png differ diff --git a/screenshots/main_small.png b/screenshots/main_small.png index 34d8d122..20644a5d 100644 Binary files a/screenshots/main_small.png and b/screenshots/main_small.png differ diff --git a/screenshots/new.png b/screenshots/new.png index 57abf501..e0bdcba1 100644 Binary files a/screenshots/new.png and b/screenshots/new.png differ diff --git a/screenshots/open.png b/screenshots/open.png index f3180b30..77fc9793 100644 Binary files a/screenshots/open.png and b/screenshots/open.png differ diff --git a/screenshots/settings.png b/screenshots/settings.png index 85a1530e..9336042c 100644 Binary files a/screenshots/settings.png and b/screenshots/settings.png differ diff --git a/settings.php b/settings.php index 802d01fb..7b70727c 100644 --- a/settings.php +++ b/settings.php @@ -13,7 +13,7 @@ * 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 at 17-2 Elijas street, Riga, Latvia, EU, LV-1021. + * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha street, Riga, Latvia, EU, LV-1050. * * 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. diff --git a/templates/editor.php b/templates/editor.php index 38deacc2..f20186d3 100644 --- a/templates/editor.php +++ b/templates/editor.php @@ -13,7 +13,7 @@ * 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 at 17-2 Elijas street, Riga, Latvia, EU, LV-1021. + * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha street, Riga, Latvia, EU, LV-1050. * * 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. diff --git a/templates/settings.php b/templates/settings.php index 77c27def..1d0f3e02 100644 --- a/templates/settings.php +++ b/templates/settings.php @@ -13,7 +13,7 @@ * 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 at 17-2 Elijas street, Riga, Latvia, EU, LV-1021. + * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha street, Riga, Latvia, EU, LV-1050. * * 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. @@ -45,32 +45,50 @@

-

t("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.")) ?>

+
+

t("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.")) ?>

-

t("Document Editing Service address")) ?>

-

" placeholder="https:///" type="text">

+

t("Document Editing Service address")) ?>

+

" placeholder="https:///" type="text">

-

t("Secret key (leave blank to disable)")) ?>

-

" placeholder="secret" type="text">

+

t("Secret key (leave blank to disable)")) ?>

+

" placeholder="secret" type="text">

-

- - t("Advanced server settings")) ?> - - -

-
-

t("Document Editing Service address for internal requests from the server")) ?>

-

" placeholder="https:///" type="text">

+

+ + t("Advanced server settings")) ?> + + +

+
+

t("Document Editing Service address for internal requests from the server")) ?>

+

" placeholder="https:///" type="text">

-

t("Server address for internal requests from the Document Editing Service")) ?>

-

" placeholder="" type="text">

+

t("Server address for internal requests from the Document Editing Service")) ?>

+

" placeholder="" type="text">

+
+
-
-

+
+ + +
+ checked="checked" + disabled="disabled" /> + + +
+ + t("This is a public test server, please do not use it for private sensitive data. The server will be available during a 30-day period.")) ?> + + t("The 30-day test period is over, you can no longer connect to demo ONLYOFFICE Document Server.")) ?> + +
+
-
onlyoffice-hide"> +
onlyoffice-hide">

t("Common settings")) ?>

@@ -128,7 +146,7 @@ "> -

t("The customization section allows to customize the editor interface")) ?>

+

t("The customization section allows personalizing the editor interface")) ?>