Fix rename document see BT#10887

pull/2487/head
jmontoyaa 9 years ago
parent a896b8bcf0
commit 487703ebd6
  1. 7
      main/inc/lib/document.lib.php
  2. 2
      main/inc/lib/fileUpload.lib.php
  3. 2
      main/lp/learnpath.class.php

@ -2982,8 +2982,11 @@ class DocumentManager
} }
}*/ }*/
if (!empty($title)) { // Don't need to rename the title it's already added inside handle_uploaded_document
$params['title'] = $title; if ($if_exists !== 'rename') {
if (!empty($title)) {
$params['title'] = $title;
}
} }
if (!empty($comment)) { if (!empty($comment)) {

@ -568,7 +568,7 @@ function handle_uploaded_document(
$groupId $groupId
); );
$documentTitle = get_document_title($cleanName); $documentTitle = disable_dangerous_file($cleanName);
$fullPath = $whereToSave.$fileSystemName; $fullPath = $whereToSave.$fileSystemName;
$filePath = $uploadPath.$fileSystemName; $filePath = $uploadPath.$fileSystemName;

@ -9018,7 +9018,7 @@ class learnpath
'radio', 'radio',
'if_exists', 'if_exists',
get_lang("UplWhatIfFileExists"), get_lang("UplWhatIfFileExists"),
get_lang('Yes'), get_lang('UplDoNothing'),
'nothing' 'nothing'
), ),
$form->createElement( $form->createElement(

Loading…
Cancel
Save