diff --git a/CHANGELOG.md b/CHANGELOG.md index 0909ccf7..b5ea6407 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Change Log +## 7.3.3 +## Added +- Turkish and Galician empty file templates + +## Changed +- redesign of the creation dialog + ## 7.3.1 ## Added - support docxf and oform formats diff --git a/appinfo/app.php b/appinfo/app.php index 36ef277f..c2e1e0ef 100644 --- a/appinfo/app.php +++ b/appinfo/app.php @@ -1,7 +1,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.3.1 + 7.3.3 Onlyoffice diff --git a/appinfo/routes.php b/appinfo/routes.php index ef1946e0..8a1bad26 100644 --- a/appinfo/routes.php +++ b/appinfo/routes.php @@ -1,7 +1,7 @@ logger->debug("Request history for: $fileId", ["app" => $this->appName]); - if (empty($shareToken) && !$this->config->isUserAllowedToUse()) { + if (!$this->config->isUserAllowedToUse()) { return ["error" => $this->trans->t("Not permitted")]; } @@ -714,7 +708,7 @@ public function history($fileId, $shareToken = null) { $userId = $user->getUID(); } - list ($file, $error, $share) = empty($shareToken) ? $this->getFile($userId, $fileId) : $this->fileUtility->getFileByToken($fileId, $shareToken); + list ($file, $error, $share) = $this->getFile($userId, $fileId); if (isset($error)) { $this->logger->error("History: $fileId $error", ["app" => $this->appName]); @@ -813,16 +807,15 @@ public function history($fileId, $shareToken = null) { * * @param integer $fileId - file identifier * @param integer $version - file version - * @param string $shareToken - access token * * @return array * * @NoAdminRequired */ - public function version($fileId, $version, $shareToken = null) { + public function version($fileId, $version) { $this->logger->debug("Request version for: $fileId ($version)", ["app" => $this->appName]); - if (empty($shareToken) && !$this->config->isUserAllowedToUse()) { + if (!$this->config->isUserAllowedToUse()) { return ["error" => $this->trans->t("Not permitted")]; } @@ -834,7 +827,7 @@ public function version($fileId, $version, $shareToken = null) { $userId = $user->getUID(); } - list ($file, $error, $share) = empty($shareToken) ? $this->getFile($userId, $fileId) : $this->fileUtility->getFileByToken($fileId, $shareToken); + list ($file, $error, $share) = $this->getFile($userId, $fileId); if (isset($error)) { $this->logger->error("History: $fileId $error", ["app" => $this->appName]); @@ -863,14 +856,14 @@ public function version($fileId, $version, $shareToken = null) { $key = $this->fileUtility->getKey($file, true); $versionId = $file->getFileInfo()->getMtime(); - $fileUrl = $this->getUrl($file, $user, $shareToken); + $fileUrl = $this->getUrl($file, $user); } else { $fileVersion = array_values($versions)[$version - 1]; $key = $this->fileUtility->getVersionKey($fileVersion); $versionId = $fileVersion->getRevisionId(); - $fileUrl = $this->getUrl($file, $user, $shareToken, $version); + $fileUrl = $this->getUrl($file, $user, null, $version); } $key = DocumentService::GenerateRevisionId($key); @@ -884,14 +877,14 @@ public function version($fileId, $version, $shareToken = null) { && count($versions) >= $version - 1 && FileVersions::hasChanges($ownerId, $fileId, $versionId)) { - $changesUrl = $this->getUrl($file, $user, $shareToken, $version, true); + $changesUrl = $this->getUrl($file, $user, null, $version, true); $result["changesUrl"] = $changesUrl; $prevVersion = array_values($versions)[$version - 2]; $prevVersionKey = $this->fileUtility->getVersionKey($prevVersion); $prevVersionKey = DocumentService::GenerateRevisionId($prevVersionKey); - $prevVersionUrl = $this->getUrl($file, $user, $shareToken, $version - 1); + $prevVersionUrl = $this->getUrl($file, $user, null, $version - 1); $result["previous"] = [ "key" => $prevVersionKey, @@ -912,17 +905,16 @@ public function version($fileId, $version, $shareToken = null) { * * @param integer $fileId - file identifier * @param integer $version - file version - * @param string $shareToken - access token * * @return array * * @NoAdminRequired * @PublicPage */ - public function restore($fileId, $version, $shareToken = null) { + public function restore($fileId, $version) { $this->logger->debug("Request restore version for: $fileId ($version)", ["app" => $this->appName]); - if (empty($shareToken) && !$this->config->isUserAllowedToUse()) { + if (!$this->config->isUserAllowedToUse()) { return ["error" => $this->trans->t("Not permitted")]; } @@ -934,7 +926,7 @@ public function restore($fileId, $version, $shareToken = null) { $userId = $user->getUID(); } - list ($file, $error, $share) = empty($shareToken) ? $this->getFile($userId, $fileId) : $this->fileUtility->getFileByToken($fileId, $shareToken); + list ($file, $error, $share) = $this->getFile($userId, $fileId); if (isset($error)) { $this->logger->error("Restore: $fileId $error", ["app" => $this->appName]); @@ -959,7 +951,7 @@ public function restore($fileId, $version, $shareToken = null) { } } - return $this->history($fileId, $shareToken); + return $this->history($fileId); } /** diff --git a/controller/federationcontroller.php b/controller/federationcontroller.php index 3c90eb90..bebb76bd 100644 --- a/controller/federationcontroller.php +++ b/controller/federationcontroller.php @@ -1,7 +1,7 @@ { return template.type === type; diff --git a/l10n/bg_BG.js b/l10n/bg_BG.js index f3fde2ce..0f5a739e 100644 --- a/l10n/bg_BG.js +++ b/l10n/bg_BG.js @@ -106,4 +106,4 @@ OC.L10N.register( "Create new Form template": "Създайте нов шаблон на формуляр", "Please update ONLYOFFICE Docs to version 7.0 to work on fillable forms online": "Молим да актуализирате ONLYOFFICE Docs към версия 7.0, за да работи с онлайн формуляри за попълване" }, -"nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);"); +"nplurals=2; plural=(n != 1);"); diff --git a/l10n/bg_BG.json b/l10n/bg_BG.json index 499a1cba..4ce55134 100644 --- a/l10n/bg_BG.json +++ b/l10n/bg_BG.json @@ -103,5 +103,5 @@ "Fill in form in ONLYOFFICE": "Попълнете формуляр в ONLYOFFICE", "Create new Form template": "Създайте нов шаблон на формуляр", "Please update ONLYOFFICE Docs to version 7.0 to work on fillable forms online": "Молим да актуализирате ONLYOFFICE Docs към версия 7.0, за да работи с онлайн формуляри за попълване" -},"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);" +},"pluralForm" :"nplurals=2; plural=(n != 1);" } \ No newline at end of file diff --git a/l10n/fr.js b/l10n/fr.js index 7bf4a712..7fb611bc 100644 --- a/l10n/fr.js +++ b/l10n/fr.js @@ -106,4 +106,4 @@ OC.L10N.register( "Create new Form template": "Créer un nouveau modèle de formulaire", "Please update ONLYOFFICE Docs to version 7.0 to work on fillable forms online": "Veuillez mettre à jour ONLYOFFICE Docs vers la version 7.0 pour travailler sur les formulaires à remplir en ligne" }, -"nplurals=2; plural=(n != 1);"); +"nplurals=2; plural=(n > 1);"); diff --git a/l10n/fr.json b/l10n/fr.json index a661aeaa..fd2bb24f 100644 --- a/l10n/fr.json +++ b/l10n/fr.json @@ -103,5 +103,5 @@ "Fill in form in ONLYOFFICE": "Remplir le formulaire dans ONLYOFFICE", "Create new Form template": "Créer un nouveau modèle de formulaire", "Please update ONLYOFFICE Docs to version 7.0 to work on fillable forms online": "Veuillez mettre à jour ONLYOFFICE Docs vers la version 7.0 pour travailler sur les formulaires à remplir en ligne" -}, "pluralForm" :"nplurals=2; plural=(n != 1);" +},"pluralForm" :"nplurals=2; plural=(n > 1);" } \ No newline at end of file diff --git a/l10n/ja.js b/l10n/ja.js index 95fa20cd..53e6909f 100644 --- a/l10n/ja.js +++ b/l10n/ja.js @@ -106,4 +106,4 @@ OC.L10N.register( "Create new Form template": "新しいフォームテンプレートの作成", "Please update ONLYOFFICE Docs to version 7.0 to work on fillable forms online": "オンラインで入力可能なフォームを作成するには、ONLYOFFICE Docs 7.0版まで更新してください" }, -"nplurals=2; plural=(n != 1);"); +"nplurals=1; plural=0;"); diff --git a/l10n/ja.json b/l10n/ja.json index 11737fa3..ac5ba018 100644 --- a/l10n/ja.json +++ b/l10n/ja.json @@ -103,5 +103,5 @@ "Fill in form in ONLYOFFICE": "ONLYOFFICEでフォームを記入する", "Create new Form template": "新しいフォームテンプレートの作成", "Please update ONLYOFFICE Docs to version 7.0 to work on fillable forms online": "オンラインで入力可能なフォームを作成するには、ONLYOFFICE Docs 7.0版まで更新してください" -},"pluralForm" :"nplurals=2; plural=(n != 1);" +},"pluralForm" :"nplurals=1; plural=0;" } \ No newline at end of file diff --git a/l10n/pl.js b/l10n/pl.js index 15fd8da1..60dba20a 100644 --- a/l10n/pl.js +++ b/l10n/pl.js @@ -106,4 +106,4 @@ OC.L10N.register( "Create new Form template": "Utwórz nowy szablon formularza", "Please update ONLYOFFICE Docs to version 7.0 to work on fillable forms online": "Zaktualizuj ONLYOFFICE Docs do wersji 7.0, aby działały w formularzach do wypełniania online" }, -"nplurals=2; plural=(n != 1);"); \ No newline at end of file +"nplurals=4; plural=(n==1 ? 0 : (n%10>=2 && n%10<=4) && (n%100<12 || n%100>14) ? 1 : n!=1 && (n%10>=0 && n%10<=1) || (n%10>=5 && n%10<=9) || (n%100>=12 && n%100<=14) ? 2 : 3);"); \ No newline at end of file diff --git a/l10n/pl.json b/l10n/pl.json index 3d1aa869..0c466012 100644 --- a/l10n/pl.json +++ b/l10n/pl.json @@ -103,5 +103,5 @@ "Fill in form in ONLYOFFICE": "Wypełnić formularz w ONLYOFFICE", "Create new Form template": "Utwórz nowy szablon formularza", "Please update ONLYOFFICE Docs to version 7.0 to work on fillable forms online": "Zaktualizuj ONLYOFFICE Docs do wersji 7.0, aby działały w formularzach do wypełniania online" -},"pluralForm" :"nplurals=2; plural=(n != 1);" +},"pluralForm" :"nplurals=4; plural=(n==1 ? 0 : (n%10>=2 && n%10<=4) && (n%100<12 || n%100>14) ? 1 : n!=1 && (n%10>=0 && n%10<=1) || (n%10>=5 && n%10<=9) || (n%100>=12 && n%100<=14) ? 2 : 3);" } \ No newline at end of file diff --git a/l10n/pt_BR.js b/l10n/pt_BR.js index d19c5537..59893168 100644 --- a/l10n/pt_BR.js +++ b/l10n/pt_BR.js @@ -106,4 +106,4 @@ OC.L10N.register( "Create new Form template": "Criar novo modelo de Formulário", "Please update ONLYOFFICE Docs to version 7.0 to work on fillable forms online": "Atualize o ONLYOFFICE Docs para a versão 7.0 para trabalhar em formulários preenchíveis online" }, -"nplurals=2; plural=(n != 1);"); +"nplurals=2; plural=(n > 1);"); diff --git a/l10n/pt_BR.json b/l10n/pt_BR.json index e0565d01..2ecd02e7 100644 --- a/l10n/pt_BR.json +++ b/l10n/pt_BR.json @@ -103,5 +103,5 @@ "Fill in form in ONLYOFFICE": "Preencher formulário no ONLYOFFICE", "Create new Form template": "Criar novo modelo de Formulário", "Please update ONLYOFFICE Docs to version 7.0 to work on fillable forms online": "Atualize o ONLYOFFICE Docs para a versão 7.0 para trabalhar em formulários preenchíveis online" -},"pluralForm" :"nplurals=2; plural=(n != 1);" +},"pluralForm" :"nplurals=2; plural=(n > 1);" } diff --git a/l10n/ru.js b/l10n/ru.js index deafbcaa..29b3ac95 100644 --- a/l10n/ru.js +++ b/l10n/ru.js @@ -106,4 +106,4 @@ OC.L10N.register( "Create new Form template": "Создать новый шаблон формы", "Please update ONLYOFFICE Docs to version 7.0 to work on fillable forms online": "Обновите сервер ONLYOFFICE Docs до версии 7.0 для работы с формами онлайн" }, -"nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);"); +"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 adb66976..37abe42c 100644 --- a/l10n/ru.json +++ b/l10n/ru.json @@ -103,5 +103,5 @@ "Fill in form in ONLYOFFICE": "Заполнить форму в ONLYOFFICE", "Create new Form template": "Создать новый шаблон формы", "Please update ONLYOFFICE Docs to version 7.0 to work on fillable forms online": "Обновите сервер ONLYOFFICE Docs до версии 7.0 для работы с формами онлайн" -},"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);" +},"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 diff --git a/l10n/zh_CN.js b/l10n/zh_CN.js index 1fbcabcb..1b790ff6 100644 --- a/l10n/zh_CN.js +++ b/l10n/zh_CN.js @@ -106,4 +106,4 @@ OC.L10N.register( "Create new Form template": "创建新的表单模板", "Please update ONLYOFFICE Docs to version 7.0 to work on fillable forms online": "请将ONLYOFFICE Docs更新到7.0版本,以便在线编辑可填写的表单" }, -"nplurals=2; plural=(n != 1);"); +"nplurals=1; plural=0;"); diff --git a/l10n/zh_CN.json b/l10n/zh_CN.json index d57e6970..e6556437 100644 --- a/l10n/zh_CN.json +++ b/l10n/zh_CN.json @@ -103,5 +103,5 @@ "Fill in form in ONLYOFFICE": "在ONLYOFFICE上填写表单", "Create new Form template": "创建新的表单模板", "Please update ONLYOFFICE Docs to version 7.0 to work on fillable forms online": "请将ONLYOFFICE Docs更新到7.0版本,以便在线编辑可填写的表单" -},"pluralForm" :"nplurals=2; plural=(n != 1);" +},"pluralForm" :"nplurals=1; plural=0;" } \ No newline at end of file diff --git a/lib/adminsettings.php b/lib/adminsettings.php index 0c799256..eadb80db 100644 --- a/lib/adminsettings.php +++ b/lib/adminsettings.php @@ -1,7 +1,7 @@ trim($to_extension, "."), "filetype" => $from_extension, "title" => $document_revision_id . "." . $from_extension, - "key" => $document_revision_id + "key" => $document_revision_id, + "region" => str_replace("_", "-", \OC::$server->getL10NFactory("")->get("")->getLanguageCode()) ]; if ($this->config->UseDemo()) { @@ -414,6 +415,10 @@ public function checkDocServiceUrl($urlGenerator, $crypt) { } $version = $commandResponse->version; + $versionF = floatval($version); + if ($versionF > 0.0 && $versionF <= 6.0) { + throw new \Exception($this->trans->t("Not supported version")); + } } catch (\Exception $e) { $logger->logException($e, ["message" => "CommandRequest on check error", "app" => self::$appName]); diff --git a/lib/fileutility.php b/lib/fileutility.php index 2be240f3..e47d4321 100644 --- a/lib/fileutility.php +++ b/lib/fileutility.php @@ -1,7 +1,7 @@ "en-GB", "es" => "es-ES", "fr" => "fr-FR", + "gl" => "gl-ES", "it" => "it-IT", "ja" => "ja-JP", "ko" => "ko-KR", @@ -206,6 +207,7 @@ public static function GetEmptyTemplatePath($lang, $ext) { "ru" => "ru-RU", "sk_SK" => "sk-SK", "sv" => "sv-SE", + "tr" => "tr-TR", "uk" => "uk-UA", "vi" => "vi-VN", "zh_CN" => "zh-CN" diff --git a/lib/version.php b/lib/version.php index b1ea60d6..813ac047 100644 --- a/lib/version.php +++ b/lib/version.php @@ -1,7 +1,7 @@ t("Documentation")) ?>"> -

t("Server settings")) ?>

+

t("Server settings")) ?>

@@ -92,7 +92,7 @@

onlyoffice-hide">
-

t("Common settings")) ?>

+

t("Common settings")) ?>


-

+

t("Editor customization settings")) ?> "> -

+

-

+

t("Common templates")) ?> -

+
  • class="onlyoffice-template-item" > diff --git a/templates/templatePicker.html b/templates/templatePicker.html index 55f6b75c..43082aa9 100644 --- a/templates/templatePicker.html +++ b/templates/templatePicker.html @@ -1,7 +1,6 @@
    -
      -
    • - +
        +