Merge branch '1.10.x' of github.com:chamilo/chamilo-lms into 1.10.x

1.10.x
jmontoya 10 years ago
commit 70846f9926
  1. 5
      main/inc/lib/document.lib.php
  2. 6
      main/inc/lib/message.lib.php

@ -2813,6 +2813,11 @@ class DocumentManager
if ($upload_ok) {
// File got on the server without problems, now process it
if ($title) {
$titleAndExt = explode('.', $files[$fileKey]['name']);
$ext = end($titleAndExt);
$files[$fileKey]['name'] = $title.'.'.$ext;
}
$new_path = handle_uploaded_document(
$course_info,
$files[$fileKey],

@ -364,9 +364,9 @@ class MessageManager
$sender_info = api_get_user_info($user_sender_id);
// add file attachment additional attributes
foreach ($file_attachments as $file_attach) {
$file_attachments['path'] = $file_attach['tmp_name'];
$file_attachments['filename'] = $file_attach['name'];
foreach ($file_attachments as $index => $file_attach) {
$file_attachments[$index]['path'] = $file_attach['tmp_name'];
$file_attachments[$index]['filename'] = $file_attach['name'];
}
if (empty($group_id)) {

Loading…
Cancel
Save