From bd15a18403aeecdd197fee4ac6aca1c31b06686c Mon Sep 17 00:00:00 2001 From: Antipkin-A Date: Thu, 25 Aug 2022 17:04:24 +0300 Subject: [PATCH 01/30] if encryption app is enabled then to disable forcesave --- controller/settingscontroller.php | 2 +- lib/appconfig.php | 4 +++- templates/settings.php | 7 +++++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/controller/settingscontroller.php b/controller/settingscontroller.php index 246ca7bf..c9f39493 100644 --- a/controller/settingscontroller.php +++ b/controller/settingscontroller.php @@ -116,7 +116,7 @@ public function index() { "sameTab" => $this->config->GetSameTab(), "preview" => $this->config->GetPreview(), "versionHistory" => $this->config->GetVersionHistory(), - "encryption" => ($this->config->checkEncryptionModule() === true), + "encryption" => $this->config->checkEncryptionModule(), "limitGroups" => $this->config->GetLimitGroups(), "chat" => $this->config->GetCustomizationChat(), "compactHeader" => $this->config->GetCustomizationCompactHeader(), diff --git a/lib/appconfig.php b/lib/appconfig.php index 38bbc9d4..f9f835f7 100644 --- a/lib/appconfig.php +++ b/lib/appconfig.php @@ -750,7 +750,9 @@ public function SetCustomizationForcesave($value) { * @return bool */ public function GetCustomizationForcesave() { - return $this->config->getAppValue($this->appName, $this->_customizationForcesave, "false") === "true"; + $value = $this->config->getAppValue($this->appName, $this->_customizationForcesave, "false") === "true"; + + return $value && ($this->checkEncryptionModule() === false); } /** diff --git a/templates/settings.php b/templates/settings.php index 78012822..114ae36d 100644 --- a/templates/settings.php +++ b/templates/settings.php @@ -30,7 +30,7 @@

t("Server settings")) ?>

- +

t("Encryption App is enabled, the application cannot work. You can continue working with the application if you enable master key.")) ?> @@ -163,8 +163,11 @@

checked="checked" /> + checked="checked" + disabled="disabled"/> +
+ t("This feature is unavailable due to encryption settings.")) ?>

From b4be08e522dc8b908cadc562bf38f31af2ee0569 Mon Sep 17 00:00:00 2001 From: Antipkin-A Date: Fri, 26 Aug 2022 11:18:31 +0300 Subject: [PATCH 02/30] delete key after saving when encryption master mode --- controller/callbackcontroller.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/controller/callbackcontroller.php b/controller/callbackcontroller.php index c1bbe9fc..79d59947 100644 --- a/controller/callbackcontroller.php +++ b/controller/callbackcontroller.php @@ -573,6 +573,11 @@ public function track($doc, $users, $key, $status, $url, $token, $history, $chan FileVersions::saveAuthor($file->getFileInfo(), $user); } + if ($this->config->checkEncryptionModule() === "master" + && !$isForcesave) { + KeyManager::delete($fileId); + } + $result = 0; } catch (\Exception $e) { $this->logger->logException($e, ["message" => "Track: $fileId status $status error", "app" => $this->appName]); From 3962dfd970b8ad37a856aaaa38d53515007cebc2 Mon Sep 17 00:00:00 2001 From: Antipkin-A Date: Fri, 26 Aug 2022 11:27:07 +0300 Subject: [PATCH 03/30] fixed style for checkbox description --- css/settings.css | 5 ++++- templates/settings.php | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/css/settings.css b/css/settings.css index bb6fca93..3ef71249 100644 --- a/css/settings.css +++ b/css/settings.css @@ -63,7 +63,10 @@ -moz-column-width: 140px; -webkit-column-width: 140px; } -#personal-show + label{ +#personal-show + label { margin-top: -25px; margin-left: 230px; } +.onlyoffice-option-desc { + margin-left: 20px; +} diff --git a/templates/settings.php b/templates/settings.php index 114ae36d..bb094445 100644 --- a/templates/settings.php +++ b/templates/settings.php @@ -167,7 +167,7 @@ disabled="disabled"/>
- t("This feature is unavailable due to encryption settings.")) ?> + t("This feature is unavailable due to encryption settings.")) ?>

From 8677c347ebb02d5a862b73268e79b47d72e2915c Mon Sep 17 00:00:00 2001 From: Antipkin-A Date: Fri, 26 Aug 2022 12:41:52 +0300 Subject: [PATCH 04/30] show disable forcesave description when encryption is enabled only --- templates/settings.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/templates/settings.php b/templates/settings.php index bb094445..d69441f2 100644 --- a/templates/settings.php +++ b/templates/settings.php @@ -166,8 +166,10 @@ checked="checked" disabled="disabled"/> -
- t("This feature is unavailable due to encryption settings.")) ?> + +
+ t("This feature is unavailable due to encryption settings.")) ?> +

From a84ce61410ea6d448bdbf1ef7b2dff46e2c5faf7 Mon Sep 17 00:00:00 2001 From: Antipkin-A Date: Fri, 26 Aug 2022 12:52:09 +0300 Subject: [PATCH 05/30] ru translation for forcesave description --- l10n/ru.js | 3 ++- l10n/ru.json | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/l10n/ru.js b/l10n/ru.js index 4107a571..014914d6 100644 --- a/l10n/ru.js +++ b/l10n/ru.js @@ -111,6 +111,7 @@ OC.L10N.register( "Default editor theme": "Тема редактора по умолчанию", "Light": "Светлая", "Classic Light": "Светлая классическая", - "Dark": "Темная" + "Dark": "Темная", + "This feature is unavailable due to encryption settings.": "Данная функция недоступна из-за настроек шифрования" }, "nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);"); diff --git a/l10n/ru.json b/l10n/ru.json index 01a97e24..fb8dd710 100644 --- a/l10n/ru.json +++ b/l10n/ru.json @@ -109,6 +109,7 @@ "Default editor theme": "Тема редактора по умолчанию", "Light": "Светлая", "Classic Light": "Светлая классическая", - "Dark": "Темная" + "Dark": "Темная", + "This feature is unavailable due to encryption settings.": "Данная функция недоступна из-за настроек шифрования" },"pluralForm" :"nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);" } \ No newline at end of file From e5091d2b70cd6d062e8b21b8c4f90fa85ded5ade Mon Sep 17 00:00:00 2001 From: Maria-Sukhova Date: Tue, 6 Sep 2022 11:40:24 +0300 Subject: [PATCH 06/30] edited ja --- l10n/ja.js | 48 ++++++++++++++++++++++++------------------------ l10n/ja.json | 48 ++++++++++++++++++++++++------------------------ 2 files changed, 48 insertions(+), 48 deletions(-) diff --git a/l10n/ja.js b/l10n/ja.js index d1d5c04b..8534939e 100644 --- a/l10n/ja.js +++ b/l10n/ja.js @@ -1,27 +1,27 @@ OC.L10N.register( "onlyoffice", { - "Access denied" : "アクセス拒否されました", + "Access denied" : "アクセスが拒否されました", "Invalid request" : "リクエストが不正です", "Files not found" : "ファイルが見つかりません", "File not found" : "ファイルが見つかりません", "Not permitted" : "権限がありません", "Download failed" : "ダウンロードできませんでした", "The required folder was not found" : "開こうとしたフォルダーがありません", - "You don't have enough permission to create" : "充分な作成権限がありません", + "You don't have enough permission to create": "作成権限がありません", "Template not found" : "テンプレートが見つかりません", "Can't create file" : "ファイルを作成できません", "Format is not supported" : "このフォーマットはサポートされていません", "Conversion is not required" : "変換する必要はありません", - "Failed to download converted file" : "コンバート済みファイルをダウンロードできませんでした", + "Failed to download converted file": "変換されたファイルをダウンロードできませんでした", "ONLYOFFICE app is not configured. Please contact admin" : "ONLYOFFICEアプリが設定されていません。管理者に相談してください", "FileId is empty" : "ファイルIDが空です", - "You do not have enough permissions to view the file" : "ファイルを閲覧する権限が足りません", + "You do not have enough permissions to view the file": "ファイルを閲覧する権限ありません", "Error occurred in the document service" : "ドキュメントサービスでエラーが発生しました", - "Not supported version" : "未サポートバージョン", + "Not supported version": "サポートされていないバージョン", "ONLYOFFICE cannot be reached. Please contact admin" : "ONLYOFFICEに接続できません。管理者に相談してください", "Loading, please wait." : "読み込み中です...。しばらくお待ちください。", - "File created" : "ファイル作成されました", + "File created": "ファイルが作成されました", "Open in ONLYOFFICE" : "ONLYOFFICEで開く", "Convert with ONLYOFFICE" : "ONLYOFFICEで変換", "Document" : "ドキュメント", @@ -35,9 +35,9 @@ OC.L10N.register( "ONLYOFFICE Docs Location specifies the address of the server with the document services installed. Please change the '' for the server address in the below line." : "ONLYOFFICE Docs の位置は、ドキュメントサービスがインストールされているサーバーのアドレスを指定します。以下の行の''をサーバーアドレスに変更してください。", "Encryption App is enabled, the application cannot work. You can continue working with the application if you enable master key." : "暗号化アプリが有効になっていますから、アプリをご使用できません。マスターキーを有効にすると、アプリの作業をご続行できます。", "ONLYOFFICE Docs address": "ONLYOFFICE Docs アドレス", - "Advanced server settings" : "詳細サーバー設定", - "ONLYOFFICE Docs address for internal requests from the server" : "サーバーからの内部リクエストにはONLYOFFICE Docs アドレス", - "Server address for internal requests from ONLYOFFICE Docs" : "ONLYOFFICE Docsからの内部リクエストにはサーバーアドレス", + "Advanced server settings": "サーバー詳細設定", + "ONLYOFFICE Docs address for internal requests from the server": "サーバーから内部リクエストに利用されるONLYOFFICE Docs アドレス", + "Server address for internal requests from ONLYOFFICE Docs": "ONLYOFFICE Docsから内部リクエストに利用されるサーバーアドレス", "Secret key (leave blank to disable)" : "シークレットキー (ブランクで無効)", "Open file in the same tab" : "ファイルを同じタブで開く", "The default application for opening the format": "以下のファイルフォーマットをデフォルトで開く", @@ -45,7 +45,7 @@ OC.L10N.register( "View details" : "詳細表示", "Save" : "保存", "Mixed Active Content is not allowed. HTTPS address for ONLYOFFICE Docs is required." : "アクティブコンテンツの混在は許可されていません。ONLYOFFICE DocsにはHTTPSアドレスが必要です", - "Restrict access to editors to following groups" : "アクセス編集できる人を以下のグループに制限する", + "Restrict access to editors to following groups": "エディターの利用を以下のグループに制限する", "review" : "レビュー", "form filling" : "フォーム入力", "comment" : "コメント", @@ -54,12 +54,12 @@ OC.L10N.register( "Server settings" : "サーバー設定", "Common settings" : "共通設定", "Editor customization settings" : "エディターカスタム設定", - "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 monochrome toolbar header" : "モノクローム・ツールバーヘッダーを表示する", + "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 monochrome toolbar header": "ツールバーヘッダーをモノクロで表示する", "Save as" : "別名で保存", "File saved" : "ファイルが保存されました", "Insert image" : "画像を挿入", @@ -69,20 +69,20 @@ OC.L10N.register( "The 30-day test period is over, you can no longer connect to demo ONLYOFFICE Docs server." : "30日間のテスト期間が終了したら、ONLYOFFICE Docs デモサーバーには繋がらなくなります。", "You are using public demo ONLYOFFICE Docs server. Please do not store private sensitive data." : "パブリック ONLYOFFICE Docs サーバーを使っているので、プライベートな機密データを利用しないようにしてください。", "Select file to compare" : "比較するファイルを選択", - "Review mode for viewing": "表示するためのレビューモード", + "Review mode for viewing": "レビューモード時の表示方式", "Markup": "マークアップ", "Final": "最終版", "Original": "オリジナル", "version": "バージョン", - "Disable certificate verification (insecure)": "証明書の検証を無効にする(安全でない", + "Disable certificate verification (insecure)": "証明書の検証を無効にする(安全ではありません)", "Keep intermediate versions when editing (forcesave)": "編集時に、中間バージョンを保持する (強制保存)", - "Use ONLYOFFICE to generate a document preview (it will take up disk space)": "ONLYOFFICEを使用して、ドキュメントプレビューを生成する(ディスク容量がかかる)", - "Keep metadata for each version once the document is edited (it will take up disk space)": "ドキュメントが編集されたら、各バージョンのメタデータを保持する(ディスクス容量がかかる)", + "Use ONLYOFFICE to generate a document preview (it will take up disk space)": "ONLYOFFICEを使用してドキュメントのサムネールを生成する(ディスク容量を消費します)", + "Keep metadata for each version once the document is edited (it will take up disk space)": "編集されたドキュメントの各バージョンのメタデータを保持する(ディスク容量を消費します)", "Clear": "消去", "All history successfully deleted": "すべての履歴が正常に削除されました", "Create": "作成", "Select template" : "テンプレートを選択する", - "Invalid file provided" : "無効なファイルが提供されました", + "Invalid file provided": "提供されたファイルは無効です", "Empty": "空", "Error" : "エラー", "Add a new template": "新しいテンプレートを追加する:", @@ -91,7 +91,7 @@ OC.L10N.register( "Template successfully added": "テンプレートが正常に追加されました", "Template successfully deleted": "テンプレートが正常に削除されました", "Common templates": "よく使われるテンプレート", - "Failed to delete template": "テンプレートの削除に失敗しました", + "Failed to delete template": "テンプレートを削除できませんでした", "File has been converted. Its content might look different.": "ファイルが変換されました。 その内容は異なって見えるかもしれません。", "Download as": "別の形式でダウンロード", "Download": "ダウンロード", @@ -108,9 +108,9 @@ OC.L10N.register( "Please update ONLYOFFICE Docs to version 7.0 to work on fillable forms online": "オンラインで入力可能なフォームを作成するには、ONLYOFFICE Docs 7.0版まで更新してください", "Security": "セキュリティ", "Run document macros": "ドキュメントマクロを実行する", - "Default editor theme": "デフォルトのエディタテーマ", + "Default editor theme": "エディターのデフォルトテーマ", "Light": "明るい", - "Classic Light": "明るい(クラシック)", + "Classic Light": "ライト(クラシック)", "Dark": "ダーク" }, "nplurals=1; plural=0;"); diff --git a/l10n/ja.json b/l10n/ja.json index 60d460fd..31fbc26b 100644 --- a/l10n/ja.json +++ b/l10n/ja.json @@ -1,25 +1,25 @@ { "translations": { - "Access denied" : "アクセス拒否されました", + "Access denied" : "アクセスが拒否されました", "Invalid request" : "リクエストが不正です", "Files not found" : "ファイルが見つかりません", "File not found" : "ファイルが見つかりません", "Not permitted" : "権限がありません", "Download failed" : "ダウンロードできませんでした", "The required folder was not found" : "開こうとしたフォルダーがありません", - "You don't have enough permission to create" : "充分な作成権限がありません", + "You don't have enough permission to create" : "作成権限がありません", "Template not found" : "テンプレートが見つかりません", "Can't create file" : "ファイルを作成できません", "Format is not supported" : "このフォーマットはサポートされていません", "Conversion is not required" : "変換する必要はありません", - "Failed to download converted file" : "コンバート済みファイルをダウンロードできませんでした", + "Failed to download converted file" : "変換されたファイルをダウンロードできませんでした", "ONLYOFFICE app is not configured. Please contact admin" : "ONLYOFFICEアプリが設定されていません。管理者に相談してください", "FileId is empty" : "ファイルIDが空です", - "You do not have enough permissions to view the file" : "ファイルを閲覧する権限が足りません", + "You do not have enough permissions to view the file" : "ファイルを閲覧する権限がありません", "Error occurred in the document service" : "ドキュメントサービスでエラーが発生しました", - "Not supported version" : "未サポートバージョン", + "Not supported version" : "サポートされていなバージョン", "ONLYOFFICE cannot be reached. Please contact admin" : "ONLYOFFICEに接続できません。管理者に相談してください", "Loading, please wait." : "読み込み中です...。しばらくお待ちください。", - "File created" : "ファイル作成されました", + "File created" : "ファイルが作成されました", "Open in ONLYOFFICE" : "ONLYOFFICEで開く", "Convert with ONLYOFFICE" : "ONLYOFFICEで変換", "Document" : "ドキュメント", @@ -33,9 +33,9 @@ "ONLYOFFICE Docs Location specifies the address of the server with the document services installed. Please change the '' for the server address in the below line.": "ONLYOFFICE Docs の位置は、ドキュメントサービスがインストールされているサーバーのアドレスを指定します。以下の行の''をサーバーアドレスに変更してください。", "Encryption App is enabled, the application cannot work. You can continue working with the application if you enable master key." : "暗号化アプリが有効になっていますから、アプリをご使用できません。マスターキーを有効にすると、アプリの作業をご続行できます。", "ONLYOFFICE Docs address" : "ONLYOFFICE Docs アドレス", - "Advanced server settings" : "詳細サーバー設定", - "ONLYOFFICE Docs address for internal requests from the server" : "サーバーからの内部リクエストにはONLYOFFICE Docs アドレス", - "Server address for internal requests from ONLYOFFICE Docs" : "ONLYOFFICE Docsからの内部リクエストにはサーバーアドレス", + "Advanced server settings" : "サーバー詳細設定", + "ONLYOFFICE Docs address for internal requests from the server" : "サーバーから内部リクエストに利用されるONLYOFFICE Docs アドレス", + "Server address for internal requests from ONLYOFFICE Docs" : "ONLYOFFICE Docsから内部リクエストに利用されるサーバーアドレス", "Secret key (leave blank to disable)" : "シークレットキー (ブランクで無効)", "Open file in the same tab" : "ファイルを同じタブで開く", "The default application for opening the format": "以下のファイルフォーマットをデフォルトで開く", @@ -43,7 +43,7 @@ "View details" : "詳細表示", "Save" : "保存", "Mixed Active Content is not allowed. HTTPS address for ONLYOFFICE Docs is required." : "アクティブコンテンツの混在は許可されていません。ONLYOFFICE DocsにはHTTPSアドレスが必要です", - "Restrict access to editors to following groups" : "アクセス編集できる人を以下のグループに制限する", + "Restrict access to editors to following groups" : "エディターの利用を以下のグループに制限する", "review" : "レビュー", "form filling" : "フォーム入力", "comment" : "コメント", @@ -52,12 +52,12 @@ "Server settings" : "サーバー設定", "Common settings" : "共通設定", "Editor customization settings" : "エディターカスタム設定", - "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 monochrome toolbar header" : "モノクローム・ツールバーヘッダーを表示する", + "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 monochrome toolbar header" : "ツールバーヘッダーをモノクロで表示する", "Save as" : "別名で保存", "File saved" : "ファイルが保存されました", "Insert image" : "画像を挿入", @@ -67,20 +67,20 @@ "The 30-day test period is over, you can no longer connect to demo ONLYOFFICE Docs server." : "30日間のテスト期間が終了したら、ONLYOFFICE Docs デモサーバーには繋がらなくなります。", "You are using public demo ONLYOFFICE Docs server. Please do not store private sensitive data." : "パブリック ONLYOFFICE Docs サーバーを使っているので、プライベートな機密データを利用しないようにしてください。", "Select file to compare" : "比較するファイルを選択", - "Review mode for viewing": "表示するためのレビューモード", + "Review mode for viewing": "レビューモード時の表示方式", "Markup": "マークアップ", "Final": "最終版", "Original": "オリジナル", "version": "バージョン", - "Disable certificate verification (insecure)": "証明書の検証を無効にする(安全でない", + "Disable certificate verification (insecure)": "証明書の検証を無効にする(安全ではありません)", "Keep intermediate versions when editing (forcesave)": "編集時に、中間バージョンを保持する (強制保存)", - "Use ONLYOFFICE to generate a document preview (it will take up disk space)": "ONLYOFFICEを使用して、ドキュメントプレビューを生成する(ディスク容量がかかる)", - "Keep metadata for each version once the document is edited (it will take up disk space)": "ドキュメントが編集されたら、各バージョンのメタデータを保持する(ディスクス容量がかかる)", + "Use ONLYOFFICE to generate a document preview (it will take up disk space)": "ONLYOFFICEを使用してドキュメントのサムネールを生成する(ディスク容量を消費します)", + "Keep metadata for each version once the document is edited (it will take up disk space)": "編集されたドキュメントの各バージョンのメタデータを保持する(ディスク容量を消費します)", "Clear": "消去", "All history successfully deleted": "すべての履歴が正常に削除されました", "Create": "作成", "Select template" : "テンプレートを選択する", - "Invalid file provided" : "無効なファイルが提供されました", + "Invalid file provided" : "提供されたファイルは無効です", "Empty": "空", "Error" : "エラー", "Add a new template": "新しいテンプレートを追加する:", @@ -89,7 +89,7 @@ "Template successfully added": "テンプレートが正常に追加されました", "Template successfully deleted": "テンプレートが正常に削除されました", "Common templates": "よく使われるテンプレート", - "Failed to delete template": "テンプレートの削除に失敗しました", + "Failed to delete template": "テンプレートを削除できませんでした", "File has been converted. Its content might look different.": "ファイルが変換されました。 その内容は異なって見えるかもしれません。", "Download as": "別の形式でダウンロード", "Download": "ダウンロード", @@ -106,9 +106,9 @@ "Please update ONLYOFFICE Docs to version 7.0 to work on fillable forms online": "オンラインで入力可能なフォームを作成するには、ONLYOFFICE Docs 7.0版まで更新してください", "Security": "セキュリティ", "Run document macros": "ドキュメントマクロを実行する", - "Default editor theme": "デフォルトのエディタテーマ", + "Default editor theme": "エディターのデフォルトテーマ", "Light": "明るい", - "Classic Light": "明るい(クラシック)", + "Classic Light": "ライト(クラシック)", "Dark": "ダーク" },"pluralForm" :"nplurals=1; plural=0;" } \ No newline at end of file From e7a2dc4e2413987b661949a6b51adb8764f6d2cc Mon Sep 17 00:00:00 2001 From: Maria-Sukhova Date: Tue, 6 Sep 2022 11:41:54 +0300 Subject: [PATCH 07/30] edited pt_BR --- l10n/pt_BR.js | 4 ++-- l10n/pt_BR.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/l10n/pt_BR.js b/l10n/pt_BR.js index f69ea196..cc241275 100644 --- a/l10n/pt_BR.js +++ b/l10n/pt_BR.js @@ -93,8 +93,8 @@ OC.L10N.register( "Common templates": "Modelos comuns", "Failed to delete template": "Falha ao excluir modelo", "File has been converted. Its content might look different.": "O arquivo foi convertido. Seu conteúdo pode ser diferente.", - "Download as": "Baixar", - "Download": "Baixar como", + "Download as": "Baixar como", + "Download": "Baixar", "Origin format": "Formato de origem", "Failed to send notification": "Falha ao enviar notificação", "Notification sent successfully": "Notificação enviada com sucesso", diff --git a/l10n/pt_BR.json b/l10n/pt_BR.json index 1c89722d..0e973039 100644 --- a/l10n/pt_BR.json +++ b/l10n/pt_BR.json @@ -91,8 +91,8 @@ "Common templates": "Modelos comuns", "Failed to delete template": "Falha ao excluir modelo", "File has been converted. Its content might look different.": "O arquivo foi convertido. Seu conteúdo pode ser diferente.", - "Download as": "Baixar", - "Download": "Baixar como", + "Download as": "Baixar como", + "Download": "Baixar", "Origin format": "Formato de origem", "Failed to send notification": "Falha ao enviar notificação", "Notification sent successfully": "Notificação enviada com sucesso", From 506e968557f10b0497b4f16f78b86de272c7bd4d Mon Sep 17 00:00:00 2001 From: Antipkin-A Date: Wed, 21 Sep 2022 17:27:49 +0300 Subject: [PATCH 08/30] fixed checking lock --- controller/editorapicontroller.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/controller/editorapicontroller.php b/controller/editorapicontroller.php index f89fca1a..fe66ddd6 100644 --- a/controller/editorapicontroller.php +++ b/controller/editorapicontroller.php @@ -244,8 +244,10 @@ public function config($fileId, $filePath = null, $shareToken = null, $version = $user = $this->userSession->getUser(); $userId = null; + $accountId = null; if (!empty($user)) { $userId = $user->getUID(); + $accountId = $user->getAccountId(); } list ($file, $error, $share) = empty($shareToken) ? $this->getFile($userId, $fileId, $filePath, $template) : $this->fileUtility->getFileByToken($fileId, $shareToken); @@ -360,8 +362,8 @@ public function config($fileId, $filePath = null, $shareToken = null, $version = $locks = $fileStorage->getLocks($file->getFileInfo()->getInternalPath(), false); if (count($locks) > 0) { $activeLock = $locks[0]; - $lockOwner = explode(' ', trim($activeLock->getOwner()))[0]; - if ($userId !== $lockOwner) { + + if ($accountId !== $activeLock->getOwnerAccountId()) { $isPersistentLock = true; $this->logger->debug("File $fileId is locked by $lockOwner", ["app" => $this->appName]); } From 549ae526fb4df5cce517051ebe504ff3cb06fe89 Mon Sep 17 00:00:00 2001 From: Antipkin-A Date: Thu, 22 Sep 2022 13:12:59 +0300 Subject: [PATCH 09/30] lock owner to debug message --- controller/editorapicontroller.php | 1 + 1 file changed, 1 insertion(+) diff --git a/controller/editorapicontroller.php b/controller/editorapicontroller.php index fe66ddd6..d85773d3 100644 --- a/controller/editorapicontroller.php +++ b/controller/editorapicontroller.php @@ -365,6 +365,7 @@ public function config($fileId, $filePath = null, $shareToken = null, $version = if ($accountId !== $activeLock->getOwnerAccountId()) { $isPersistentLock = true; + $lockOwner = $activeLock->getOwner(); $this->logger->debug("File $fileId is locked by $lockOwner", ["app" => $this->appName]); } } From 0390eb4df2c0455134cae2793fa19682f9835fcf Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Tue, 27 Sep 2022 14:54:16 +0300 Subject: [PATCH 10/30] fix to changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e2ac85e1..3e9b13a2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Change Log +## Changed +- fix edit of locked file + ## 7.5.3 ## Added - Catalan translation From 6aa5e2acd3573fe592d3b6243cf5c06510623b79 Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Thu, 7 Jul 2022 17:48:43 +0300 Subject: [PATCH 11/30] Chinese (Traditional, Taiwan), Basque (Spain), Armenian and Malay (Malaysia) empty file templates --- CHANGELOG.md | 3 +++ assets | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b2d0ae15..422feb99 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Change Log +## Added +- Chinese (Traditional, Taiwan), Basque (Spain), Armenian and Malay (Malaysia) empty file templates + ## Changed - fix edit of locked file diff --git a/assets b/assets index 01a35499..4b96e283 160000 --- a/assets +++ b/assets @@ -1 +1 @@ -Subproject commit 01a35499a3cfb4013d990100e119a7f47f02616f +Subproject commit 4b96e283924e0481299b6400520829649634c23e From 85ffa78cfcb0d5296df25f4277221f66de17de96 Mon Sep 17 00:00:00 2001 From: Maria-Sukhova Date: Tue, 27 Sep 2022 22:30:18 +0300 Subject: [PATCH 12/30] added line 115 (de, fr, it, ja, zh) --- l10n/de.js | 3 ++- l10n/de.json | 3 ++- l10n/de_DE.js | 3 ++- l10n/de_DE.json | 3 ++- l10n/fr.js | 3 ++- l10n/fr.json | 3 ++- l10n/it.js | 3 ++- l10n/it.json | 3 ++- l10n/ja.js | 3 ++- l10n/ja.json | 3 ++- l10n/zh_CN.js | 3 ++- l10n/zh_CN.json | 3 ++- 12 files changed, 24 insertions(+), 12 deletions(-) diff --git a/l10n/de.js b/l10n/de.js index 5aed6730..34f0819a 100644 --- a/l10n/de.js +++ b/l10n/de.js @@ -111,6 +111,7 @@ OC.L10N.register( "Default editor theme": "Standardmäßiges Thema des Editors", "Light": "Hell", "Classic Light": "Klassisch Hell", - "Dark": "Dunkel" + "Dark": "Dunkel", + "This feature is unavailable due to encryption settings.": "Diese Funktion ist wegen der Verschlüsselungseinstellungen nicht verfügbar" }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/de.json b/l10n/de.json index 036c35c2..5ca5d55f 100644 --- a/l10n/de.json +++ b/l10n/de.json @@ -109,6 +109,7 @@ "Default editor theme": "Standardmäßiges Thema des Editors", "Light": "Hell", "Classic Light": "Klassisch Hell", - "Dark": "Dunkel" + "Dark": "Dunkel", + "This feature is unavailable due to encryption settings.": "Diese Funktion ist wegen der Verschlüsselungseinstellungen nicht verfügbar" },"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 791c0799..cf22598b 100644 --- a/l10n/de_DE.js +++ b/l10n/de_DE.js @@ -111,6 +111,7 @@ OC.L10N.register( "Default editor theme": "Standardmäßiges Thema des Editors", "Light": "Hell", "Classic Light": "Klassisch Hell", - "Dark": "Dunkel" + "Dark": "Dunkel", + "This feature is unavailable due to encryption settings.": "Diese Funktion ist wegen der Verschlüsselungseinstellungen nicht verfügbar" }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/de_DE.json b/l10n/de_DE.json index 9a96d85a..5c2ec3a3 100644 --- a/l10n/de_DE.json +++ b/l10n/de_DE.json @@ -109,6 +109,7 @@ "Default editor theme": "Standardmäßiges Thema des Editors", "Light": "Hell", "Classic Light": "Klassisch Hell", - "Dark": "Dunkel" + "Dark": "Dunkel", + "This feature is unavailable due to encryption settings.": "Diese Funktion ist wegen der Verschlüsselungseinstellungen nicht verfügbar" },"pluralForm" :"nplurals=2; plural=(n != 1);" } \ No newline at end of file diff --git a/l10n/fr.js b/l10n/fr.js index 85dfc80a..8f6c5fef 100644 --- a/l10n/fr.js +++ b/l10n/fr.js @@ -111,6 +111,7 @@ OC.L10N.register( "Default editor theme": "Thème d'éditeur par défaut", "Light": "Clair", "Classic Light": "Classique clair", - "Dark": "Sombre" + "Dark": "Sombre", + "This feature is unavailable due to encryption settings.": "Cette fonctionnalité n'est pas disponible en raison des paramètres de chiffrement." }, "nplurals=2; plural=(n > 1);"); diff --git a/l10n/fr.json b/l10n/fr.json index 437f75f8..40d2868a 100644 --- a/l10n/fr.json +++ b/l10n/fr.json @@ -109,6 +109,7 @@ "Default editor theme": "Thème d'éditeur par défaut", "Light": "Clair", "Classic Light": "Classique clair", - "Dark": "Sombre" + "Dark": "Sombre", + "This feature is unavailable due to encryption settings.": "Cette fonctionnalité n'est pas disponible en raison des paramètres de chiffrement." },"pluralForm" :"nplurals=2; plural=(n > 1);" } \ No newline at end of file diff --git a/l10n/it.js b/l10n/it.js index cfcff81e..48d03176 100644 --- a/l10n/it.js +++ b/l10n/it.js @@ -111,6 +111,7 @@ OC.L10N.register( "Default editor theme": "Tema dell'editor predefinito", "Light": "Chiaro", "Classic Light": "Classico chiaro", - "Dark": "Scuro" + "Dark": "Scuro", + "This feature is unavailable due to encryption settings.": "Questa funzionalità non è disponibile a causa delle impostazioni di crittografia." }, "nplurals=2; plural=(n != 1);"); \ No newline at end of file diff --git a/l10n/it.json b/l10n/it.json index 312cf03a..884550ea 100644 --- a/l10n/it.json +++ b/l10n/it.json @@ -109,6 +109,7 @@ "Default editor theme": "Tema dell'editor predefinito", "Light": "Chiaro", "Classic Light": "Classico chiaro", - "Dark": "Scuro" + "Dark": "Scuro", + "This feature is unavailable due to encryption settings.": "Questa funzionalità non è disponibile a causa delle impostazioni di crittografia." },"pluralForm" :"nplurals=2; plural=(n != 1);" } \ No newline at end of file diff --git a/l10n/ja.js b/l10n/ja.js index d1d5c04b..e075e7d4 100644 --- a/l10n/ja.js +++ b/l10n/ja.js @@ -111,6 +111,7 @@ OC.L10N.register( "Default editor theme": "デフォルトのエディタテーマ", "Light": "明るい", "Classic Light": "明るい(クラシック)", - "Dark": "ダーク" + "Dark": "ダーク", + "This feature is unavailable due to encryption settings.": "この機能は暗号化の設定により使用できません。" }, "nplurals=1; plural=0;"); diff --git a/l10n/ja.json b/l10n/ja.json index 60d460fd..db32805e 100644 --- a/l10n/ja.json +++ b/l10n/ja.json @@ -109,6 +109,7 @@ "Default editor theme": "デフォルトのエディタテーマ", "Light": "明るい", "Classic Light": "明るい(クラシック)", - "Dark": "ダーク" + "Dark": "ダーク", + "This feature is unavailable due to encryption settings.": "この機能は暗号化の設定により使用できません。" },"pluralForm" :"nplurals=1; plural=0;" } \ No newline at end of file diff --git a/l10n/zh_CN.js b/l10n/zh_CN.js index b257ea88..1de4310d 100644 --- a/l10n/zh_CN.js +++ b/l10n/zh_CN.js @@ -110,6 +110,7 @@ OC.L10N.register( "Default editor theme": "编辑器默认的主题", "Light": "光", "Classic Light": "经典浅色", - "Dark": "黑暗的" + "Dark": "黑暗的", + "This feature is unavailable due to encryption settings.": "由于加密设置,该功能不可用。" }, "nplurals=1; plural=0;"); diff --git a/l10n/zh_CN.json b/l10n/zh_CN.json index f1261e62..dd0f0e3b 100644 --- a/l10n/zh_CN.json +++ b/l10n/zh_CN.json @@ -108,6 +108,7 @@ "Default editor theme": "编辑器默认的主题", "Light": "光", "Classic Light": "经典浅色", - "Dark": "黑暗的" + "Dark": "黑暗的", + "This feature is unavailable due to encryption settings.": "由于加密设置,该功能不可用。" },"pluralForm" :"nplurals=1; plural=0;" } \ No newline at end of file From fafc396c496a606e77d31fb6ca124bec5b8a9e3a Mon Sep 17 00:00:00 2001 From: Maria-Sukhova Date: Mon, 3 Oct 2022 13:42:30 +0300 Subject: [PATCH 13/30] added translation (nl) --- l10n/nl.js | 116 +++++++++++++++++++++++++++++++++++++++++++++++++++ l10n/nl.json | 114 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 230 insertions(+) create mode 100644 l10n/nl.js create mode 100644 l10n/nl.json diff --git a/l10n/nl.js b/l10n/nl.js new file mode 100644 index 00000000..b050da28 --- /dev/null +++ b/l10n/nl.js @@ -0,0 +1,116 @@ +OC.L10N.register( + "onlyoffice", + { + "Access denied" : "Toegang geweigerd", + "Invalid request": "Ongeldig verzoek", + "Files not found": "Bestanden niet gevonden", + "File not found": "Bestand niet gevonden", + "Not permitted": "Niet toegestaan", + "Download failed": "Download mislukt", + "The required folder was not found": "De vereiste map is niet gevonden", + "You don't have enough permission to create": "U heeft geen voldoende aanmaak rechten", + "Template not found": "Sjabloon niet gevonden", + "Can't create file": "Kan bestand niet aanmaken", + "Format is not supported": "Formaat wordt niet ondersteund", + "Conversion is not required": "Converteren is niet vereist", + "Failed to download converted file": "Kan geconverteerd bestand niet downloaden", + "ONLYOFFICE app is not configured. Please contact admin": "ONLYOFFICE app is niet geconfigureerd. Neem contact op met de admin", + "FileId is empty": "FileId is leeg", + "You do not have enough permissions to view the file": "U heeft niet genoeg rechten om het bestand te bekijken", + "Error occurred in the document service": "Er is een fout opgetreden in de documentservice", + "Not supported version": "Niet ondersteunde versie", + "ONLYOFFICE cannot be reached. Please contact admin": "ONLYOFFICE kan niet worden bereikt. Neem contact op met de admin", + "Loading, please wait.": "Laden, wacht alstublieft.", + "File created": "Bestand Aangemaakt", + "Open in ONLYOFFICE": "Open in ONLYOFFICE", + "Convert with ONLYOFFICE": "Converteer met ONLYOFFICE", + "Document": "Document", + "Spreadsheet": "Werkblad", + "Presentation": "Presentaties", + "Error when trying to connect": "Fout bij het verbinden", + "Settings have been successfully updated": "Instellingen zijn met succes bijgewerkt", + "Server can't read xml": "Server kan xml niet lezen", + "Bad Response. Errors: ": "Slechte Reactie. Fouten", + "Documentation": "Documentatie", + "ONLYOFFICE Docs Location specifies the address of the server with the document services installed. Please change the '' for the server address in the below line.": "ONLYOFFICE Docs Location geeft het adres op van de server waarop de documentdiensten geïnstalleerd zijn. Verander de '' voor het serveradres in de onderstaande regel.", + "Encryption App is enabled, the application cannot work. You can continue working with the application if you enable master key.": "Encryptie-app is ingeschakeld, de applicatie werkt niet. U kunt blijven werken met de applicatie als u de hoofdsleutel inschakelt.", + "ONLYOFFICE Docs address": "ONLYOFFICE Docs adres", + "Advanced server settings": "Geavanceerde serverinstellingen", + "ONLYOFFICE Docs address for internal requests from the server": "Adres van de ONLYOFFICE Docs voor interne verzoeken van de server", + "Server address for internal requests from ONLYOFFICE Docs": "Serveradres voor interne verzoeken van de ONLYOFFICE Docs", + "Secret key (leave blank to disable)": "Geheime sleutel (leeg laten om niet te te gebruiken)", + "Open file in the same tab": "Bestand in dezelfde tabblad openen", + "The default application for opening the format": "De standaardtoepassing voor het openen van het formaat", + "Open the file for editing (due to format restrictions, the data might be lost when saving to the formats from the list below)": "Open het bestand om het te bewerken (wegens formaatbeperkingen kunnen de gegevens verloren gaan bij het opslaan in de formaten van de onderstaande lijst)", + "View details": "Bekijk details", + "Save": "Opslaan", + "Mixed Active Content is not allowed. HTTPS address for ONLYOFFICE Docs is required.": "Gemende Actieve Inhoud is niet toegestaan. HTTPS-adres voor ONLYOFFICE Docs is vereist.", + "Restrict access to editors to following groups": "Beperk de toegang tot editors tot de volgende groepen", + "review": "overzicht", + "form filling": "formulier invullen", + "comment": "opmerking", + "custom filter": "aangepast filter", + "download": "downloaden", + "Server settings": "Serverinstellingen", + "Common settings": "Algemene instellingen", + "Editor customization settings": "Editor aanpassingsinstellingen", + "The customization section allows personalizing the editor interface": "Met de aanpassingssectie kunt u de interface van de editor personaliseren", + "Display Chat menu button": "Chat Menuknop weergeven", + "Display the header more compact": "De koptekst compacter weergeven", + "Display Feedback & Support menu button": "Menuknop Terugkoppeling & Ondersteuning weergeven", + "Display Help menu button": "Menuknop Help weergeven", + "Display monochrome toolbar header": "Toon de monochrome koptekst van de werkbalk", + "Save as": "Opslaan als", + "File saved": "Bestand opgeslagen", + "Insert image": "Afbeelding invoegen", + "Select recipients": "Kies ontvangers", + "Connect to demo ONLYOFFICE Docs server": "Verbinden met de demo ONLYOFFICE Docs server", + "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.": "Dit is een openbare testserver, gelieve deze niet te gebruiken voor persoonlijke en vertrouwelijke gegevens. De server zal gedurende een periode van 30 dagen beschikbaar zijn.", + "The 30-day test period is over, you can no longer connect to demo ONLYOFFICE Docs server.": "De 30-dagen proefperiode is voorbij, u kunt niet langer verbinding maken met demo ONLYOFFICE Docs server.", + "You are using public demo ONLYOFFICE Docs server. Please do not store private sensitive data.": "U gebruikt de openbare demo ONLYOFFICE Docs server. Sla geen vertrouwelijke gegevens op.", + "Select file to compare": "Kies het bestand dat u wilt vergelijken", + "Review mode for viewing": "Beoordelingsmodus voor bekijken", + "Markup": "Markup", + "Final": "Einde", + "Original": "Origineel", + "version": "versie", + "Disable certificate verification (insecure)": "Verificatie van certificaten uitschakelen (onveilig)", + "Keep intermediate versions when editing (forcesave)": "Bewaar tussentijdse versies bij bewerken (forcesave)", + "Use ONLYOFFICE to generate a document preview (it will take up disk space)": "Gebruik ONLYOFFICE om een voorbeeld van een document te genereren (dit neemt schijfruimte in beslag)", + "Keep metadata for each version once the document is edited (it will take up disk space)": "Bewaar metadata voor elke versie zodra het document bewerkt is (dit neemt schijfruimte in beslag)", + "Clear": "Wissen", + "All history successfully deleted": "Alle geschiedenis met succes gewist", + "Create": "Maak", + "Select template": "Kies een sjabloon", + "Invalid file provided": "Ongeldig bestand opgegeven", + "Empty": "Leeg", + "Error": "Fout", + "Add a new template": "Voeg een nieuw sjabloon toe", + "Template already exists": "Sjabloon bestaat al", + "Template must be in OOXML format": "Sjabloon moet in OOXML formaat zijn", + "Template successfully added": "Sjabloon met succes toegevoegd", + "Template successfully deleted": "Sjabloon met succes verwijderd", + "Common templates": "Algemene Sjablonen", + "Failed to delete template": "Sjabloon verwijderen mislukt", + "File has been converted. Its content might look different.": "Het bestand is geconverteerd. De inhoud kan er anders uitzien.", + "Download as": "Downloaden als", + "Download": "Downloaden", + "Origin format": "Oorsprong formaat", + "Failed to send notification": "Kennisgeving niet verzonden", + "Notification sent successfully": "Kennisgeving succesvol verzonden", + "%1\$s mentioned in the %2\$s: \"%3\$s\".": "%1\$s genoemd in de %2\$s: \"%3\$s\".", + "Choose a format to convert {fileName}": "Kies een formaat om {fileName} te converteren", + "Form template": "Formulier sjabloon", + "Form template from existing text file": "Formulier sjabloon uit bestaand tekstbestand", + "Create form": "Formulier maken", + "Fill in form in ONLYOFFICE": "Formulier invullen in ONLYOFFICE", + "Create new Form template": "Nieuw Formulier sjabloon maken", + "Please update ONLYOFFICE Docs to version 7.0 to work on fillable forms online": "Update ONLYOFFICE Docs naar versie 7.0 om online invulbare formulieren te kunnen gebruiken", + "Security": "Beveiliging", + "Run document macros": "Document macro's uitvoeren", + "Default editor theme": "Standaard editor thema", + "Light": "Licht", + "Classic Light": "Klassiek Licht", + "Dark": "Donker" +}, +"nplurals=2; plural=(n != 1);"); diff --git a/l10n/nl.json b/l10n/nl.json new file mode 100644 index 00000000..c17c867a --- /dev/null +++ b/l10n/nl.json @@ -0,0 +1,114 @@ +{ "translations": { + "Access denied" : "Toegang geweigerd", + "Invalid request" : "Ongeldig verzoek", + "Files not found" : "Bestanden niet gevonden", + "File not found" : "Bestand niet gevonden", + "Not permitted" : "Niet toegestaan", + "Download failed" : "Download mislukt", + "The required folder was not found" : "De vereiste map is niet gevonden", + "You don't have enough permission to create" : "U heeft geen voldoende aanmaak rechten", + "Template not found" : "Sjabloon niet gevonden", + "Can't create file" : "Kan bestand niet aanmaken", + "Format is not supported" : "Formaat wordt niet ondersteund", + "Conversion is not required" : "Converteren is niet vereist", + "Failed to download converted file" : "Kan geconverteerd bestand niet downloaden", + "ONLYOFFICE app is not configured. Please contact admin" : "ONLYOFFICE app is niet geconfigureerd. Neem contact op met de admin", + "FileId is empty" : "FileId is leeg", + "You do not have enough permissions to view the file" : "U heeft niet genoeg rechten om het bestand te bekijken", + "Error occurred in the document service" : "Er is een fout opgetreden in de documentservice", + "Not supported version" : "Niet ondersteunde versie", + "ONLYOFFICE cannot be reached. Please contact admin" : "ONLYOFFICE kan niet worden bereikt. Neem contact op met de admin", + "Loading, please wait." : "Laden, wacht alstublieft.", + "File created" : "Bestand Aangemaakt", + "Open in ONLYOFFICE" : "Open in ONLYOFFICE", + "Convert with ONLYOFFICE" : "Converteer met ONLYOFFICE", + "Document" : "Document", + "Spreadsheet" : "Werkblad", + "Presentation" : "Presentaties", + "Error when trying to connect" : "Fout bij het verbinden", + "Settings have been successfully updated" : "Instellingen zijn met succes bijgewerkt", + "Server can't read xml" : "Server kan xml niet lezen", + "Bad Response. Errors: " : "Slechte Reactie. Fouten", + "Documentation" : "Documentatie", + "ONLYOFFICE Docs Location specifies the address of the server with the document services installed. Please change the '' for the server address in the below line." : "ONLYOFFICE Docs Location geeft het adres op van de server waarop de documentdiensten geïnstalleerd zijn. Verander de '' voor het serveradres in de onderstaande regel.", + "Encryption App is enabled, the application cannot work. You can continue working with the application if you enable master key." : "Encryptie-app is ingeschakeld, de applicatie werkt niet. U kunt blijven werken met de applicatie als u de hoofdsleutel inschakelt.", + "ONLYOFFICE Docs address" : "ONLYOFFICE Docs adres", + "Advanced server settings" : "Geavanceerde serverinstellingen", + "ONLYOFFICE Docs address for internal requests from the server" : "Adres van de ONLYOFFICE Docs voor interne verzoeken van de server", + "Server address for internal requests from ONLYOFFICE Docs" : "Serveradres voor interne verzoeken van de ONLYOFFICE Docs", + "Secret key (leave blank to disable)" : "Geheime sleutel (leeg laten om niet te te gebruiken)", + "Open file in the same tab" : "Bestand in dezelfde tabblad openen", + "The default application for opening the format" : "De standaardtoepassing voor het openen van het formaat", + "Open the file for editing (due to format restrictions, the data might be lost when saving to the formats from the list below)" : "Open het bestand om het te bewerken (wegens formaatbeperkingen kunnen de gegevens verloren gaan bij het opslaan in de formaten van de onderstaande lijst)", + "View details" : "Bekijk details", + "Save" : "Opslaan", + "Mixed Active Content is not allowed. HTTPS address for ONLYOFFICE Docs is required." : "Gemende Actieve Inhoud is niet toegestaan. HTTPS-adres voor ONLYOFFICE Docs is vereist.", + "Restrict access to editors to following groups" : "Beperk de toegang tot editors tot de volgende groepen", + "review" : "overzicht", + "form filling" : "formulier invullen", + "comment" : "opmerking", + "custom filter" : "aangepast filter", + "download" : "downloaden", + "Server settings" : "Serverinstellingen", + "Common settings" : "Algemene instellingen", + "Editor customization settings" : "Editor aanpassingsinstellingen", + "The customization section allows personalizing the editor interface" : "Met de aanpassingssectie kunt u de interface van de editor personaliseren", + "Display Chat menu button" : "Chat Menuknop weergeven", + "Display the header more compact" : "De koptekst compacter weergeven", + "Display Feedback & Support menu button" : "Menuknop Terugkoppeling & Ondersteuning weergeven", + "Display Help menu button" : "Menuknop Help weergeven", + "Display monochrome toolbar header" : "Toon de monochrome koptekst van de werkbalk", + "Save as" : "Opslaan als", + "File saved" : "Bestand opgeslagen", + "Insert image" : "Afbeelding invoegen", + "Select recipients" : "Kies ontvangers", + "Connect to demo ONLYOFFICE Docs server" : "Verbinden met de demo ONLYOFFICE Docs server", + "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." : "Dit is een openbare testserver, gelieve deze niet te gebruiken voor persoonlijke en vertrouwelijke gegevens. De server zal gedurende een periode van 30 dagen beschikbaar zijn.", + "The 30-day test period is over, you can no longer connect to demo ONLYOFFICE Docs server." : "De 30-dagen proefperiode is voorbij, u kunt niet langer verbinding maken met demo ONLYOFFICE Docs server.", + "You are using public demo ONLYOFFICE Docs server. Please do not store private sensitive data." : "U gebruikt de openbare demo ONLYOFFICE Docs server. Sla geen vertrouwelijke gegevens op.", + "Select file to compare" : "Kies het bestand dat u wilt vergelijken", + "Review mode for viewing": "Beoordelingsmodus voor bekijken", + "Markup": "Markup", + "Final": "Einde", + "Original": "Origineel", + "version": "versie", + "Disable certificate verification (insecure)": "Verificatie van certificaten uitschakelen (onveilig)", + "Keep intermediate versions when editing (forcesave)": "Bewaar tussentijdse versies bij bewerken (forcesave)", + "Use ONLYOFFICE to generate a document preview (it will take up disk space)": "Gebruik ONLYOFFICE om een voorbeeld van een document te genereren (dit neemt schijfruimte in beslag)", + "Keep metadata for each version once the document is edited (it will take up disk space)": "Bewaar metadata voor elke versie zodra het document bewerkt is (dit neemt schijfruimte in beslag)", + "Clear": "Wissen", + "All history successfully deleted": "Alle geschiedenis met succes gewist", + "Create": "Maak", + "Select template" : "Kies een sjabloon", + "Invalid file provided" : "Ongeldig bestand opgegeven", + "Empty": "Leeg", + "Error" : "Fout", + "Add a new template": "Voeg een nieuw sjabloon toe", + "Template already exists": "Sjabloon bestaat al", + "Template must be in OOXML format": "Sjabloon moet in OOXML formaat zijn", + "Template successfully added": "Sjabloon met succes toegevoegd", + "Template successfully deleted": "Sjabloon met succes verwijderd", + "Common templates": "Algemene Sjablonen", + "Failed to delete template": "Sjabloon verwijderen mislukt", + "File has been converted. Its content might look different.": "Het bestand is geconverteerd. De inhoud kan er anders uitzien.", + "Download as": "Downloaden als", + "Download": "Downloaden", + "Origin format": "Oorsprong formaat", + "Failed to send notification": "Kennisgeving niet verzonden", + "Notification sent successfully": "Kennisgeving succesvol verzonden", + "%1$s mentioned in the %2$s: \"%3$s\".": "%1$s genoemd in de %2$s: \"%3$s\".", + "Choose a format to convert {fileName}": "Kies een formaat om {fileName} te converteren", + "Form template": "Formulier sjabloon", + "Form template from existing text file": "Formulier sjabloon uit bestaand tekstbestand", + "Create form": "Formulier maken", + "Fill in form in ONLYOFFICE": "Formulier invullen in ONLYOFFICE", + "Create new Form template": "Nieuw Formulier sjabloon maken", + "Please update ONLYOFFICE Docs to version 7.0 to work on fillable forms online": "Update ONLYOFFICE Docs naar versie 7.0 om online invulbare formulieren te kunnen gebruiken", + "Security": "Beveiliging", + "Run document macros": "Document macro's uitvoeren", + "Default editor theme": "Standaard editor thema", + "Light": "Licht", + "Classic Light": "Klassiek Licht", + "Dark": "Donker" +},"pluralForm" :"nplurals=2; plural=(n != 1);" +} \ No newline at end of file From d0c2fd6fb692baedd3712596bf1c98bd625c297d Mon Sep 17 00:00:00 2001 From: Maria-Sukhova Date: Mon, 3 Oct 2022 15:09:07 +0300 Subject: [PATCH 14/30] added line 115/113 es --- l10n/es.js | 3 ++- l10n/es.json | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/l10n/es.js b/l10n/es.js index 6b86c0e4..94d1546f 100644 --- a/l10n/es.js +++ b/l10n/es.js @@ -111,6 +111,7 @@ OC.L10N.register( "Default editor theme": "Tema del editor predeterminado", "Light": "Claro", "Classic Light": "Clásico claro", - "Dark": "Oscuro" + "Dark": "Oscuro", + "This feature is unavailable due to encryption settings.": "Esta característica no está disponible debido a la configuración de cifrado." }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/es.json b/l10n/es.json index c52e3fb0..7f6a203e 100644 --- a/l10n/es.json +++ b/l10n/es.json @@ -109,6 +109,7 @@ "Default editor theme": "Tema del editor predeterminado", "Light": "Claro", "Classic Light": "Clásico claro", - "Dark": "Oscuro" + "Dark": "Oscuro", + "This feature is unavailable due to encryption settings.": "Esta característica no está disponible debido a la configuración de cifrado." },"pluralForm" :"nplurals=2; plural=(n != 1);" } \ No newline at end of file From 578429885941fa98a633d278484b21b18526af57 Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Mon, 3 Oct 2022 15:55:35 +0300 Subject: [PATCH 15/30] enable preview by default --- CHANGELOG.md | 1 + lib/appconfig.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 422feb99..b99f09e5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ ## Changed - fix edit of locked file +- generate preview by default ## 7.5.4 ## Changed diff --git a/lib/appconfig.php b/lib/appconfig.php index f9f835f7..cc40bfe9 100644 --- a/lib/appconfig.php +++ b/lib/appconfig.php @@ -650,7 +650,7 @@ public function SetPreview($value) { * @return bool */ public function GetPreview() { - return $this->config->getAppValue($this->appName, $this->_preview, "false") === "true"; + return $this->config->getAppValue($this->appName, $this->_preview, "true") === "true"; } /** From d41f2a4faa32e731f9e059c583646a1cfe4e19f5 Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Mon, 3 Oct 2022 16:04:02 +0300 Subject: [PATCH 16/30] Dutch translation to changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 422feb99..771bdf72 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # Change Log ## Added +- Dutch translation - Chinese (Traditional, Taiwan), Basque (Spain), Armenian and Malay (Malaysia) empty file templates ## Changed From 509c23c365f4c5477927095f26831b3987e68f7a Mon Sep 17 00:00:00 2001 From: Antipkin-A Date: Thu, 6 Oct 2022 16:02:23 +0300 Subject: [PATCH 17/30] send body as json parameter --- CHANGELOG.md | 1 + lib/fileutility.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4c94b902..e9c903d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ ## Changed - fix edit of locked file - generate preview by default +- fix collaboration of federated files ## 7.5.4 ## Changed diff --git a/lib/fileutility.php b/lib/fileutility.php index e47d4321..f4a3271e 100644 --- a/lib/fileutility.php +++ b/lib/fileutility.php @@ -304,7 +304,7 @@ private function getFederatedKey($file) { $client = $httpClientService->newClient(); $response = $client->post($remote . "/ocs/v2.php/apps/" . $this->appName . "/api/v1/key?format=json", [ "timeout" => 5, - "body" => [ + "json" => [ "shareToken" => $shareToken, "path" => $internalPath ] From 3c37371ec33eea1e17961e98a8c044808f4f77ab Mon Sep 17 00:00:00 2001 From: Antipkin-A Date: Thu, 6 Oct 2022 18:58:40 +0300 Subject: [PATCH 18/30] send body as json parameter (509c23c365f4c5477927095f26831b3987e68f7a) --- lib/keymanager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/keymanager.php b/lib/keymanager.php index c3c538d2..36214b76 100644 --- a/lib/keymanager.php +++ b/lib/keymanager.php @@ -175,7 +175,7 @@ public static function lockFederatedKey($file, $lock, $fs) { $client = $httpClientService->newClient(); $data = [ "timeout" => 5, - "body" => [ + "json" => [ "shareToken" => $shareToken, "path" => $internalPath, "lock" => $lock From f39bb9d1352207945da83baebd119a027bc7075d Mon Sep 17 00:00:00 2001 From: Antipkin-A Date: Thu, 6 Oct 2022 19:38:44 +0300 Subject: [PATCH 19/30] json parameter (509c23c365f4c5477927095f26831b3987e68f7a) --- lib/keymanager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/keymanager.php b/lib/keymanager.php index 36214b76..740aae32 100644 --- a/lib/keymanager.php +++ b/lib/keymanager.php @@ -182,7 +182,7 @@ public static function lockFederatedKey($file, $lock, $fs) { ] ]; if (!empty($fs)) { - $data["body"]["fs"] = $fs; + $data["json"]["fs"] = $fs; } try { From c326e6c555082ddc502779189b3b2cf72647a99a Mon Sep 17 00:00:00 2001 From: Antipkin-A Date: Thu, 6 Oct 2022 19:59:10 +0300 Subject: [PATCH 20/30] healthCheck for federated lock --- appinfo/routes.php | 1 + controller/callbackcontroller.php | 23 +++++++++++++++++++++-- controller/federationcontroller.php | 15 +++++++++++++++ lib/keymanager.php | 28 ++++++++++++++++++++++++++++ 4 files changed, 65 insertions(+), 2 deletions(-) diff --git a/appinfo/routes.php b/appinfo/routes.php index 5e447ee6..f1753747 100644 --- a/appinfo/routes.php +++ b/appinfo/routes.php @@ -48,6 +48,7 @@ "ocs" => [ ["name" => "federation#key", "url" => "/api/v1/key", "verb" => "POST"], ["name" => "federation#keylock", "url" => "/api/v1/keylock", "verb" => "POST"], + ["name" => "federation#healthcheck", "url" => "/api/v1/healthcheck", "verb" => "GET"], ["name" => "editorapi#config", "url" => "/api/v1/config/{fileId}", "verb" => "GET"], ["name" => "editorapi#fillempty", "url" => "/api/v1/empty/{fileId}", "verb" => "GET"], ["name" => "settingsapi#get_doc_server_url", "url" => "/api/v1/settings/docserver", "verb" => "GET"], diff --git a/controller/callbackcontroller.php b/controller/callbackcontroller.php index 79d59947..e3e8edcc 100644 --- a/controller/callbackcontroller.php +++ b/controller/callbackcontroller.php @@ -534,7 +534,7 @@ public function track($doc, $users, $key, $status, $url, $token, $history, $chan $prevIsForcesave = KeyManager::wasForcesave($fileId); - if ($file->getStorage()->instanceOfStorage(SharingExternalStorage::class)) { + if ($this->isFederatedOperation($file)) { $isLock = KeyManager::lockFederatedKey($file, $isForcesave, null); if ($isForcesave && !$isLock) { break; @@ -548,7 +548,7 @@ public function track($doc, $users, $key, $status, $url, $token, $history, $chan return $file->putContent($newData); }); - if ($file->getStorage()->instanceOfStorage(SharingExternalStorage::class)) { + if ($this->isFederatedOperation($file)) { if ($isForcesave) { KeyManager::lockFederatedKey($file, false, $isForcesave); } @@ -721,6 +721,25 @@ private function getFileByToken($fileId, $shareToken, $version = 0) { return [$file, null]; } + /** + * Check of federated capable + * + * @param File $file - file + * + * @return bool + */ + private function isFederatedOperation($file) { + $storage = $file->getStorage(); + + $alive = false; + $isFederated = $storage->instanceOfStorage(SharingExternalStorage::class); + if ($isFederated) { + $alive = KeyManager::healthCheck($storage->getRemote()); + } + + return $isFederated && $alive; + } + /** * Getting share by token * diff --git a/controller/federationcontroller.php b/controller/federationcontroller.php index bebb76bd..93edc9dc 100644 --- a/controller/federationcontroller.php +++ b/controller/federationcontroller.php @@ -152,4 +152,19 @@ public function keylock($shareToken, $path, $lock, $fs) { $this->logger->debug("Federated request lock for " . $fileId, ["app" => $this->appName]); return new Result(); } + + /** + * Health check instance + * + * @return Result + * + * @NoAdminRequired + * @NoCSRFRequired + * @PublicPage + */ + public function healthcheck() { + $this->logger->debug("Federated healthcheck", ["app" => $this->appName]); + + return new Result(["alive" => true]); + } } \ No newline at end of file diff --git a/lib/keymanager.php b/lib/keymanager.php index 740aae32..a7866ffa 100644 --- a/lib/keymanager.php +++ b/lib/keymanager.php @@ -205,4 +205,32 @@ public static function lockFederatedKey($file, $lock, $fs) { return false; } } + + /** + * Health check remote instance + * + * @param string $remote - remote instance + * + * @return bool + */ + public static function healthCheck($remote) { + $remote = rtrim($remote, "/") . "/"; + + $httpClientService = \OC::$server->getHTTPClientService(); + $client = $httpClientService->newClient(); + + try { + $response = $client->get($remote . "ocs/v2.php/apps/" . self::App_Name . "/api/v1/healthcheck?format=json"); + $body = json_decode($response->getBody(), true); + + $data = $body["ocs"]["data"]; + if ($data["alive"]) { + return true; + } + } catch (\Exception $e) { + \OC::$server->getLogger()->logException($e, ["message" => "Failed to request federated health check for" . $remote, "app" => self::App_Name]); + } + + return false; + } } \ No newline at end of file From ede8acd00b092a76dcb75f878a9aa4a38e6a7165 Mon Sep 17 00:00:00 2001 From: Antipkin-A Date: Fri, 7 Oct 2022 11:34:14 +0300 Subject: [PATCH 21/30] cache health check --- lib/keymanager.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/keymanager.php b/lib/keymanager.php index a7866ffa..73b9fff2 100644 --- a/lib/keymanager.php +++ b/lib/keymanager.php @@ -38,6 +38,11 @@ class KeyManager { */ private const TableName_Key = "onlyoffice_filekey"; + /** + * Health remote list + */ + private static $healthRemote = []; + /** * Get document identifier * @@ -216,6 +221,10 @@ public static function lockFederatedKey($file, $lock, $fs) { public static function healthCheck($remote) { $remote = rtrim($remote, "/") . "/"; + if (in_array($remote, self::$healthRemote)) { + return true; + } + $httpClientService = \OC::$server->getHTTPClientService(); $client = $httpClientService->newClient(); @@ -225,6 +234,7 @@ public static function healthCheck($remote) { $data = $body["ocs"]["data"]; if ($data["alive"]) { + array_push(self::$healthRemote, $remote); return true; } } catch (\Exception $e) { From 42fd4581d4c003584529f1e438ac6f09b16f1449 Mon Sep 17 00:00:00 2001 From: Antipkin-A Date: Fri, 7 Oct 2022 11:54:41 +0300 Subject: [PATCH 22/30] out check health to separate class --- controller/callbackcontroller.php | 3 +- lib/keymanager.php | 38 ---------------- lib/remoteinstance.php | 73 +++++++++++++++++++++++++++++++ 3 files changed, 75 insertions(+), 39 deletions(-) create mode 100644 lib/remoteinstance.php diff --git a/controller/callbackcontroller.php b/controller/callbackcontroller.php index e3e8edcc..8e9a5a3d 100644 --- a/controller/callbackcontroller.php +++ b/controller/callbackcontroller.php @@ -46,6 +46,7 @@ use OCA\Onlyoffice\KeyManager; use OCA\Onlyoffice\VersionManager; use OCA\Onlyoffice\TemplateManager; +use OCA\Onlyoffice\RemoteInstance; /** * Callback handler for the document server. @@ -734,7 +735,7 @@ private function isFederatedOperation($file) { $alive = false; $isFederated = $storage->instanceOfStorage(SharingExternalStorage::class); if ($isFederated) { - $alive = KeyManager::healthCheck($storage->getRemote()); + $alive = RemoteInstance::healthCheck($storage->getRemote()); } return $isFederated && $alive; diff --git a/lib/keymanager.php b/lib/keymanager.php index 73b9fff2..740aae32 100644 --- a/lib/keymanager.php +++ b/lib/keymanager.php @@ -38,11 +38,6 @@ class KeyManager { */ private const TableName_Key = "onlyoffice_filekey"; - /** - * Health remote list - */ - private static $healthRemote = []; - /** * Get document identifier * @@ -210,37 +205,4 @@ public static function lockFederatedKey($file, $lock, $fs) { return false; } } - - /** - * Health check remote instance - * - * @param string $remote - remote instance - * - * @return bool - */ - public static function healthCheck($remote) { - $remote = rtrim($remote, "/") . "/"; - - if (in_array($remote, self::$healthRemote)) { - return true; - } - - $httpClientService = \OC::$server->getHTTPClientService(); - $client = $httpClientService->newClient(); - - try { - $response = $client->get($remote . "ocs/v2.php/apps/" . self::App_Name . "/api/v1/healthcheck?format=json"); - $body = json_decode($response->getBody(), true); - - $data = $body["ocs"]["data"]; - if ($data["alive"]) { - array_push(self::$healthRemote, $remote); - return true; - } - } catch (\Exception $e) { - \OC::$server->getLogger()->logException($e, ["message" => "Failed to request federated health check for" . $remote, "app" => self::App_Name]); - } - - return false; - } } \ No newline at end of file diff --git a/lib/remoteinstance.php b/lib/remoteinstance.php new file mode 100644 index 00000000..9efbe59e --- /dev/null +++ b/lib/remoteinstance.php @@ -0,0 +1,73 @@ +getHTTPClientService(); + $client = $httpClientService->newClient(); + + try { + $response = $client->get($remote . "ocs/v2.php/apps/" . self::App_Name . "/api/v1/healthcheck?format=json"); + $body = json_decode($response->getBody(), true); + + $data = $body["ocs"]["data"]; + if ($data["alive"]) { + array_push(self::$healthRemote, $remote); + return true; + } + } catch (\Exception $e) { + \OC::$server->getLogger()->logException($e, ["message" => "Failed to request federated health check for" . $remote, "app" => self::App_Name]); + } + + return false; + } +} \ No newline at end of file From f37ce6fed9cb62c4a8146088d4d7e841e9d1ef7a Mon Sep 17 00:00:00 2001 From: Antipkin-A Date: Fri, 7 Oct 2022 15:00:46 +0300 Subject: [PATCH 23/30] health instance is stored to database --- appinfo/database.xml | 43 ++++++++++++++++++++- lib/remoteinstance.php | 86 +++++++++++++++++++++++++++++++++++++++++- 2 files changed, 127 insertions(+), 2 deletions(-) diff --git a/appinfo/database.xml b/appinfo/database.xml index 1ad441eb..c4e6945d 100644 --- a/appinfo/database.xml +++ b/appinfo/database.xml @@ -42,7 +42,7 @@ last forcesave done - file_id_index + onlyoffice_file_id_index true file_id @@ -51,4 +51,45 @@ + + + *dbprefix*onlyoffice_instance + + + id + integer + 0 + true + 1 + + + remote + text + true + 128 + remote instance address + + + expire + bigint + 0 + time to live + + + status + integer + 0 + true + remote instance status + + + onlyoffice_remote_index + true + + remote + ascending + + + +
\ No newline at end of file diff --git a/lib/remoteinstance.php b/lib/remoteinstance.php index 9efbe59e..8686da73 100644 --- a/lib/remoteinstance.php +++ b/lib/remoteinstance.php @@ -33,11 +33,80 @@ class RemoteInstance { */ private const App_Name = "onlyoffice"; + /** + * Table name + */ + private const TableName_Key = "onlyoffice_instance"; + + /** + * Time to live of remote instance (12 hours) + */ + private static $ttl = 60 * 60 * 12; + /** * Health remote list */ private static $healthRemote = []; + /** + * Get document identifier + * + * @param string $remote - remote instance + * + * @return string + */ + public static function get($remote) { + $connection = \OC::$server->getDatabaseConnection(); + $select = $connection->prepare(" + SELECT remote, expire + FROM `*PREFIX*" . self::TableName_Key . "` + WHERE `remote` = ? + "); + $result = $select->execute([$remote]); + + $dbremote = $result ? $select->fetch() : []; + + return $dbremote; + } + + /** + * Store remote instance + * + * @param string $remote - remote instance + * + * @return bool + */ + public static function set($remote) { + $expire = time() + self::$ttl; + + $connection = \OC::$server->getDatabaseConnection(); + $insert = $connection->prepare(" + INSERT INTO `*PREFIX*" . self::TableName_Key . "` + (`remote`, `expire`) + VALUES (?, ?) + "); + return (bool)$insert->execute([$remote, $expire]); + } + + /** + * Update remote instance + * + * @param string $remote - remote instance + * + * @return bool + */ + public static function update($remote) { + $expire = time() + self::$ttl; + + $connection = \OC::$server->getDatabaseConnection(); + $update = $connection->prepare(" + UPDATE `*PREFIX*" . self::TableName_Key . "` + SET expire = ? + WHERE remote = ? + "); + return (bool)$update->execute([$expire, $remote]); + } + /** * Health check remote instance * @@ -46,12 +115,19 @@ class RemoteInstance { * @return bool */ public static function healthCheck($remote) { + $logger = \OC::$server->getLogger(); $remote = rtrim($remote, "/") . "/"; if (in_array($remote, self::$healthRemote)) { return true; } + $dbremote = self::get($remote); + if (!empty($dbremote) && $dbremote["expire"] > time()) { + array_push(self::$healthRemote, $dbremote["remote"]); + return true; + } + $httpClientService = \OC::$server->getHTTPClientService(); $client = $httpClientService->newClient(); @@ -61,11 +137,19 @@ public static function healthCheck($remote) { $data = $body["ocs"]["data"]; if ($data["alive"]) { + if (empty($dbremote)) { + self::set($remote); + } else { + self::update($remote); + } + + $logger->debug("Remote instance " . $remote . " was stored to database", ["app" => self::App_Name]); + array_push(self::$healthRemote, $remote); return true; } } catch (\Exception $e) { - \OC::$server->getLogger()->logException($e, ["message" => "Failed to request federated health check for" . $remote, "app" => self::App_Name]); + $logger->logException($e, ["message" => "Failed to request federated health check for" . $remote, "app" => self::App_Name]); } return false; From 8ed46df3c0bcbbd105c69fb6c3dc1393d429a0f4 Mon Sep 17 00:00:00 2001 From: Antipkin-A Date: Fri, 7 Oct 2022 16:20:46 +0300 Subject: [PATCH 24/30] added status for remote instance --- lib/remoteinstance.php | 56 +++++++++++++++++++++--------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/lib/remoteinstance.php b/lib/remoteinstance.php index 8686da73..0e8afac8 100644 --- a/lib/remoteinstance.php +++ b/lib/remoteinstance.php @@ -53,12 +53,12 @@ class RemoteInstance { * * @param string $remote - remote instance * - * @return string + * @return array */ public static function get($remote) { $connection = \OC::$server->getDatabaseConnection(); $select = $connection->prepare(" - SELECT remote, expire + SELECT remote, expire, status FROM `*PREFIX*" . self::TableName_Key . "` WHERE `remote` = ? "); @@ -73,38 +73,36 @@ public static function get($remote) { * Store remote instance * * @param string $remote - remote instance + * @param bool $status - remote status * * @return bool */ - public static function set($remote) { - $expire = time() + self::$ttl; - + public static function set($remote, $status) { $connection = \OC::$server->getDatabaseConnection(); $insert = $connection->prepare(" INSERT INTO `*PREFIX*" . self::TableName_Key . "` - (`remote`, `expire`) - VALUES (?, ?) + (`remote`, `status`, `expire`) + VALUES (?, ?, ?) "); - return (bool)$insert->execute([$remote, $expire]); + return (bool)$insert->execute([$remote, $status === true ? 1 : 0, time()]); } /** * Update remote instance * * @param string $remote - remote instance + * @param bool $status - remote status * * @return bool */ - public static function update($remote) { - $expire = time() + self::$ttl; - + public static function update($remote, $status) { $connection = \OC::$server->getDatabaseConnection(); $update = $connection->prepare(" UPDATE `*PREFIX*" . self::TableName_Key . "` - SET expire = ? + SET status = ?, expire = ? WHERE remote = ? "); - return (bool)$update->execute([$expire, $remote]); + return (bool)$update->execute([$status === true ? 1 : 0, time(), $remote]); } /** @@ -123,35 +121,37 @@ public static function healthCheck($remote) { } $dbremote = self::get($remote); - if (!empty($dbremote) && $dbremote["expire"] > time()) { - array_push(self::$healthRemote, $dbremote["remote"]); - return true; + if (!empty($dbremote) && $dbremote["expire"] + self::$ttl > time()) { + self::$healthRemote[$remote] = $dbremote["status"]; + return self::$healthRemote[$remote]; } $httpClientService = \OC::$server->getHTTPClientService(); $client = $httpClientService->newClient(); try { + $status = false; $response = $client->get($remote . "ocs/v2.php/apps/" . self::App_Name . "/api/v1/healthcheck?format=json"); $body = json_decode($response->getBody(), true); $data = $body["ocs"]["data"]; - if ($data["alive"]) { - if (empty($dbremote)) { - self::set($remote); - } else { - self::update($remote); - } - - $logger->debug("Remote instance " . $remote . " was stored to database", ["app" => self::App_Name]); - - array_push(self::$healthRemote, $remote); - return true; + if (isset($data["alive"])) { + $status = $data["alive"]; } } catch (\Exception $e) { $logger->logException($e, ["message" => "Failed to request federated health check for" . $remote, "app" => self::App_Name]); } - return false; + if (empty($dbremote)) { + self::set($remote, $status); + } else { + self::update($remote, $status); + } + + $logger->debug("Remote instance " . $remote . " was stored to database", ["app" => self::App_Name]); + + self::$healthRemote[$remote] = $status; + + return self::$healthRemote[$remote]; } } \ No newline at end of file From 067e1e0418bf5650960d8c0b4793f48a0d8f445f Mon Sep 17 00:00:00 2001 From: Antipkin-A Date: Fri, 7 Oct 2022 16:22:49 +0300 Subject: [PATCH 25/30] expanded logging for remote instance --- lib/remoteinstance.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/remoteinstance.php b/lib/remoteinstance.php index 0e8afac8..04fe73fd 100644 --- a/lib/remoteinstance.php +++ b/lib/remoteinstance.php @@ -117,11 +117,13 @@ public static function healthCheck($remote) { $remote = rtrim($remote, "/") . "/"; if (in_array($remote, self::$healthRemote)) { + $logger->debug("Remote instance " . $remote . " from local cache", ["app" => self::App_Name]); return true; } $dbremote = self::get($remote); if (!empty($dbremote) && $dbremote["expire"] + self::$ttl > time()) { + $logger->debug("Remote instance " . $remote . " from database", ["app" => self::App_Name]); self::$healthRemote[$remote] = $dbremote["status"]; return self::$healthRemote[$remote]; } From 89a21a6d455c3f645953a6cf07f376c458942e3e Mon Sep 17 00:00:00 2001 From: Antipkin-A Date: Fri, 7 Oct 2022 16:36:19 +0300 Subject: [PATCH 26/30] format --- controller/callbackcontroller.php | 11 ++++++----- lib/remoteinstance.php | 20 +++++++++----------- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/controller/callbackcontroller.php b/controller/callbackcontroller.php index 8e9a5a3d..3697fa47 100644 --- a/controller/callbackcontroller.php +++ b/controller/callbackcontroller.php @@ -43,10 +43,10 @@ use OCA\Onlyoffice\Crypt; use OCA\Onlyoffice\DocumentService; use OCA\Onlyoffice\FileVersions; -use OCA\Onlyoffice\KeyManager; use OCA\Onlyoffice\VersionManager; -use OCA\Onlyoffice\TemplateManager; +use OCA\Onlyoffice\KeyManager; use OCA\Onlyoffice\RemoteInstance; +use OCA\Onlyoffice\TemplateManager; /** * Callback handler for the document server. @@ -734,11 +734,12 @@ private function isFederatedOperation($file) { $alive = false; $isFederated = $storage->instanceOfStorage(SharingExternalStorage::class); - if ($isFederated) { - $alive = RemoteInstance::healthCheck($storage->getRemote()); + if (!$isFederated) { + return false; } - return $isFederated && $alive; + $alive = RemoteInstance::healthCheck($storage->getRemote()); + return $alive; } /** diff --git a/lib/remoteinstance.php b/lib/remoteinstance.php index 04fe73fd..2d41931f 100644 --- a/lib/remoteinstance.php +++ b/lib/remoteinstance.php @@ -19,8 +19,6 @@ namespace OCA\Onlyoffice; -use OCP\Files\File; - /** * Remote instance manager * @@ -49,13 +47,13 @@ class RemoteInstance { private static $healthRemote = []; /** - * Get document identifier + * Get remote instance * * @param string $remote - remote instance * * @return array */ - public static function get($remote) { + private static function get($remote) { $connection = \OC::$server->getDatabaseConnection(); $select = $connection->prepare(" SELECT remote, expire, status @@ -77,7 +75,7 @@ public static function get($remote) { * * @return bool */ - public static function set($remote, $status) { + private static function set($remote, $status) { $connection = \OC::$server->getDatabaseConnection(); $insert = $connection->prepare(" INSERT INTO `*PREFIX*" . self::TableName_Key . "` @@ -95,7 +93,7 @@ public static function set($remote, $status) { * * @return bool */ - public static function update($remote, $status) { + private static function update($remote, $status) { $connection = \OC::$server->getDatabaseConnection(); $update = $connection->prepare(" UPDATE `*PREFIX*" . self::TableName_Key . "` @@ -117,13 +115,13 @@ public static function healthCheck($remote) { $remote = rtrim($remote, "/") . "/"; if (in_array($remote, self::$healthRemote)) { - $logger->debug("Remote instance " . $remote . " from local cache", ["app" => self::App_Name]); + $logger->debug("Remote instance " . $remote . " from local cache status " . $dbremote["status"], ["app" => self::App_Name]); return true; } $dbremote = self::get($remote); if (!empty($dbremote) && $dbremote["expire"] + self::$ttl > time()) { - $logger->debug("Remote instance " . $remote . " from database", ["app" => self::App_Name]); + $logger->debug("Remote instance " . $remote . " from database status " . $dbremote["status"], ["app" => self::App_Name]); self::$healthRemote[$remote] = $dbremote["status"]; return self::$healthRemote[$remote]; } @@ -131,14 +129,14 @@ public static function healthCheck($remote) { $httpClientService = \OC::$server->getHTTPClientService(); $client = $httpClientService->newClient(); + $status = false; try { - $status = false; $response = $client->get($remote . "ocs/v2.php/apps/" . self::App_Name . "/api/v1/healthcheck?format=json"); $body = json_decode($response->getBody(), true); $data = $body["ocs"]["data"]; if (isset($data["alive"])) { - $status = $data["alive"]; + $status = $data["alive"] === true; } } catch (\Exception $e) { $logger->logException($e, ["message" => "Failed to request federated health check for" . $remote, "app" => self::App_Name]); @@ -150,7 +148,7 @@ public static function healthCheck($remote) { self::update($remote, $status); } - $logger->debug("Remote instance " . $remote . " was stored to database", ["app" => self::App_Name]); + $logger->debug("Remote instance " . $remote . " was stored to database status " . $dbremote["status"], ["app" => self::App_Name]); self::$healthRemote[$remote] = $status; From e1a21af10313db5d400b221850384bb77e510ada Mon Sep 17 00:00:00 2001 From: Antipkin-A Date: Fri, 7 Oct 2022 17:02:27 +0300 Subject: [PATCH 27/30] move functions for a remote file --- controller/callbackcontroller.php | 4 +- controller/federationcontroller.php | 3 +- lib/fileutility.php | 38 +----------- lib/keymanager.php | 59 ------------------- lib/remoteinstance.php | 91 +++++++++++++++++++++++++++++ 5 files changed, 97 insertions(+), 98 deletions(-) diff --git a/controller/callbackcontroller.php b/controller/callbackcontroller.php index 3697fa47..7153196f 100644 --- a/controller/callbackcontroller.php +++ b/controller/callbackcontroller.php @@ -536,7 +536,7 @@ public function track($doc, $users, $key, $status, $url, $token, $history, $chan $prevIsForcesave = KeyManager::wasForcesave($fileId); if ($this->isFederatedOperation($file)) { - $isLock = KeyManager::lockFederatedKey($file, $isForcesave, null); + $isLock = RemoteInstance::lockRemoteKey($file, $isForcesave, null); if ($isForcesave && !$isLock) { break; } @@ -551,7 +551,7 @@ public function track($doc, $users, $key, $status, $url, $token, $history, $chan if ($this->isFederatedOperation($file)) { if ($isForcesave) { - KeyManager::lockFederatedKey($file, false, $isForcesave); + RemoteInstance::lockRemoteKey($file, false, $isForcesave); } } else { KeyManager::lock($fileId, false); diff --git a/controller/federationcontroller.php b/controller/federationcontroller.php index 93edc9dc..f6db4c4d 100644 --- a/controller/federationcontroller.php +++ b/controller/federationcontroller.php @@ -34,6 +34,7 @@ use OCA\Onlyoffice\DocumentService; use OCA\Onlyoffice\FileUtility; use OCA\Onlyoffice\KeyManager; +use OCA\Onlyoffice\RemoteInstance; /** * OCS handler @@ -138,7 +139,7 @@ public function keylock($shareToken, $path, $lock, $fs) { $fileId = $file->getId(); if ($file->getStorage()->instanceOfStorage(SharingExternalStorage::class)) { - $isLock = KeyManager::lockFederatedKey($file, $lock, $fs); + $isLock = RemoteInstance::lockRemoteKey($file, $lock, $fs); if (!$isLock) { return new Result(["error" => "Failed request"]); } diff --git a/lib/fileutility.php b/lib/fileutility.php index f4a3271e..c9e02413 100644 --- a/lib/fileutility.php +++ b/lib/fileutility.php @@ -32,6 +32,7 @@ use OCA\Onlyoffice\AppConfig; use OCA\Onlyoffice\Version; use OCA\Onlyoffice\KeyManager; +use OCA\Onlyoffice\RemoteInstance; /** * File utility @@ -225,7 +226,7 @@ public function getKey($file, $origin = false) { && $file->getStorage()->instanceOfStorage(SharingExternalStorage::class)) { try { - $key = $this->getFederatedKey($file); + $key = RemoteInstance::getRemoteKey($file); if (!empty($key)) { return $key; @@ -288,41 +289,6 @@ private function GUID() return sprintf('%04X%04X-%04X-%04X-%04X-%04X%04X%04X', mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(16384, 20479), mt_rand(32768, 49151), mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(0, 65535)); } - /** - * Generate unique document identifier in federated share - * - * @param File $file - file - * - * @return string - */ - private function getFederatedKey($file) { - $remote = $file->getStorage()->getRemote(); - $shareToken = $file->getStorage()->getToken(); - $internalPath = $file->getInternalPath(); - - $httpClientService = \OC::$server->getHTTPClientService(); - $client = $httpClientService->newClient(); - $response = $client->post($remote . "/ocs/v2.php/apps/" . $this->appName . "/api/v1/key?format=json", [ - "timeout" => 5, - "json" => [ - "shareToken" => $shareToken, - "path" => $internalPath - ] - ]); - $body = \json_decode($response->getBody(), true); - - $data = $body["ocs"]["data"]; - if (!empty($data["error"])) { - $this->logger->error("Error federated key " . $data["error"], ["app" => $this->appName]); - return null; - } - - $key = $data["key"]; - $this->logger->debug("Federated key: $key", ["app" => $this->appName]); - - return $key; - } - /** * Generate unique file version key * diff --git a/lib/keymanager.php b/lib/keymanager.php index 740aae32..489cf015 100644 --- a/lib/keymanager.php +++ b/lib/keymanager.php @@ -19,8 +19,6 @@ namespace OCA\Onlyoffice; -use OCP\Files\File; - /** * Key manager * @@ -28,11 +26,6 @@ */ class KeyManager { - /** - * App name - */ - private const App_Name = "onlyoffice"; - /** * Table name */ @@ -153,56 +146,4 @@ public static function wasForcesave($fileId) { return $fs === "1"; } - - /** - * Change lock status in the federated share - * - * @param File $file - file - * @param bool $lock - status - * @param bool $fs - status - * - * @return bool - */ - public static function lockFederatedKey($file, $lock, $fs) { - $logger = \OC::$server->getLogger(); - $action = $lock ? "lock" : "unlock"; - - $remote = $file->getStorage()->getRemote(); - $shareToken = $file->getStorage()->getToken(); - $internalPath = $file->getInternalPath(); - - $httpClientService = \OC::$server->getHTTPClientService(); - $client = $httpClientService->newClient(); - $data = [ - "timeout" => 5, - "json" => [ - "shareToken" => $shareToken, - "path" => $internalPath, - "lock" => $lock - ] - ]; - if (!empty($fs)) { - $data["json"]["fs"] = $fs; - } - - try { - $response = $client->post($remote . "/ocs/v2.php/apps/" . self::App_Name . "/api/v1/keylock?format=json", $data); - $body = \json_decode($response->getBody(), true); - - $data = $body["ocs"]["data"]; - - if (empty($data)) { - $logger->debug("Federated request" . $action . "for " . $file->getFileInfo()->getId() . " is successful", ["app" => self::App_Name]); - return true; - } - - if (!empty($data["error"])) { - $logger->error("Error" . $action . "federated key for " . $file->getFileInfo()->getId() . ": " . $data["error"], ["app" => self::App_Name]); - return false; - } - } catch(\Exception $e) { - $logger->logException($e, ["message" => "Failed to request federated " . $action . " for " . $file->getFileInfo()->getId(), "app" => self::App_Name]); - return false; - } - } } \ No newline at end of file diff --git a/lib/remoteinstance.php b/lib/remoteinstance.php index 2d41931f..03e23c13 100644 --- a/lib/remoteinstance.php +++ b/lib/remoteinstance.php @@ -19,6 +19,8 @@ namespace OCA\Onlyoffice; +use OCP\Files\File; + /** * Remote instance manager * @@ -154,4 +156,93 @@ public static function healthCheck($remote) { return self::$healthRemote[$remote]; } + + /** + * Generate unique document identifier in federated share + * + * @param File $file - file + * + * @return string + */ + public function getRemoteKey($file) { + $logger = \OC::$server->getLogger(); + + $remote = $file->getStorage()->getRemote(); + $shareToken = $file->getStorage()->getToken(); + $internalPath = $file->getInternalPath(); + + $httpClientService = \OC::$server->getHTTPClientService(); + $client = $httpClientService->newClient(); + $response = $client->post($remote . "/ocs/v2.php/apps/" . self::App_Name . "/api/v1/key?format=json", [ + "timeout" => 5, + "json" => [ + "shareToken" => $shareToken, + "path" => $internalPath + ] + ]); + $body = \json_decode($response->getBody(), true); + + $data = $body["ocs"]["data"]; + if (!empty($data["error"])) { + $logger->error("Error federated key " . $data["error"], ["app" => self::App_Name]); + return null; + } + + $key = $data["key"]; + $logger->debug("Federated key: $key", ["app" => self::App_Name]); + + return $key; + } + + /** + * Change lock status in the federated share + * + * @param File $file - file + * @param bool $lock - status + * @param bool $fs - status + * + * @return bool + */ + public static function lockRemoteKey($file, $lock, $fs) { + $logger = \OC::$server->getLogger(); + $action = $lock ? "lock" : "unlock"; + + $remote = $file->getStorage()->getRemote(); + $shareToken = $file->getStorage()->getToken(); + $internalPath = $file->getInternalPath(); + + $httpClientService = \OC::$server->getHTTPClientService(); + $client = $httpClientService->newClient(); + $data = [ + "timeout" => 5, + "json" => [ + "shareToken" => $shareToken, + "path" => $internalPath, + "lock" => $lock + ] + ]; + if (!empty($fs)) { + $data["json"]["fs"] = $fs; + } + + try { + $response = $client->post($remote . "/ocs/v2.php/apps/" . self::App_Name . "/api/v1/keylock?format=json", $data); + $body = \json_decode($response->getBody(), true); + + $data = $body["ocs"]["data"]; + + if (empty($data)) { + $logger->debug("Federated request" . $action . "for " . $file->getFileInfo()->getId() . " is successful", ["app" => self::App_Name]); + return true; + } + + if (!empty($data["error"])) { + $logger->error("Error" . $action . "federated key for " . $file->getFileInfo()->getId() . ": " . $data["error"], ["app" => self::App_Name]); + return false; + } + } catch(\Exception $e) { + $logger->logException($e, ["message" => "Failed to request federated " . $action . " for " . $file->getFileInfo()->getId(), "app" => self::App_Name]); + return false; + } + } } \ No newline at end of file From 57286821fa84463b2ddb0d1f2bb47a6f40d574d9 Mon Sep 17 00:00:00 2001 From: Antipkin-A Date: Fri, 7 Oct 2022 17:13:14 +0300 Subject: [PATCH 28/30] request to remote if available --- controller/callbackcontroller.php | 26 ++------------------------ controller/federationcontroller.php | 4 +--- lib/fileutility.php | 4 +--- lib/remoteinstance.php | 22 ++++++++++++++++++++++ 4 files changed, 26 insertions(+), 30 deletions(-) diff --git a/controller/callbackcontroller.php b/controller/callbackcontroller.php index 7153196f..4b0d57b7 100644 --- a/controller/callbackcontroller.php +++ b/controller/callbackcontroller.php @@ -37,8 +37,6 @@ use OCP\Share\Exceptions\ShareNotFound; use OCP\Share\IManager; -use OCA\Files_Sharing\External\Storage as SharingExternalStorage; - use OCA\Onlyoffice\AppConfig; use OCA\Onlyoffice\Crypt; use OCA\Onlyoffice\DocumentService; @@ -535,7 +533,7 @@ public function track($doc, $users, $key, $status, $url, $token, $history, $chan $prevIsForcesave = KeyManager::wasForcesave($fileId); - if ($this->isFederatedOperation($file)) { + if (RemoteInstance::isRemoteFile($file)) { $isLock = RemoteInstance::lockRemoteKey($file, $isForcesave, null); if ($isForcesave && !$isLock) { break; @@ -549,7 +547,7 @@ public function track($doc, $users, $key, $status, $url, $token, $history, $chan return $file->putContent($newData); }); - if ($this->isFederatedOperation($file)) { + if (RemoteInstance::isRemoteFile($file)) { if ($isForcesave) { RemoteInstance::lockRemoteKey($file, false, $isForcesave); } @@ -722,26 +720,6 @@ private function getFileByToken($fileId, $shareToken, $version = 0) { return [$file, null]; } - /** - * Check of federated capable - * - * @param File $file - file - * - * @return bool - */ - private function isFederatedOperation($file) { - $storage = $file->getStorage(); - - $alive = false; - $isFederated = $storage->instanceOfStorage(SharingExternalStorage::class); - if (!$isFederated) { - return false; - } - - $alive = RemoteInstance::healthCheck($storage->getRemote()); - return $alive; - } - /** * Getting share by token * diff --git a/controller/federationcontroller.php b/controller/federationcontroller.php index f6db4c4d..90ea7e7a 100644 --- a/controller/federationcontroller.php +++ b/controller/federationcontroller.php @@ -28,8 +28,6 @@ use OC\OCS\Result; -use OCA\Files_Sharing\External\Storage as SharingExternalStorage; - use OCA\Onlyoffice\AppConfig; use OCA\Onlyoffice\DocumentService; use OCA\Onlyoffice\FileUtility; @@ -138,7 +136,7 @@ public function keylock($shareToken, $path, $lock, $fs) { $fileId = $file->getId(); - if ($file->getStorage()->instanceOfStorage(SharingExternalStorage::class)) { + if (RemoteInstance::isRemoteFile($file)) { $isLock = RemoteInstance::lockRemoteKey($file, $lock, $fs); if (!$isLock) { return new Result(["error" => "Failed request"]); diff --git a/lib/fileutility.php b/lib/fileutility.php index c9e02413..9e25f1c9 100644 --- a/lib/fileutility.php +++ b/lib/fileutility.php @@ -27,8 +27,6 @@ use OCP\ISession; use OCP\Share\IManager; -use OCA\Files_Sharing\External\Storage as SharingExternalStorage; - use OCA\Onlyoffice\AppConfig; use OCA\Onlyoffice\Version; use OCA\Onlyoffice\KeyManager; @@ -223,7 +221,7 @@ public function getKey($file, $origin = false) { $fileId = $file->getId(); if ($origin - && $file->getStorage()->instanceOfStorage(SharingExternalStorage::class)) { + && RemoteInstance::isRemoteFile($file)) { try { $key = RemoteInstance::getRemoteKey($file); diff --git a/lib/remoteinstance.php b/lib/remoteinstance.php index 03e23c13..47ea5b84 100644 --- a/lib/remoteinstance.php +++ b/lib/remoteinstance.php @@ -21,6 +21,8 @@ use OCP\Files\File; +use OCA\Files_Sharing\External\Storage as SharingExternalStorage; + /** * Remote instance manager * @@ -245,4 +247,24 @@ public static function lockRemoteKey($file, $lock, $fs) { return false; } } + + /** + * Check of federated capable + * + * @param File $file - file + * + * @return bool + */ + public static function isRemoteFile($file) { + $storage = $file->getStorage(); + + $alive = false; + $isFederated = $storage->instanceOfStorage(SharingExternalStorage::class); + if (!$isFederated) { + return false; + } + + $alive = RemoteInstance::healthCheck($storage->getRemote()); + return $alive; + } } \ No newline at end of file From c1454ff76c335fc3abfe27f9c29699c7d2708e0c Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Wed, 19 Oct 2022 18:02:01 +0300 Subject: [PATCH 29/30] update changelog --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e9c903d5..31d4f974 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,9 +5,10 @@ - Chinese (Traditional, Taiwan), Basque (Spain), Armenian and Malay (Malaysia) empty file templates ## Changed -- fix edit of locked file +- fix edit locked file - generate preview by default - fix collaboration of federated files +- disable forcesave on encryption ## 7.5.4 ## Changed From 1a4051859f131a3173933e96ffa9363b7b0a81cb Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Wed, 19 Oct 2022 17:58:15 +0300 Subject: [PATCH 30/30] 7.6.7 --- CHANGELOG.md | 1 + appinfo/info.xml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 31d4f974..b1642b71 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ # Change Log +## 7.6.7 ## Added - Dutch translation - Chinese (Traditional, Taiwan), Basque (Spain), Armenian and Malay (Malaysia) empty file templates diff --git a/appinfo/info.xml b/appinfo/info.xml index b734bc93..465ace3d 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -6,7 +6,7 @@ ONLYOFFICE connector allows you to view, edit and collaborate on text documents, spreadsheets and presentations within ownCloud using ONLYOFFICE Docs. This will create a new Edit in ONLYOFFICE action within the document library for Office documents. This allows multiple users to co-author documents in real time from the familiar web interface and save the changes back to your file storage. apl2 Ascensio System SIA - 7.5.4 + 7.6.7 Onlyoffice