From d63de1c0f3994b1e3cd4362f277a15c47989fcb4 Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Thu, 18 Apr 2019 11:38:30 +0200 Subject: [PATCH] Fix document edition --- main/document/edit_document.php | 13 +------------ .../lib/formvalidator/FormValidator.class.php | 2 +- .../Component/Editor/CkEditor/CkEditor.php | 16 +++++++++++----- .../Editor/CkEditor/Toolbar/Documents.php | 2 +- src/CoreBundle/Component/Editor/Editor.php | 8 +++++--- 5 files changed, 19 insertions(+), 22 deletions(-) diff --git a/main/document/edit_document.php b/main/document/edit_document.php index 119bd2ceb3..d5547512be 100755 --- a/main/document/edit_document.php +++ b/main/document/edit_document.php @@ -280,10 +280,6 @@ if ($is_allowed_to_edit) { $read_only_flag = isset($_POST['readonly']) ? $_POST['readonly'] : null; $read_only_flag = empty($read_only_flag) ? 0 : 1; - if ($file_type != 'link') { - //$file_size = filesize($document_data['absolute_path']); - } - if ($read_only_flag == 0) { if (!empty($content)) { $node = $document->getResourceNode(); @@ -300,14 +296,6 @@ if ($is_allowed_to_edit) { $em->merge($node); $em->flush(); } - } else { - if ($document_id) { - //update_existing_document($_course, $document_id, $file_size, $read_only_flag); - } - } - } else { - if ($document_id) { - //update_existing_document($_course, $document_id, $file_size, $read_only_flag); } } @@ -384,6 +372,7 @@ if ($owner_id == api_get_user_id() || // Desactivation of IE proprietary commenting tags inside the text before loading it on the online editor. // This fix has been proposed by Hubert Borderiou, see Bug #573, http://support.chamilo.org/issues/573 $defaults['content'] = str_replace('