[svn r18125] FS#2867 - FCKEditor, simple file manager: A correction in registering in database of newly uploaded files (while a user is in a course).

skala
Ivan Tcholakov 16 years ago
parent 493031a7a1
commit 49c34bdc06
  1. 4
      main/inc/lib/fckeditor/editor/filemanager/browser/default/connectors/php/commands.php

@ -290,7 +290,7 @@ function FileUpload( $resourceType, $currentFolder, $sCommand )
if ($sErrorNumber == '0')
{
// While we are in a course: Registering the newly created folder in the course's database.
// While we are in a course: Registering the newly uploaded file in the course's database.
if (api_is_in_course())
{
global $_course, $_user;
@ -310,7 +310,7 @@ function FileUpload( $resourceType, $currentFolder, $sCommand )
$folder_path = '/' + implode('/', $path);
$file_size = @filesize($sFilePath);
$doc_id = add_document($_course, $file_path, 'file', $file_size, $file_name);
api_item_property_update($_course, TOOL_DOCUMENT, $doc_id, 'FolderCreated', $_user['user_id'], $to_group_id);
api_item_property_update($_course, TOOL_DOCUMENT, $doc_id, 'DocumentAdded', $_user['user_id'], $to_group_id);
item_property_update_on_folder($_course, $folder_path, $_user['user_id']);
}
}

Loading…
Cancel
Save