diff --git a/main/document/document.inc.php b/main/document/document.inc.php index 88914a6008..82b8aa0fd6 100644 --- a/main/document/document.inc.php +++ b/main/document/document.inc.php @@ -760,6 +760,7 @@ function create_dir_form($current_dir_id) { global $document_id; $form = new FormValidator('create_dir_form', 'post', '', '', null, false); + $form->addElement('hidden', 'create_dir', 1); $form->addElement('hidden', 'dir_id', intval($document_id)); $form->addElement('hidden', 'id', intval($current_dir_id)); $form->addElement('header', '', get_lang('CreateDir')); diff --git a/main/document/document.php b/main/document/document.php index 63c2673539..37e7e169d7 100644 --- a/main/document/document.php +++ b/main/document/document.php @@ -725,6 +725,7 @@ if($is_allowed_to_edit || $group_member_with_upload_rights || is_my_shared_folde //Only teacher and all users into their group and any user into his/her shared folder if ($is_allowed_to_edit || $group_member_with_upload_rights || is_my_shared_folder(api_get_user_id(), $curdirpath, $session_id)) { // Create directory with $_POST data + if (isset($_POST['create_dir']) && $_POST['dirname'] != '') { // Needed for directory creation $post_dir_name = $_POST['dirname'];