diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ed0dcd4..435fa233 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## 3.0.2 +## Changed +- federated share saving fixed + ## 3.0.0 ## Added - "save as" to the folder diff --git a/README.md b/README.md index aee82bda..aee1828a 100644 --- a/README.md +++ b/README.md @@ -51,15 +51,15 @@ The table below will help you to make the right choice. | Simultaneous connections | up to 20 maximum | As in chosen pricing plan | | Number of users | up to 20 recommended | As in chosen pricing plan | | License | GNU AGPL v.3 | Proprietary | -| **Support** | **Community Edition** | **Integration Edition** | +| **Support** | **Community Edition** | **Integration Edition** | | Documentation | [Help Center](https://helpcenter.onlyoffice.com/server/docker/opensource/index.aspx) | [Help Center](https://helpcenter.onlyoffice.com/server/integration-edition/index.aspx) | | Standard support | [GitHub](https://github.com/ONLYOFFICE/DocumentServer/issues) or paid | One year support included | | Premium support | [Buy Now](https://www.onlyoffice.com/support.aspx?utm_source=github&utm_medium=cpc&utm_campaign=GitHubNextcloud) | [Buy Now](https://www.onlyoffice.com/support.aspx?utm_source=github&utm_medium=cpc&utm_campaign=GitHubNextcloud) | -| **Services** | **Community Edition** | **Integration Edition** | -| Conversion Service | + | + | -| Document Builder Service | - | + | +| **Services** | **Community Edition** | **Integration Edition** | +| Conversion Service | + | + | +| Document Builder Service | + | + | | **Interface** | **Community Edition** | **Integration Edition** | -| Tabbed interface | - | + | +| Tabbed interface | + | + | | White Label | - | - | | Integrated test example (node.js)* | - | + | | **Plugins & Macros** | **Community Edition** | **Integration Edition** | @@ -70,27 +70,27 @@ The table below will help you to make the right choice. | Comments | + | + | | Built-in chat | + | + | | Review and tracking changes | + | + | -| Display modes of tracking changes | - | + | +| Display modes of tracking changes | + | + | | Version history | + | + | | **Document Editor features** | **Community Edition** | **Integration Edition** | | Font and paragraph formatting | + | + | | Object insertion | + | + | -| Content control | - | + | +| Content control | + | + | | Layout tools | + | + | | Table of contents | + | + | -| Navigation panel | - | + | +| Navigation panel | + | + | | Mail Merge | + | + | | **Spreadsheet Editor features** | **Community Edition** | **Integration Edition** | | Font and paragraph formatting | + | + | | Object insertion | + | + | | Functions, formulas, equations | + | + | | Table templates | + | + | -| Pivot tables | - | +** | +| Pivot tables | +** | +** | | **Presentation Editor features** | **Community Edition** | **Integration Edition** | | Font and paragraph formatting | + | + | | Object insertion | + | + | | Animations | + | + | -| Presenter mode | - | + | +| Presenter mode | + | + | | Notes | + | + | | | [Get it now](https://www.onlyoffice.com/download.aspx?utm_source=github&utm_medium=cpc&utm_campaign=GitHubNextcloud) | [Start Free Trial](https://www.onlyoffice.com/connectors-request.aspx?utm_source=github&utm_medium=cpc&utm_campaign=GitHubNextcloud) | diff --git a/appinfo/info.xml b/appinfo/info.xml index 01d48e2c..55d6eba7 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 - 3.0.0 + 3.0.2 Onlyoffice @@ -29,7 +29,7 @@ https://raw.githubusercontent.com/ONLYOFFICE/onlyoffice-nextcloud/master/screenshots/new.png https://raw.githubusercontent.com/ONLYOFFICE/onlyoffice-nextcloud/master/screenshots/open.png - + OCA\Onlyoffice\AdminSettings diff --git a/appinfo/routes.php b/appinfo/routes.php index e67f92fd..80f769c4 100644 --- a/appinfo/routes.php +++ b/appinfo/routes.php @@ -33,7 +33,7 @@ ["name" => "callback#emptyfile", "url" => "/empty", "verb" => "GET"], ["name" => "callback#track", "url" => "/track", "verb" => "POST"], ["name" => "editor#index", "url" => "/{fileId}", "verb" => "GET"], - ["name" => "editor#public_page", "url" => "/s/{token}", "verb" => "GET"], + ["name" => "editor#public_page", "url" => "/s/{shareToken}", "verb" => "GET"], ["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"], diff --git a/controller/callbackcontroller.php b/controller/callbackcontroller.php index 476d8412..2515c712 100644 --- a/controller/callbackcontroller.php +++ b/controller/callbackcontroller.php @@ -179,7 +179,7 @@ public function download($doc) { list ($hashData, $error) = $this->crypt->ReadHash($doc); if ($hashData === NULL) { - $this->logger->error("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") { @@ -188,7 +188,7 @@ public function download($doc) { } $fileId = $hashData->fileId; - $this->logger->debug("Download: " . $fileId, array("app" => $this->appName)); + $this->logger->debug("Download: $fileId", array("app" => $this->appName)); if (!$this->userSession->isLoggedIn()) { if (!empty($this->config->GetDocumentServerSecret())) { @@ -212,11 +212,20 @@ public function download($doc) { if ($this->userSession->isLoggedIn()) { $userId = $this->userSession->getUser()->getUID(); } else { - $userId = $hashData->userId; + $userId = $hashData->ownerId; + + if (empty($this->userManager->get($userId))) { + $userId = $hashData->userId; + } + + \OC_Util::tearDownFS(); + if (!empty($userId)) { + \OC_Util::setupFS($userId); + } } - $token = isset($hashData->token) ? $hashData->token : NULL; - list ($file, $error) = empty($token) ? $this->getFile($userId, $fileId) : $this->getFileByToken($fileId, $token); + $shareToken = isset($hashData->shareToken) ? $hashData->shareToken : NULL; + list ($file, $error) = empty($shareToken) ? $this->getFile($userId, $fileId) : $this->getFileByToken($fileId, $shareToken); if (isset($error)) { return $error; @@ -230,7 +239,7 @@ public function download($doc) { try { return new DataDownloadResponse($file->getContent(), $file->getName(), $file->getMimeType()); } catch (NotPermittedException $e) { - $this->logger->error("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); @@ -253,7 +262,7 @@ public function emptyfile($doc) { list ($hashData, $error) = $this->crypt->ReadHash($doc); if ($hashData === NULL) { - $this->logger->error("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") { @@ -282,14 +291,14 @@ public function emptyfile($doc) { $template = file_get_contents($templatePath); if (!$template) { - $this->logger->info("Template for download empty not found: " . $templatePath, array("app" => $this->appName)); + $this->logger->info("Template for download empty not found: $templatePath", array("app" => $this->appName)); return new JSONResponse(["message" => $this->trans->t("File not found")], Http::STATUS_NOT_FOUND); } try { return new DataDownloadResponse($template, "new.docx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document"); } catch (NotPermittedException $e) { - $this->logger->error("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); @@ -303,7 +312,7 @@ public function emptyfile($doc) { * @param string $key - the edited document identifier * @param integer $status - the edited status * @param string $url - the link to the edited document to be saved - * @param string $token - access token + * @param string $token - request signature * * @return array * @@ -316,7 +325,7 @@ public function track($doc, $users, $key, $status, $url, $token) { list ($hashData, $error) = $this->crypt->ReadHash($doc); if ($hashData === NULL) { - $this->logger->error("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") { @@ -325,7 +334,7 @@ public function track($doc, $users, $key, $status, $url, $token) { } $fileId = $hashData->fileId; - $this->logger->debug("Track: " . $fileId . " status " . $status, array("app" => $this->appName)); + $this->logger->debug("Track: $fileId status $status", array("app" => $this->appName)); if (!empty($this->config->GetDocumentServerSecret())) { if (!empty($token)) { @@ -367,35 +376,40 @@ public function track($doc, $users, $key, $status, $url, $token) { case "MustSave": case "Corrupted": if (empty($url)) { - $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); + $this->logger->error("Track without url: $fileId status $trackerStatus", array("app" => $this->appName)); + return new JSONResponse(["message" => "Url not found"], Http::STATUS_BAD_REQUEST); } try { - $ownerId = $hashData->ownerId; - $token = isset($hashData->token) ? $hashData->token : NULL; - if (empty($ownerId) && empty($token)) { - $this->logger->error("Track without owner: " . $fileId . " status " . $trackerStatus, array("app" => $this->appName)); - return new JSONResponse(["message" => $this->trans->t("File owner is empty")], Http::STATUS_BAD_REQUEST); - } + $shareToken = isset($hashData->shareToken) ? $hashData->shareToken : NULL; $userId = $users[0]; $user = $this->userManager->get($userId); if (!empty($user)) { $this->userSession->setUser($user); } else { - $this->logger->debug("Track by anonymous " . $userId, array("app" => $this->appName)); + if (empty($shareToken)) { + $this->logger->error("Track without access: $fileId status $trackerStatus", array("app" => $this->appName)); + return new JSONResponse(["message" => "User and token is empty"], Http::STATUS_BAD_REQUEST); + } + + $this->logger->debug("Track by anonymous $userId", array("app" => $this->appName)); + } + + $ownerId = $hashData->ownerId; + if (!empty($this->userManager->get($ownerId))) { + $userId = $ownerId; } \OC_Util::tearDownFS(); - if (!empty($ownerId)) { - \OC_Util::setupFS($ownerId); + if (!empty($userId)) { + \OC_Util::setupFS($userId); } - list ($file, $error) = !empty($ownerId) ? $this->getFile($ownerId, $fileId) : $this->getFileByToken($fileId, $token); + list ($file, $error) = empty($shareToken) ? $this->getFile($userId, $fileId) : $this->getFileByToken($fileId, $shareToken); if (isset($error)) { - $this->logger->error("track error" . $fileId ." " . json_encode($error->getData()), array("app" => $this->appName)); + $this->logger->error("track error$fileId" ." " . json_encode($error->getData()), array("app" => $this->appName)); return $error; } @@ -410,7 +424,7 @@ public function track($doc, $users, $key, $status, $url, $token) { $key = DocumentService::GenerateRevisionId($fileId . $url); try { - $this->logger->debug("Converted from " . $downloadExt . " to " . $curExt, array("app" => $this->appName)); + $this->logger->debug("Converted from $downloadExt to $curExt", array("app" => $this->appName)); $url = $documentService->GetConvertedUri($url, $downloadExt, $curExt, $key); } catch (\Exception $e) { $this->logger->error("Converted on save error: " . $e->getMessage(), array("app" => $this->appName)); @@ -424,7 +438,7 @@ public function track($doc, $users, $key, $status, $url, $token) { $file->putContent($newData); $result = 0; } catch (\Exception $e) { - $this->logger->error("Track " . $trackerStatus . " error: " . $e->getMessage(), array("app" => $this->appName)); + $this->logger->error("Track $trackerStatus error: " . $e->getMessage(), array("app" => $this->appName)); } break; @@ -434,7 +448,7 @@ public function track($doc, $users, $key, $status, $url, $token) { break; } - $this->logger->debug("Track: " . $fileId . " status " . $status . " result " . $result, 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); } @@ -453,16 +467,21 @@ private function getFile($userId, $fileId) { return [NULL, new JSONResponse(["message" => $this->trans->t("FileId is empty")], Http::STATUS_BAD_REQUEST)]; } - $files = $this->root->getUserFolder($userId)->getById($fileId); + try { + $files = $this->root->getUserFolder($userId)->getById($fileId); + } catch (\Exception $e) { + $this->logger->error("getFile: $fileId " . $e->getMessage(), array("app" => $this->appName)); + return [NULL, new JSONResponse(["message" => $this->trans->t("Invalid request")], Http::STATUS_BAD_REQUEST)]; + } if (empty($files)) { - $this->logger->error("Files not found: " . $fileId, array("app" => $this->appName)); + $this->logger->error("Files not found: $fileId", array("app" => $this->appName)); return [NULL, new JSONResponse(["message" => $this->trans->t("Files not found")], Http::STATUS_NOT_FOUND)]; } $file = $files[0]; if (!($file instanceof File)) { - $this->logger->error("File not found: " . $fileId, array("app" => $this->appName)); + $this->logger->error("File not found: $fileId", array("app" => $this->appName)); return [NULL, new JSONResponse(["message" => $this->trans->t("File not found")], Http::STATUS_NOT_FOUND)]; } @@ -473,12 +492,12 @@ private function getFile($userId, $fileId) { * Getting file by token * * @param integer $fileId - file identifier - * @param string $token - access token + * @param string $shareToken - access token * * @return array */ - private function getFileByToken($fileId, $token) { - list ($share, $error) = $this->getShare($token); + private function getFileByToken($fileId, $shareToken) { + list ($share, $error) = $this->getShare($shareToken); if (isset($error)) { return [NULL, $error]; @@ -492,7 +511,12 @@ private function getFileByToken($fileId, $token) { } if ($node instanceof Folder) { - $files = $node->getById($fileId); + try { + $files = $node->getById($fileId); + } catch (\Exception $e) { + $this->logger->error("getFileByToken: $fileId " . $e->getMessage(), array("app" => $this->appName)); + return [NULL, new JSONResponse(["message" => $this->trans->t("Invalid request")], Http::STATUS_NOT_FOUND)]; + } if (empty($files)) { return [NULL, new JSONResponse(["message" => $this->trans->t("File not found")], Http::STATUS_NOT_FOUND)]; @@ -508,18 +532,18 @@ private function getFileByToken($fileId, $token) { /** * Getting share by token * - * @param string $token - access token + * @param string $shareToken - access token * * @return array */ - private function getShare($token) { - if (empty($token)) { + private function getShare($shareToken) { + if (empty($shareToken)) { return [NULL, new JSONResponse(["message" => $this->trans->t("FileId is empty")], Http::STATUS_BAD_REQUEST)]; } $share; try { - $share = $this->shareManager->getShareByToken($token); + $share = $this->shareManager->getShareByToken($shareToken); } catch (ShareNotFound $e) { $this->logger->error("getShare error: " . $e->getMessage(), array("app" => $this->appName)); $share = NULL; diff --git a/controller/editorcontroller.php b/controller/editorcontroller.php index 01f0e914..10c5e362 100644 --- a/controller/editorcontroller.php +++ b/controller/editorcontroller.php @@ -173,28 +173,28 @@ public function __construct($AppName, * * @param string $name - file name * @param string $dir - folder path - * @param string $token - access token + * @param string $shareToken - access token * * @return array * * @NoAdminRequired * @PublicPage */ - public function create($name, $dir, $token = NULL) { - $this->logger->debug("Create: " . $name, array("app" => $this->appName)); + public function create($name, $dir, $shareToken = NULL) { + $this->logger->debug("Create: $name", array("app" => $this->appName)); - if (empty($token) && !$this->config->isUserAllowedToUse()) { + if (empty($shareToken) && !$this->config->isUserAllowedToUse()) { return ["error" => $this->trans->t("Not permitted")]; } - if (empty($token)) { + if (empty($shareToken)) { $userId = $this->userSession->getUser()->getUID(); $userFolder = $this->root->getUserFolder($userId); } else { - list ($userFolder, $error, $share) = $this->getNodeByToken($token); + list ($userFolder, $error, $share) = $this->getNodeByToken($shareToken); if (isset($error)) { - $this->logger->error("Create: " . $error, array("app" => $this->appName)); + $this->logger->error("Create: $error", array("app" => $this->appName)); return ["error" => $error]; } @@ -202,8 +202,8 @@ public function create($name, $dir, $token = NULL) { return ["error" => $this->trans->t("You don't have enough permission to create")]; } - if (!empty($token) && ($share->getPermissions() & Constants::PERMISSION_CREATE) === 0) { - $this->logger->error("Create in public folder without access: " . $fileId, array("app" => $this->appName)); + if (!empty($shareToken) && ($share->getPermissions() & Constants::PERMISSION_CREATE) === 0) { + $this->logger->error("Create in public folder without access: $fileId", array("app" => $this->appName)); return ["error" => $this->trans->t("You do not have enough permissions to view the file")]; } } @@ -211,17 +211,17 @@ public function create($name, $dir, $token = NULL) { $folder = $userFolder->get($dir); if ($folder === NULL) { - $this->logger->error("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->error("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")]; } $ext = strtolower("." . pathinfo($name, PATHINFO_EXTENSION)); - $lang = $this->trans->getLanguageCode(); + $lang = \OC::$server->getL10NFactory("")->get("")->getLanguageCode(); $templatePath = $this->getTemplatePath($lang, $ext); if (!file_exists($templatePath)) { @@ -231,7 +231,7 @@ public function create($name, $dir, $token = NULL) { $template = file_get_contents($templatePath); if (!$template) { - $this->logger->error("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")]; } @@ -242,7 +242,7 @@ public function create($name, $dir, $token = NULL) { $file->putContent($template); } catch (NotPermittedException $e) { - $this->logger->error("Can't create file: " . $name, array("app" => $this->appName)); + $this->logger->error("Can't create file: $name", array("app" => $this->appName)); return ["error" => $this->trans->t("Can't create file")]; } @@ -268,17 +268,17 @@ private function getTemplatePath($lang, $ext) { * Conversion file to Office Open XML format * * @param integer $fileId - file identifier - * @param string $token - access token + * @param string $shareToken - access token * * @return array * * @NoAdminRequired * @PublicPage */ - public function convert($fileId, $token = NULL) { - $this->logger->debug("Convert: " . $fileId, array("app" => $this->appName)); + public function convert($fileId, $shareToken = NULL) { + $this->logger->debug("Convert: $fileId", array("app" => $this->appName)); - if (empty($token) && !$this->config->isUserAllowedToUse()) { + if (empty($shareToken) && !$this->config->isUserAllowedToUse()) { return ["error" => $this->trans->t("Not permitted")]; } @@ -288,15 +288,15 @@ public function convert($fileId, $token = NULL) { $userId = $user->getUID(); } - list ($file, $error, $share) = empty($token) ? $this->getFile($userId, $fileId) : $this->getFileByToken($fileId, $token); + list ($file, $error, $share) = empty($shareToken) ? $this->getFile($userId, $fileId) : $this->getFileByToken($fileId, $shareToken); if (isset($error)) { - $this->logger->error("Convertion: " . $fileId . " " . $error, array("app" => $this->appName)); + $this->logger->error("Convertion: $fileId $error", array("app" => $this->appName)); return ["error" => $error]; } - if (!empty($token) && ($share->getPermissions() & Constants::PERMISSION_CREATE) === 0) { - $this->logger->error("Convertion in public folder without access: " . $fileId, array("app" => $this->appName)); + if (!empty($shareToken) && ($share->getPermissions() & Constants::PERMISSION_CREATE) === 0) { + $this->logger->error("Convertion in public folder without access: $fileId", array("app" => $this->appName)); return ["error" => $this->trans->t("You do not have enough permissions to view the file")]; } @@ -304,12 +304,12 @@ public function convert($fileId, $token = NULL) { $ext = strtolower(pathinfo($fileName, PATHINFO_EXTENSION)); $format = $this->config->FormatsSetting()[$ext]; if (!isset($format)) { - $this->logger->info("Format for convertion not supported: " . $fileName, array("app" => $this->appName)); + $this->logger->info("Format for convertion not supported: $fileName", array("app" => $this->appName)); return ["error" => $this->trans->t("Format is not supported")]; } if (!isset($format["conv"]) || $format["conv"] !== true) { - $this->logger->info("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")]; } @@ -326,12 +326,11 @@ public function convert($fileId, $token = NULL) { $newFileUri; $documentService = new DocumentService($this->trans, $this->config); $key = $this->getKey($file); - $fileId = $file->getId(); - $fileUrl = $this->getUrl($fileId, $token); + $fileUrl = $this->getUrl($file, $shareToken); try { $newFileUri = $documentService->GetConvertedUri($fileUrl, $ext, $internalExtension, $key); } catch (\Exception $e) { - $this->logger->error("GetConvertedUri: " . $fileId . " " . $e->getMessage(), array("app" => $this->appName)); + $this->logger->error("GetConvertedUri: " . $file->getId() . " " . $e->getMessage(), array("app" => $this->appName)); return ["error" => $e->getMessage()]; } @@ -343,7 +342,7 @@ public function convert($fileId, $token = NULL) { try { $newData = $documentService->Request($newFileUri); } catch (\Exception $e) { - $this->logger->error("Failed to download converted file: " . $newFileUri . " " . $e->getMessage(), array("app" => $this->appName)); + $this->logger->error("Failed to download converted file: $newFileUri" . " " . $e->getMessage(), array("app" => $this->appName)); return ["error" => $this->trans->t("Failed to download converted file")]; } @@ -355,7 +354,7 @@ public function convert($fileId, $token = NULL) { $file->putContent($newData); } catch (NotPermittedException $e) { - $this->logger->error("Can't create file: " . $newFileName, array("app" => $this->appName)); + $this->logger->error("Can't create file: $newFileName", array("app" => $this->appName)); return ["error" => $this->trans->t("Can't create file")]; } @@ -377,7 +376,7 @@ public function convert($fileId, $token = NULL) { * @NoAdminRequired */ public function save($name, $dir, $url) { - $this->logger->debug("Save: " . $name, array("app" => $this->appName)); + $this->logger->debug("Save: $name", array("app" => $this->appName)); if (!$this->config->isUserAllowedToUse()) { return ["error" => $this->trans->t("Not permitted")]; @@ -389,11 +388,11 @@ public function save($name, $dir, $url) { $folder = $userFolder->get($dir); if ($folder === NULL) { - $this->logger->error("Folder for saving file was not found: " . $dir, array("app" => $this->appName)); + $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)); + $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")]; } @@ -403,7 +402,7 @@ public function save($name, $dir, $url) { $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)); + $this->logger->error("Failed to download file for saving: $url " . $e->getMessage(), array("app" => $this->appName)); return ["error" => $this->trans->t("Download failed")]; } @@ -414,7 +413,7 @@ public function save($name, $dir, $url) { $file->putContent($newData); } catch (NotPermittedException $e) { - $this->logger->error("Can't save file: " . $name, array("app" => $this->appName)); + $this->logger->error("Can't save file: $name", array("app" => $this->appName)); return ["error" => $this->trans->t("Can't create file")]; } @@ -434,7 +433,7 @@ public function save($name, $dir, $url) { * @NoAdminRequired */ public function url($filePath) { - $this->logger->debug("Save: " . $name, array("app" => $this->appName)); + $this->logger->debug("Save: $name", array("app" => $this->appName)); if (!$this->config->isUserAllowedToUse()) { return ["error" => $this->trans->t("Not permitted")]; @@ -446,18 +445,17 @@ public function url($filePath) { $file = $userFolder->get($filePath); if ($file === NULL) { - $this->logger->error("File for generate presigned url was not found: " . $dir, array("app" => $this->appName)); + $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)); + $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); + $fileUrl = $this->getUrl($file); $result = [ "fileType" => $ext, @@ -476,7 +474,7 @@ public function url($filePath) { * Print editor section * * @param integer $fileId - file identifier - * @param string $token - access token + * @param string $shareToken - access token * @param string $filePath - file path * * @return TemplateResponse|RedirectResponse @@ -484,17 +482,17 @@ public function url($filePath) { * @NoAdminRequired * @NoCSRFRequired */ - public function index($fileId, $token = NULL, $filePath = NULL) { - $this->logger->debug("Open: " . $fileId . " " . $filePath, array("app" => $this->appName)); + public function index($fileId, $shareToken = NULL, $filePath = NULL) { + $this->logger->debug("Open: $fileId $filePath", array("app" => $this->appName)); - if (empty($token) && !$this->userSession->isLoggedIn()) { + if (empty($shareToken) && !$this->userSession->isLoggedIn()) { $redirectUrl = $this->urlGenerator->linkToRoute("core.login.showLoginForm", [ "redirect_url" => $this->request->getRequestUri() ]); return new RedirectResponse($redirectUrl); } - if (empty($token) && !$this->config->isUserAllowedToUse()) { + if (empty($shareToken) && !$this->config->isUserAllowedToUse()) { return $this->renderError($this->trans->t("Not permitted")); } @@ -509,7 +507,7 @@ public function index($fileId, $token = NULL, $filePath = NULL) { "documentServerUrl" => $documentServerUrl, "fileId" => $fileId, "filePath" => $filePath, - "token" => $token + "shareToken" => $shareToken ]; $response = new TemplateResponse($this->appName, "editor", $params); @@ -532,7 +530,7 @@ public function index($fileId, $token = NULL, $filePath = NULL) { * Print public editor section * * @param integer $fileId - file identifier - * @param string $token - access token + * @param string $shareToken - access token * * @return TemplateResponse * @@ -540,8 +538,8 @@ public function index($fileId, $token = NULL, $filePath = NULL) { * @NoCSRFRequired * @PublicPage */ - public function PublicPage($fileId, $token) { - return $this->index($fileId, $token); + public function PublicPage($fileId, $shareToken) { + return $this->index($fileId, $shareToken); } /** @@ -549,7 +547,7 @@ public function PublicPage($fileId, $token) { * * @param integer $fileId - file identifier * @param string $filePath - file path - * @param string $token - access token + * @param string $shareToken - access token * @param bool $desktop - desktop label * * @return array @@ -557,9 +555,9 @@ public function PublicPage($fileId, $token) { * @NoAdminRequired * @PublicPage */ - public function config($fileId, $filePath = NULL, $token = NULL, $desktop = false) { + public function config($fileId, $filePath = NULL, $shareToken = NULL, $desktop = false) { - if (empty($token) && !$this->config->isUserAllowedToUse()) { + if (empty($shareToken) && !$this->config->isUserAllowedToUse()) { return ["error" => $this->trans->t("Not permitted")]; } @@ -569,10 +567,10 @@ public function config($fileId, $filePath = NULL, $token = NULL, $desktop = fals $userId = $user->getUID(); } - list ($file, $error, $share) = empty($token) ? $this->getFile($userId, $fileId, $filePath) : $this->getFileByToken($fileId, $token); + list ($file, $error, $share) = empty($shareToken) ? $this->getFile($userId, $fileId, $filePath) : $this->getFileByToken($fileId, $shareToken); if (isset($error)) { - $this->logger->error("Config: " . $fileId . " " . $error, array("app" => $this->appName)); + $this->logger->error("Config: $fileId $error", array("app" => $this->appName)); return ["error" => $error]; } @@ -580,12 +578,11 @@ public function config($fileId, $filePath = NULL, $token = NULL, $desktop = fals $ext = strtolower(pathinfo($fileName, PATHINFO_EXTENSION)); $format = $this->config->FormatsSetting()[$ext]; if (!isset($format)) { - $this->logger->info("Format is not supported for editing: " . $fileName, array("app" => $this->appName)); + $this->logger->info("Format is not supported for editing: $fileName", array("app" => $this->appName)); return ["error" => $this->trans->t("Format is not supported")]; } - $fileId = $file->getId(); - $fileUrl = $this->getUrl($fileId, $token); + $fileUrl = $this->getUrl($file, $shareToken); $key = $this->getKey($file); $params = [ @@ -598,7 +595,7 @@ public function config($fileId, $filePath = NULL, $token = NULL, $desktop = fals ], "documentType" => $format["type"], "editorConfig" => [ - "lang" => str_replace("_", "-", $this->trans->getLanguageCode()), + "lang" => str_replace("_", "-", \OC::$server->getL10NFactory("")->get("")->getLanguageCode()), "region" => str_replace("_", "-", \OC::$server->getL10NFactory("")->findLocale()) ] ]; @@ -610,7 +607,7 @@ public function config($fileId, $filePath = NULL, $token = NULL, $desktop = fals $canEdit = isset($format["edit"]) && $format["edit"]; $editable = $file->isUpdateable() - && (empty($token) || ($share->getPermissions() & Constants::PERMISSION_UPDATE) === Constants::PERMISSION_UPDATE); + && (empty($shareToken) || ($share->getPermissions() & Constants::PERMISSION_UPDATE) === Constants::PERMISSION_UPDATE); $params["document"]["permissions"]["edit"] = $editable; if ($editable && $canEdit) { $ownerId = NULL; @@ -619,7 +616,7 @@ public function config($fileId, $filePath = NULL, $token = NULL, $desktop = fals $ownerId = $owner->getUID(); } - $hashCallback = $this->crypt->GetHash(["fileId" => $fileId, "ownerId" => $ownerId, "token" => $token, "action" => "track"]); + $hashCallback = $this->crypt->GetHash(["fileId" => $file->getId(), "ownerId" => $ownerId, "shareToken" => $shareToken, "action" => "track"]); $callback = $this->urlGenerator->linkToRouteAbsolute($this->appName . ".callback.track", ["doc" => $hashCallback]); if (!empty($this->config->GetStorageUrl())) { @@ -644,7 +641,7 @@ public function config($fileId, $filePath = NULL, $token = NULL, $desktop = fals $folderLink = NULL; - if (!empty($token)) { + if (!empty($shareToken)) { if (method_exists($share, "getHideDownload") && $share->getHideDownload()) { $params["document"]["permissions"]["download"] = false; $params["document"]["permissions"]["print"] = false; @@ -658,7 +655,7 @@ public function config($fileId, $filePath = NULL, $token = NULL, $desktop = fals $linkAttr = [ "path" => $folderPath, "scrollto" => $file->getName(), - "token" => $token + "token" => $shareToken ]; $folderLink = $this->urlGenerator->linkToRouteAbsolute("files_sharing.sharecontroller.showShare", $linkAttr); } @@ -689,7 +686,7 @@ public function config($fileId, $filePath = NULL, $token = NULL, $desktop = fals $params = $this->setCustomization($params); - $params = $this->setWatermark($params, !empty($token), $userId, $fileId); + $params = $this->setWatermark($params, !empty($shareToken), $userId, $file); if ($this->config->UseDemo()) { $params["editorConfig"]["tenant"] = $this->config->GetSystemValue("instanceid", true); @@ -700,7 +697,7 @@ public function config($fileId, $filePath = NULL, $token = NULL, $desktop = fals $params["token"] = $token; } - $this->logger->debug("Config is generated for: " . $fileId . " with key " . $key, array("app" => $this->appName)); + $this->logger->debug("Config is generated for: $fileId with key $key", array("app" => $this->appName)); return $params; } @@ -719,10 +716,15 @@ private function getFile($userId, $fileId, $filePath = NULL) { return [NULL, $this->trans->t("FileId is empty"), NULL]; } - $files = $this->root->getUserFolder($userId)->getById($fileId); + try { + $files = $this->root->getUserFolder($userId)->getById($fileId); + } catch (\Exception $e) { + $this->logger->error("getFile: $fileId " . $e->getMessage(), array("app" => $this->appName)); + return [NULL, $this->trans->t("Invalid request"), NULL]; + } if (empty($files)) { - $this->logger->info("Files not found: " . $fileId, array("app" => $this->appName)); + $this->logger->info("Files not found: $fileId", array("app" => $this->appName)); return [NULL, $this->trans->t("File not found"), NULL]; } @@ -748,22 +750,27 @@ private function getFile($userId, $fileId, $filePath = NULL) { * Getting file by token * * @param integer $fileId - file identifier - * @param string $token - access token + * @param string $shareToken - access token * * @return array */ - private function getFileByToken($fileId, $token) { - list ($node, $error, $share) = $this->getNodeByToken($token); + private function getFileByToken($fileId, $shareToken) { + list ($node, $error, $share) = $this->getNodeByToken($shareToken); if (isset($error)) { return [NULL, $error, NULL]; } if ($node instanceof Folder) { - $files = $node->getById($fileId); + try { + $files = $node->getById($fileId); + } catch (\Exception $e) { + $this->logger->error("getFileByToken: $fileId " . $e->getMessage(), array("app" => $this->appName)); + return [NULL, $this->trans->t("Invalid request"), NULL]; + } if (empty($files)) { - $this->logger->info("Files not found: " . $fileId, array("app" => $this->appName)); + $this->logger->info("Files not found: $fileId", array("app" => $this->appName)); return [NULL, $this->trans->t("File not found"), NULL]; } $file = $files[0]; @@ -777,12 +784,12 @@ private function getFileByToken($fileId, $token) { /** * Getting file by token * - * @param string $token - access token + * @param string $shareToken - access token * * @return array */ - private function getNodeByToken($token) { - list ($share, $error) = $this->getShare($token); + private function getNodeByToken($shareToken) { + list ($share, $error) = $this->getShare($shareToken); if (isset($error)) { return [NULL, $error, NULL]; @@ -805,18 +812,18 @@ private function getNodeByToken($token) { /** * Getting share by token * - * @param string $token - access token + * @param string $shareToken - access token * * @return array */ - private function getShare($token) { - if (empty($token)) { + private function getShare($shareToken) { + if (empty($shareToken)) { return [NULL, $this->trans->t("FileId is empty")]; } $share; try { - $share = $this->shareManager->getShareByToken($token); + $share = $this->shareManager->getShareByToken($shareToken); } catch (ShareNotFound $e) { $this->logger->error("getShare error: " . $e->getMessage(), array("app" => $this->appName)); $share = NULL; @@ -855,12 +862,12 @@ private function getKey($file) { /** * Generate secure link to download document * - * @param integer $fileId - file identifier - * @param string $token - access token + * @param integer $file - file + * @param string $shareToken - access token * * @return string */ - private function getUrl($fileId, $token = NULL) { + private function getUrl($file, $shareToken = NULL) { $user = $this->userSession->getUser(); $userId = NULL; @@ -868,7 +875,13 @@ private function getUrl($fileId, $token = NULL) { $userId = $user->getUID(); } - $hashUrl = $this->crypt->GetHash(["fileId" => $fileId, "userId" => $userId, "token" => $token, "action" => "download"]); + $ownerId = NULL; + $owner = $file->getOwner(); + if (!empty($owner)) { + $ownerId = $owner->getUID(); + } + + $hashUrl = $this->crypt->GetHash(["fileId" => $file->getId(), "userId" => $userId, "ownerId" => $ownerId, "shareToken" => $shareToken, "action" => "download"]); $fileUrl = $this->urlGenerator->linkToRouteAbsolute($this->appName . ".callback.download", ["doc" => $hashUrl]); @@ -949,14 +962,14 @@ private function setCustomization($params) { * @param array params - file parameters * @param bool isPublic - with access token * @param string userId - user identifier - * @param string fileId - file identifier + * @param string file - file * * @return array */ - private function setWatermark($params, $isPublic, $userId, $fileId) { - $watermarkTemplate = $this->getWatermarkText($isPublic, $userId, $fileId, + private function setWatermark($params, $isPublic, $userId, $file) { + $watermarkTemplate = $this->getWatermarkText($isPublic, $userId, $file, $params["document"]["permissions"]["edit"] !== false, - $params["document"]["permissions"]["download"] !== false); + !array_key_exists("download", $params["document"]["permissions"]) || $params["document"]["permissions"]["download"] !== false); if ($watermarkTemplate !== false) { $replacements = [ @@ -993,15 +1006,22 @@ private function setWatermark($params, $isPublic, $userId, $fileId) { /** * Should watermark * + * @param bool isPublic - with access token + * @param string userId - user identifier + * @param string file - file + * @param bool canEdit - edit permission + * @param bool canDownload - download permission + * * @return bool|string */ - private function getWatermarkText($isPublic, $userId, $fileId, $canEdit, $canDownload) { + private function getWatermarkText($isPublic, $userId, $file, $canEdit, $canDownload) { $watermarkSettings = $this->config->GetWatermarkSettings(); if (!$watermarkSettings["enabled"]) { return false; } $watermarkText = $watermarkSettings["text"]; + $fileId = $file->getId(); if ($isPublic) { if ($watermarkSettings["linkAll"]) { @@ -1023,7 +1043,7 @@ private function getWatermarkText($isPublic, $userId, $fileId, $canEdit, $canDow } } } else { - if ($watermarkSettings["shareAll"]) { + if ($watermarkSettings["shareAll"] && $file->getOwner()->getUID() !== $userId) { return $watermarkText; } if ($watermarkSettings["shareRead"] && !$canEdit) { diff --git a/controller/settingscontroller.php b/controller/settingscontroller.php index cc959302..1bb1054b 100644 --- a/controller/settingscontroller.php +++ b/controller/settingscontroller.php @@ -331,7 +331,7 @@ private function checkDocServiceUrl() { try { $documentService->Request($convertedFileUri); } catch (\Exception $e) { - $this->logger->error("Request converted file on check error: " . $convertedFileUri . " " . $e->getMessage(), array("app" => $this->appName)); + $this->logger->error("Request converted file on check error: " . $e->getMessage(), array("app" => $this->appName)); return $e->getMessage(); } diff --git a/js/editor.js b/js/editor.js index 6024646d..64ffef32 100644 --- a/js/editor.js +++ b/js/editor.js @@ -41,8 +41,8 @@ var fileId = $("#iframeEditor").data("id"); var filePath = $("#iframeEditor").data("path"); - var fileToken = $("#iframeEditor").data("token"); - if (!fileId && !fileToken) { + var shareToken = $("#iframeEditor").data("sharetoken"); + if (!fileId && !shareToken) { displayError(t(OCA.Onlyoffice.AppName, "FileId is empty")); return; } @@ -61,8 +61,8 @@ if (filePath) { params.push("filePath=" + encodeURIComponent(filePath)); } - if (fileToken) { - params.push("token=" + encodeURIComponent(fileToken)); + if (shareToken) { + params.push("shareToken=" + encodeURIComponent(shareToken)); } if (OCA.Onlyoffice.Desktop) { params.push("desktop=true"); diff --git a/js/main.js b/js/main.js index 8db38f63..5bd4d3e4 100644 --- a/js/main.js +++ b/js/main.js @@ -51,7 +51,7 @@ }; if ($("#isPublic").val()) { - createData.token = encodeURIComponent($("#sharingToken").val()); + createData.shareToken = encodeURIComponent($("#sharingToken").val()); } $.post(OC.generateUrl("apps/" + OCA.Onlyoffice.AppName + "/ajax/new"), @@ -87,9 +87,9 @@ }); if ($("#isPublic").val()) { - url = OC.generateUrl("apps/" + OCA.Onlyoffice.AppName + "/s/{token}?fileId={fileId}", + url = OC.generateUrl("apps/" + OCA.Onlyoffice.AppName + "/s/{shareToken}?fileId={fileId}", { - token: encodeURIComponent($("#sharingToken").val()), + shareToken: encodeURIComponent($("#sharingToken").val()), fileId: fileId }); } @@ -117,7 +117,7 @@ }; if ($("#isPublic").val()) { - convertData.token = encodeURIComponent($("#sharingToken").val()); + convertData.shareToken = encodeURIComponent($("#sharingToken").val()); } $.post(OC.generateUrl("apps/" + OCA.Onlyoffice.AppName + "/ajax/convert"), diff --git a/js/settings.js b/js/settings.js index 01764ef8..bab25e7e 100644 --- a/js/settings.js +++ b/js/settings.js @@ -101,7 +101,7 @@ multiple: true, separator: "|", toggleSelect: true, - placeholder: t("systemtags_manager", "Select tag�"), + placeholder: t(OCA.Onlyoffice.AppName, "Select tag"), query: _.debounce(function(query) { query.callback({ results: OC.SystemTags.collection.filterByName(query.term) diff --git a/l10n/bg.js b/l10n/bg.js index d583834e..8c9eed20 100644 --- a/l10n/bg.js +++ b/l10n/bg.js @@ -23,7 +23,7 @@ OC.L10N.register( "Loading, please wait." : "Зареждане. Моля, изчакайте.", "File created" : "Файлът е създаден", "Open in ONLYOFFICE" : "Отвори в ONLYOFFICE", - "Convert with ONLYOFFICE" : "Конвертирай с ONLYOFFICE", + "Convert with ONLYOFFICE" : "Конвертирай с ONLYOFFICE", "Document" : "Документ", "Spreadsheet" : "Електронна таблица", "Presentation" : "Презентация", @@ -40,7 +40,7 @@ OC.L10N.register( "Secret key (leave blank to disable)" : "Секретен ключ (оставете празно за забрана)", "Open file in the same tab" : "Отваряне на файла в същия прозорец", "The default application for opening the format" : "Приложение по подразбиране за отваряне на следните формати", - "Open the file for editing (due to format restrictions, the data might be lost when saving to the formats from the list below)" : "Отваряне на файла за редактиране (според ограниченята на формата данните могат да бъдат загубени при запис във формати от списъка по-долу)", + "Open the file for editing (due to format restrictions, the data might be lost when saving to the formats from the list below)" : "Отваряне на файла за редактиране (според ограниченята на формата данните могат да бъдат загубени при запис във формати от списъка по-долу)", "View details" : "Виж детайли", "Save" : "Запази", "Mixed Active Content is not allowed. HTTPS address for Document Server is required." : "Смесеното активно съдържание е недопустимо. За услугата за редактиране на документи е необходимо използването на HTTPS-адрес.", @@ -48,6 +48,7 @@ OC.L10N.register( "Save as" : "Запази като", "File saved" : "Файлът е запазен", "Insert image" : "Вмъкване на изображение", - "Select recipients" : "Изберете получатели" + "Select recipients" : "Изберете получатели", + "Select tag" : "Изберете етикет" }, "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.json b/l10n/bg.json index 925e0bad..8eda69e8 100644 --- a/l10n/bg.json +++ b/l10n/bg.json @@ -21,7 +21,7 @@ "Loading, please wait." : "Зареждане. Моля, изчакайте.", "File created" : "Файлът е създаден", "Open in ONLYOFFICE" : "Отвори в ONLYOFFICE", - "Convert with ONLYOFFICE" : "Конвертирай с ONLYOFFICE", + "Convert with ONLYOFFICE" : "Конвертирай с ONLYOFFICE", "Document" : "Документ", "Spreadsheet" : "Електронна таблица", "Presentation" : "Презентация", @@ -38,7 +38,7 @@ "Secret key (leave blank to disable)" : "Секретен ключ (оставете празно за забрана)", "Open file in the same tab" : "Отваряне на файла в същия прозорец", "The default application for opening the format" : "Приложение по подразбиране за отваряне на следните формати", - "Open the file for editing (due to format restrictions, the data might be lost when saving to the formats from the list below)" : "Отваряне на файла за редактиране (според ограниченята на формата данните могат да бъдат загубени при запис във формати от списъка по-долу)", + "Open the file for editing (due to format restrictions, the data might be lost when saving to the formats from the list below)" : "Отваряне на файла за редактиране (според ограниченята на формата данните могат да бъдат загубени при запис във формати от списъка по-долу)", "View details" : "Виж детайли", "Save" : "Запази", "Mixed Active Content is not allowed. HTTPS address for Document Server is required." : "Смесеното активно съдържание е недопустимо. За услугата за редактиране на документи е необходимо използването на HTTPS-адрес.", @@ -46,6 +46,7 @@ "Save as" : "Запази като", "File saved" : "Файлът е запазен", "Insert image" : "Вмъкване на изображение", - "Select recipients" : "Изберете получатели" + "Select recipients" : "Изберете получатели", + "Select tag" : "Изберете етикет" },"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 1fcb97c8..a2821ecd 100644 --- a/l10n/de.js +++ b/l10n/de.js @@ -43,7 +43,7 @@ OC.L10N.register( "Open the file for editing (due to format restrictions, the data might be lost when saving to the formats from the list below)" : "Öffne die Datei zum Bearbeiten (aufgrund von Formateinschränkungen können die Daten beim Speichern in den Formaten aus der folgenden Liste verloren gehen)", "View details" : "Details anzeigen", "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.", + "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.", "Restrict access to editors to following groups" : "Den Zugriff auf Editoren auf folgende Gruppen gewähren", "Server settings" : "Servereinstellungen", "Common settings" : "Allgemeine Einstellungen", @@ -51,7 +51,7 @@ OC.L10N.register( "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 Feedback & Support menu button" : "Feedback-& Support-Taste anzeigen", "Display Help menu button" : "Hilfetaste anzeigen", "Display toolbar tabs" : "Symbolleiste-Registerkarten anzeigen", "Save as" : "Speichern als", @@ -76,6 +76,7 @@ OC.L10N.register( "Show watermark for all link shares" : "Wasserzeichen auf allen Link-Freigaben anzeigen", "Show watermark for download hidden shares" : "Wasserzeichen auf ‘Download verbergen’ Freigaben anzeigen", "Show watermark for read only link shares" : "Wasserzeichen auf schreibgeschützten Link-Freigaben anzeigen", - "Show watermark on link shares with specific system tags" : "Wasserzeichen auf Link-Freigaben mit bestimmten System-Tags anzeigen" + "Show watermark on link shares with specific system tags" : "Wasserzeichen auf Link-Freigaben mit bestimmten System-Tags anzeigen", + "Select tag" : "Wähle einen Tag" }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/de.json b/l10n/de.json index 23919147..9f297568 100644 --- a/l10n/de.json +++ b/l10n/de.json @@ -41,7 +41,7 @@ "Open the file for editing (due to format restrictions, the data might be lost when saving to the formats from the list below)" : "Öffne die Datei zum Bearbeiten (aufgrund von Formateinschränkungen können die Daten beim Speichern in den Formaten aus der folgenden Liste verloren gehen)", "View details" : "Details anzeigen", "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.", + "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.", "Restrict access to editors to following groups" : "Den Zugriff auf Editoren auf folgende Gruppen gewähren", "Server settings" : "Servereinstellungen", "Common settings" : "Allgemeine Einstellungen", @@ -49,7 +49,7 @@ "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 Feedback & Support menu button" : "Feedback-& Support-Taste anzeigen", "Display Help menu button" : "Hilfetaste anzeigen", "Display toolbar tabs" : "Symbolleiste-Registerkarten anzeigen", "Save as" : "Speichern als", @@ -74,6 +74,7 @@ "Show watermark for all link shares" : "Wasserzeichen auf allen Link-Freigaben anzeigen", "Show watermark for download hidden shares" : "Wasserzeichen auf ‘Download verbergen’ Freigaben anzeigen", "Show watermark for read only link shares" : "Wasserzeichen auf schreibgeschützten Link-Freigaben anzeigen", - "Show watermark on link shares with specific system tags" : "Wasserzeichen auf Link-Freigaben mit bestimmten System-Tags anzeigen" + "Show watermark on link shares with specific system tags" : "Wasserzeichen auf Link-Freigaben mit bestimmten System-Tags anzeigen", + "Select tag" : "Wähle einen Tag" },"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 fae5de40..fb5c34a6 100644 --- a/l10n/de_DE.js +++ b/l10n/de_DE.js @@ -43,7 +43,7 @@ OC.L10N.register( "Open the file for editing (due to format restrictions, the data might be lost when saving to the formats from the list below)" : "Öffnen Sie die Datei zum Bearbeiten (aufgrund von Formateinschränkungen können die Daten beim Speichern in den Formaten aus der folgenden Liste verloren gehen)", "View details" : "Details anzeigen", "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.", + "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.", "Restrict access to editors to following groups" : "Den Zugriff auf Editoren auf folgende Gruppen gewähren", "Server settings" : "Servereinstellungen", "Common settings" : "Allgemeine Einstellungen", @@ -51,7 +51,7 @@ OC.L10N.register( "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 Feedback & Support menu button" : "Feedback-& Support-Taste anzeigen", "Display Help menu button" : "Hilfetaste anzeigen", "Display toolbar tabs" : "Symbolleiste-Registerkarten anzeigen", "Save as" : "Speichern als", @@ -76,6 +76,7 @@ OC.L10N.register( "Show watermark for all link shares" : "Wasserzeichen auf allen Link-Freigaben anzeigen", "Show watermark for download hidden shares" : "Wasserzeichen auf ‘Download verbergen’ Freigaben anzeigen", "Show watermark for read only link shares" : "Wasserzeichen auf schreibgeschützten Link-Freigaben anzeigen", - "Show watermark on link shares with specific system tags" : "Wasserzeichen auf Link-Freigaben mit bestimmten System-Tags anzeigen" + "Show watermark on link shares with specific system tags" : "Wasserzeichen auf Link-Freigaben mit bestimmten System-Tags anzeigen", + "Select tag" : "Wählen Sie ein Tag" }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/de_DE.json b/l10n/de_DE.json index 1903bf70..0df7f0ca 100644 --- a/l10n/de_DE.json +++ b/l10n/de_DE.json @@ -41,7 +41,7 @@ "Open the file for editing (due to format restrictions, the data might be lost when saving to the formats from the list below)" : "Öffnen Sie die Datei zum Bearbeiten (aufgrund von Formateinschränkungen können die Daten beim Speichern in den Formaten aus der folgenden Liste verloren gehen)", "View details" : "Details anzeigen", "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.", + "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.", "Restrict access to editors to following groups" : "Den Zugriff auf Editoren auf folgende Gruppen gewähren", "Server settings" : "Servereinstellungen", "Common settings" : "Allgemeine Einstellungen", @@ -49,7 +49,7 @@ "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 Feedback & Support menu button" : "Feedback-& Support-Taste anzeigen", "Display Help menu button" : "Hilfetaste anzeigen", "Display toolbar tabs" : "Symbolleiste-Registerkarten anzeigen", "Save as" : "Speichern als", @@ -74,6 +74,7 @@ "Show watermark for all link shares" : "Wasserzeichen auf allen Link-Freigaben anzeigen", "Show watermark for download hidden shares" : "Wasserzeichen auf ‘Download verbergen’ Freigaben anzeigen", "Show watermark for read only link shares" : "Wasserzeichen auf schreibgeschützten Link-Freigaben anzeigen", - "Show watermark on link shares with specific system tags" : "Wasserzeichen auf Link-Freigaben mit bestimmten System-Tags anzeigen" + "Show watermark on link shares with specific system tags" : "Wasserzeichen auf Link-Freigaben mit bestimmten System-Tags anzeigen", + "Select tag" : "Wählen Sie ein Tag" },"pluralForm" :"nplurals=2; plural=(n != 1);" } \ No newline at end of file diff --git a/l10n/es.js b/l10n/es.js index a87062bf..58258212 100644 --- a/l10n/es.js +++ b/l10n/es.js @@ -23,7 +23,7 @@ OC.L10N.register( "Loading, please wait." : "Cargando, espere, por favor.", "File created" : "Archivo creado", "Open in ONLYOFFICE" : "Abrir en ONLYOFFICE", - "Convert with ONLYOFFICE" : "Convertir con ONLYOFFICE", + "Convert with ONLYOFFICE" : "Convertir con ONLYOFFICE", "Document" : "Documento", "Spreadsheet" : "Hoja de cálculo", "Presentation" : "Presentación", @@ -43,14 +43,14 @@ OC.L10N.register( "Open the file for editing (due to format restrictions, the data might be lost when saving to the formats from the list below)" : "Abrir archivo para editar (debido a las restricciones de formato los datos podrían perderse al guardar en los formatos de la siguiente lista)", "View details" : "Ver detalles", "Save" : "Guardar", - "Mixed Active Content is not allowed. HTTPS address for Document Server is required." : "Contenido Mixto Activo no está permitido. Se requiere la dirección HTTPS para Servidor de Documentos.", - "Restrict access to editors to following groups" : "Restringir el acceso a editores a siguientes grupos", + "Mixed Active Content is not allowed. HTTPS address for Document Server is required." : "Contenido Mixto Activo no está permitido. Se requiere la dirección HTTPS para Servidor de Documentos.", + "Restrict access to editors to following groups" : "Restringir el acceso a editores a siguientes grupos", "Server settings" : "Ajustes de servidor", "Common settings" : "Ajustes comunes", "Editor customization settings" : "Ajustes del editor", - "The customization section allows personalizing 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 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", @@ -59,6 +59,7 @@ OC.L10N.register( "Insert image" : "Insertar imagen", "Select recipients" : "Seleccionar destinatarios", "Secure view enables you to secure documents by embedding a watermark" : "La vista segura permite asegurar documentos mediante la inserción de una marca de agua en ellos", - "Supported placeholders" : "Marcadores soportados" + "Supported placeholders" : "Marcadores soportados", + "Select tag" : "Seleccionar etiqueta" }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/es.json b/l10n/es.json index 76cc28aa..311743bf 100644 --- a/l10n/es.json +++ b/l10n/es.json @@ -21,7 +21,7 @@ "Loading, please wait." : "Cargando, espere, por favor.", "File created" : "Archivo creado", "Open in ONLYOFFICE" : "Abrir en ONLYOFFICE", - "Convert with ONLYOFFICE" : "Convertir con ONLYOFFICE", + "Convert with ONLYOFFICE" : "Convertir con ONLYOFFICE", "Document" : "Documento", "Spreadsheet" : "Hoja de cálculo", "Presentation" : "Presentación", @@ -41,14 +41,14 @@ "Open the file for editing (due to format restrictions, the data might be lost when saving to the formats from the list below)" : "Abrir archivo para editar (debido a las restricciones de formato los datos podrían perderse al guardar en los formatos de la siguiente lista)", "View details" : "Ver detalles", "Save" : "Guardar", - "Mixed Active Content is not allowed. HTTPS address for Document Server is required." : "Contenido Mixto Activo no está permitido. Se requiere la dirección HTTPS para Servidor de Documentos.", - "Restrict access to editors to following groups" : "Restringir el acceso a editores a siguientes grupos", + "Mixed Active Content is not allowed. HTTPS address for Document Server is required." : "Contenido Mixto Activo no está permitido. Se requiere la dirección HTTPS para Servidor de Documentos.", + "Restrict access to editors to following groups" : "Restringir el acceso a editores a siguientes grupos", "Server settings" : "Ajustes de servidor", "Common settings" : "Ajustes comunes", "Editor customization settings" : "Ajustes del editor", - "The customization section allows personalizing 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 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", @@ -57,6 +57,7 @@ "Insert image" : "Insertar imagen", "Select recipients" : "Seleccionar destinatarios", "Secure view enables you to secure documents by embedding a watermark" : "La vista segura permite asegurar documentos mediante la inserción de una marca de agua en ellos", - "Supported placeholders" : "Marcadores soportados" + "Supported placeholders" : "Marcadores soportados", + "Select tag" : "Seleccionar etiqueta" },"pluralForm" :"nplurals=2; plural=(n != 1);" } \ No newline at end of file diff --git a/l10n/fr.js b/l10n/fr.js index 8dbf4aa5..8236b78e 100644 --- a/l10n/fr.js +++ b/l10n/fr.js @@ -57,6 +57,7 @@ OC.L10N.register( "Save as" : "Enregistrer sous", "File saved" : "Le fichier a été enregistré", "Insert image" : "Insérer une image", - "Select recipients" : "Sélectionner les destinataires" + "Select recipients" : "Sélectionner les destinataires", + "Select tag" : "Sélectionner une étiquette" }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/fr.json b/l10n/fr.json index 0d3e6539..2e4ed18d 100644 --- a/l10n/fr.json +++ b/l10n/fr.json @@ -55,6 +55,7 @@ "Save as" : "Enregistrer sous", "File saved" : "Le fichier a été enregistré", "Insert image" : "Insérer une image", - "Select recipients" : "Sélectionner les destinataires" + "Select recipients" : "Sélectionner les destinataires", + "Select tag" : "Sélectionner une étiquette" },"pluralForm" :"nplurals=2; plural=(n != 1);" } diff --git a/l10n/pt_BR.js b/l10n/pt_BR.js index 8757b72f..a765e072 100644 --- a/l10n/pt_BR.js +++ b/l10n/pt_BR.js @@ -59,6 +59,7 @@ OC.L10N.register( "Insert image" : "Inserir imagem", "Select recipients" : "Selecione os destinatários", "Secure view enables you to secure documents by embedding a watermark" : "A visualização segura permite proteger documentos incorporando uma marca d'água", - "Supported placeholders" : "Espaços reservados suportados" + "Supported placeholders" : "Espaços reservados suportados", + "Select tag" : "Selecionar etiqueta" }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/pt_BR.json b/l10n/pt_BR.json index f0000050..1ea90a4d 100644 --- a/l10n/pt_BR.json +++ b/l10n/pt_BR.json @@ -57,6 +57,7 @@ "Insert image" : "Inserir imagem", "Select recipients" : "Selecione os destinatários", "Secure view enables you to secure documents by embedding a watermark" : "A visualização segura permite proteger documentos incorporando uma marca d'água", - "Supported placeholders" : "Espaços reservados suportados" + "Supported placeholders" : "Espaços reservados suportados", + "Select tag" : "Selecionar etiqueta" },"pluralForm" :"nplurals=2; plural=(n != 1);" } diff --git a/l10n/ru.js b/l10n/ru.js index 555cc401..68293b44 100644 --- a/l10n/ru.js +++ b/l10n/ru.js @@ -23,7 +23,7 @@ OC.L10N.register( "Loading, please wait." : "Загрузка. Пожалуйста, подождите.", "File created" : "Файл создан", "Open in ONLYOFFICE" : "Открыть в ONLYOFFICE", - "Convert with ONLYOFFICE" : "Конвертировать в ONLYOFFICE", + "Convert with ONLYOFFICE" : "Конвертировать в ONLYOFFICE", "Document" : "Документ", "Spreadsheet" : "Электронная таблица", "Presentation" : "Презентация", @@ -40,7 +40,7 @@ OC.L10N.register( "Secret key (leave blank to disable)" : "Секретный ключ (оставьте пустым для отключения)", "Open file in the same tab" : "Открыть файл в той же вкладке", "The default application for opening the format" : "Приложение по умолчанию для открытия формата", - "Open the file for editing (due to format restrictions, the data might be lost when saving to the formats from the list below)" : "Открыть файл на редактирование (из-за ограничений формата данные могут быть утеряны при сохранении в форматы из списка ниже)", + "Open the file for editing (due to format restrictions, the data might be lost when saving to the formats from the list below)" : "Открыть файл на редактирование (из-за ограничений формата данные могут быть утеряны при сохранении в форматы из списка ниже)", "View details" : "Подробнее", "Save" : "Сохранить", "Mixed Active Content is not allowed. HTTPS address for Document Server is required." : "Смешанное активное содержимое запрещено. Для Сервера документов необходимо использовать HTTPS-адрес.", @@ -76,6 +76,7 @@ OC.L10N.register( "Show watermark for all link shares" : "Отображать водяной знак при доступе по ссылке", "Show watermark for download hidden shares" : "Отображать водяной знак при доступе без скачивания", "Show watermark for read only link shares" : "Отображать водяной знак при доступе только на чтение по ссылке", - "Show watermark on link shares with specific system tags" : "Отображать водяной знак при доступе по ссылке с определенными системными метками" + "Show watermark on link shares with specific system tags" : "Отображать водяной знак при доступе по ссылке с определенными системными метками", + "Select tag" : "Выберите метку" }, "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 f5ffd27c..422cb052 100644 --- a/l10n/ru.json +++ b/l10n/ru.json @@ -21,7 +21,7 @@ "Loading, please wait." : "Загрузка. Пожалуйста, подождите.", "File created" : "Файл создан", "Open in ONLYOFFICE" : "Открыть в ONLYOFFICE", - "Convert with ONLYOFFICE" : "Конвертировать в ONLYOFFICE", + "Convert with ONLYOFFICE" : "Конвертировать в ONLYOFFICE", "Document" : "Документ", "Spreadsheet" : "Электронная таблица", "Presentation" : "Презентация", @@ -38,7 +38,7 @@ "Secret key (leave blank to disable)" : "Секретный ключ (оставьте пустым для отключения)", "Open file in the same tab" : "Открыть файл в той же вкладке", "The default application for opening the format" : "Приложение по умолчанию для открытия формата", - "Open the file for editing (due to format restrictions, the data might be lost when saving to the formats from the list below)" : "Открыть файл на редактирование (из-за ограничений формата данные могут быть утеряны при сохранении в форматы из списка ниже)", + "Open the file for editing (due to format restrictions, the data might be lost when saving to the formats from the list below)" : "Открыть файл на редактирование (из-за ограничений формата данные могут быть утеряны при сохранении в форматы из списка ниже)", "View details" : "Подробнее", "Save" : "Сохранить", "Mixed Active Content is not allowed. HTTPS address for Document Server is required." : "Смешанное активное содержимое запрещено. Для Сервера документов необходимо использовать HTTPS-адрес.", @@ -74,6 +74,7 @@ "Show watermark for all link shares" : "Отображать водяной знак при доступе по ссылке", "Show watermark for download hidden shares" : "Отображать водяной знак при доступе без скачивания", "Show watermark for read only link shares" : "Отображать водяной знак при доступе только на чтение по ссылке", - "Show watermark on link shares with specific system tags" : "Отображать водяной знак при доступе по ссылке с определенными системными метками" + "Show watermark on link shares with specific system tags" : "Отображать водяной знак при доступе по ссылке с определенными системными метками", + "Select tag" : "Выберите метку" },"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 245b1425..d09b1c15 100644 --- a/l10n/sv.js +++ b/l10n/sv.js @@ -58,7 +58,25 @@ OC.L10N.register( "File saved" : "Filen har sparats", "Insert image" : "Infoga bild", "Select recipients" : "Välj mottagare", - "Secure view enables you to secure documents by embedding a watermark" : "Med säker vy kan du säkra dokument genom att bädda in ett vattenstämpel", - "Supported placeholders" : "Platshållare som stöds" + "Connect to demo ONLYOFFICE Document Server" : "Anslut till demo ONLYOFFICE Dokumentserver", + "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." : "Detta är en offentlig testserver, använd den inte för privat känslig information. Servern kommer att finnas tillgänglig under en 30-dagarsperiod.", + "The 30-day test period is over, you can no longer connect to demo ONLYOFFICE Document Server." : "När 30-dagars testperioden är över, kan du inte längre ansluta till demo ONLYOFFICE Dokumentserver.", + "You are using public demo ONLYOFFICE Document Server. Please do not store private sensitive data." : "Du använder en offentlig demo ONLYOFFICE Dokumentserver. Lagra inte privat känslig information.", + "Secure view settings" : "Säkra vyinställningar", + "Secure view enables you to secure documents by embedding a watermark" : "Med säker vy kan du säkra dokument genom att bädda in en vattenstämpel", + "Enable watermarking" : "Aktivera vattenstämpel", + "Watermark text" : "Text för vattenmärke", + "DO NOT SHARE THIS" : "DELA INTE DETTA", + "Show watermark on tagged files" : "Visa vattenstämpel på taggade filer", + "Show watermark for users of groups" : "Visa vattenstämpel för användare i grupper", + "Supported placeholders" : "Platshållare som stöds", + "Show watermark for all shares" : "Visa vattenstämpel för alla delningar", + "Show watermark for read only shares" : "Visa vattenmärke för skrivskyddade delningar", + "Link shares" : "Länkdelningar", + "Show watermark for all link shares" : "Visa vattenstämpel för alla länkdelningar", + "Show watermark for download hidden shares" : "Visa vattenstämpel för delningar med gömd nedladdning", + "Show watermark for read only link shares" : "Visa vattenmärke för skrivskyddade länkdelningar", + "Show watermark on link shares with specific system tags" : "Visa vattenmärke för länkdelningar med specifika systemtaggar", + "Select tag" : "Välj tagg" }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/sv.json b/l10n/sv.json index e73f2f5e..cf49eabd 100644 --- a/l10n/sv.json +++ b/l10n/sv.json @@ -56,7 +56,25 @@ "File saved" : "Filen har sparats", "Insert image" : "Infoga bild", "Select recipients" : "Välj mottagare", - "Secure view enables you to secure documents by embedding a watermark" : "Med säker vy kan du säkra dokument genom att bädda in ett vattenstämpel", - "Supported placeholders" : "Platshållare som stöds" + "Connect to demo ONLYOFFICE Document Server" : "Anslut till demo ONLYOFFICE Dokumentserver", + "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." : "Detta är en offentlig testserver, använd den inte för privat känslig information. Servern kommer att finnas tillgänglig under en 30-dagarsperiod.", + "The 30-day test period is over, you can no longer connect to demo ONLYOFFICE Document Server." : "När 30-dagars testperioden är över, kan du inte längre ansluta till demo ONLYOFFICE Dokumentserver.", + "You are using public demo ONLYOFFICE Document Server. Please do not store private sensitive data." : "Du använder en offentlig demo ONLYOFFICE Dokumentserver. Lagra inte privat känslig information.", + "Secure view settings" : "Säkra vyinställningar", + "Secure view enables you to secure documents by embedding a watermark" : "Med säker vy kan du säkra dokument genom att bädda in en vattenstämpel", + "Enable watermarking" : "Aktivera vattenstämpel", + "Watermark text" : "Text för vattenmärke", + "DO NOT SHARE THIS" : "DELA INTE DETTA", + "Show watermark on tagged files" : "Visa vattenstämpel på taggade filer", + "Show watermark for users of groups" : "Visa vattenstämpel för användare i grupper", + "Supported placeholders" : "Platshållare som stöds", + "Show watermark for all shares" : "Visa vattenstämpel för alla delningar", + "Show watermark for read only shares" : "Visa vattenmärke för skrivskyddade delningar", + "Link shares" : "Länkdelningar", + "Show watermark for all link shares" : "Visa vattenstämpel för alla länkdelningar", + "Show watermark for download hidden shares" : "Visa vattenstämpel för delningar med gömd nedladdning", + "Show watermark for read only link shares" : "Visa vattenmärke för skrivskyddade länkdelningar", + "Show watermark on link shares with specific system tags" : "Visa vattenmärke för länkdelningar med specifika systemtaggar", + "Select tag" : "Välj tagg" },"pluralForm" :"nplurals=2; plural=(n != 1);" } \ No newline at end of file diff --git a/lib/appconfig.php b/lib/appconfig.php index 4e949eae..b6416f35 100644 --- a/lib/appconfig.php +++ b/lib/appconfig.php @@ -346,7 +346,7 @@ public function SetDocumentServerUrl($documentServer) { } } - $this->logger->info("SetDocumentServerUrl: " . $documentServer, array("app" => $this->appName)); + $this->logger->info("SetDocumentServerUrl: $documentServer", array("app" => $this->appName)); $this->config->setAppValue($this->appName, $this->_documentserver, $documentServer); } @@ -390,7 +390,7 @@ public function SetDocumentServerInternalUrl($documentServerInternal) { } } - $this->logger->info("SetDocumentServerInternalUrl: " . $documentServerInternal, array("app" => $this->appName)); + $this->logger->info("SetDocumentServerInternalUrl: $documentServerInternal", array("app" => $this->appName)); $this->config->setAppValue($this->appName, $this->_documentserverInternal, $documentServerInternal); } @@ -436,7 +436,7 @@ public function ReplaceDocumentServerUrlToInternal($url) { if ($from !== $documentServerUrl) { - $this->logger->debug("Replace url from " . $from . " to " . $documentServerUrl, array("app" => $this->appName)); + $this->logger->debug("Replace url from $from to $documentServerUrl", array("app" => $this->appName)); $url = str_replace($from, $documentServerUrl, $url); } } @@ -458,7 +458,7 @@ public function SetStorageUrl($storageUrl) { } } - $this->logger->info("SetStorageUrl: " . $storageUrl, array("app" => $this->appName)); + $this->logger->info("SetStorageUrl: $storageUrl", array("app" => $this->appName)); $this->config->setAppValue($this->appName, $this->_storageUrl, $storageUrl); } @@ -530,7 +530,7 @@ public function GetSKey() { */ public function SetDefaultFormats($formats) { $value = json_encode($formats); - $this->logger->info("Set default formats: " . $value, array("app" => $this->appName)); + $this->logger->info("Set default formats: $value", array("app" => $this->appName)); $this->config->setAppValue($this->appName, $this->_defFormats, $value); } @@ -555,7 +555,7 @@ private function GetDefaultFormats() { */ public function SetEditableFormats($formats) { $value = json_encode($formats); - $this->logger->info("Set editing formats: " . $value, array("app" => $this->appName)); + $this->logger->info("Set editing formats: $value", array("app" => $this->appName)); $this->config->setAppValue($this->appName, $this->_editFormats, $value); } @@ -772,8 +772,8 @@ public function GetWatermarkSettings() { ]; foreach ($watermarkLists as $key) { - $value = $this->config->getAppValue(AppConfig::WATERMARK_APP_NAMESPACE, "watermark_" . $key, []); - $result[$key] = $value !== "" ? explode(",", $value) : []; + $value = $this->config->getAppValue(AppConfig::WATERMARK_APP_NAMESPACE, "watermark_" . $key, ""); + $result[$key] = !empty($value) ? explode(",", $value) : []; } return $result; @@ -789,7 +789,7 @@ public function SetLimitGroups($groups) { $groups = array(); } $value = json_encode($groups); - $this->logger->info("Set groups: " . $value, array("app" => $this->appName)); + $this->logger->info("Set groups: $value", array("app" => $this->appName)); $this->config->setAppValue($this->appName, $this->_groups, $value); } @@ -835,7 +835,7 @@ public function isUserAllowedToUse() { // group unknown -> error and allow nobody $group = \OC::$server->getGroupManager()->get($groupName); if ($group === null) { - \OC::$server->getLogger()->error("Group is unknown " . $groupName, ["app" => $this->appName]); + \OC::$server->getLogger()->error("Group is unknown $groupName", ["app" => $this->appName]); } else { if ($group->inGroup($user)) { return true; diff --git a/templates/editor.php b/templates/editor.php index f20186d3..ced8968b 100644 --- a/templates/editor.php +++ b/templates/editor.php @@ -34,7 +34,7 @@ - " data-path="" data-token=""> + " data-path="" data-sharetoken="">