php: added work with onlyoffice-docs-formats.json

This commit is contained in:
Aleksandr Fedorov
2023-04-27 11:33:57 +03:00
parent 53f810fc54
commit c37ba28ad3
4 changed files with 44 additions and 43 deletions

View File

@ -71,7 +71,7 @@ final class DocEditorView extends View
$docKey = getDocEditorKey($filename);
$filetype = mb_strtolower(pathinfo($filename, PATHINFO_EXTENSION));
$ext = mb_strtolower('.' . pathinfo($filename, PATHINFO_EXTENSION));
$ext = mb_strtolower(pathinfo($filename, PATHINFO_EXTENSION));
$editorsMode = empty($request["action"]) ? "edit" : $request["action"]; // get the editors mode
$canEdit = in_array($ext, $confgManager->getEditExtensions()); // check if the file can be edited
if ((!$canEdit && $editorsMode == "edit"