mirror of
https://github.com/ONLYOFFICE/document-server-integration.git
synced 2026-04-07 14:06:11 +08:00
php: oform
This commit is contained in:
@ -56,9 +56,14 @@
|
||||
$docKey = getDocEditorKey($filename);
|
||||
$filetype = strtolower(pathinfo($filename, PATHINFO_EXTENSION));
|
||||
|
||||
$ext = strtolower('.' . pathinfo($filename, PATHINFO_EXTENSION));
|
||||
$editorsMode = empty($_GET["action"]) ? "edit" : $_GET["action"]; // get the editors mode
|
||||
$canEdit = in_array(strtolower('.' . pathinfo($filename, PATHINFO_EXTENSION)), $GLOBALS['DOC_SERV_EDITED']); // check if the file can be edited
|
||||
$submitForm = $canEdit && ($editorsMode == "edit" || $editorsMode == "fillForms"); // check if the Submit form button is displayed or not
|
||||
$canEdit = in_array($ext, $GLOBALS['DOC_SERV_EDITED']); // check if the file can be edited
|
||||
if (($editorsMode == "edit" || $editorsMode == "fillForms") && in_array($ext, $GLOBALS['DOC_SERV_FILLFORMS'])) {
|
||||
$editorsMode = "fillForms";
|
||||
$canEdit = true;
|
||||
}
|
||||
$submitForm = $editorsMode == "fillForms" && $user->id == "uid-1"; // check if the Submit form button is displayed or not
|
||||
$mode = $canEdit && $editorsMode != "view" ? "edit" : "view"; // define if the editing mode is edit or view
|
||||
$type = empty($_GET["type"]) ? "desktop" : $_GET["type"];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user