|
|
|
|
@ -1223,8 +1223,8 @@ function add_document( |
|
|
|
|
$c_id = $_course['real_id']; |
|
|
|
|
|
|
|
|
|
$table_document = Database::get_course_table(TABLE_DOCUMENT); |
|
|
|
|
$sql = "INSERT INTO $table_document (c_id, path, filetype, size, title, comment, readonly, session_id) |
|
|
|
|
VALUES ($c_id, '$path','$filetype','$filesize','$title', '$comment', $readonly, $session_id)"; |
|
|
|
|
$sql = "INSERT INTO $table_document (id, c_id, path, filetype, size, title, comment, readonly, session_id) |
|
|
|
|
VALUES (null, $c_id, '$path','$filetype','$filesize','$title', '$comment', $readonly, $session_id)"; |
|
|
|
|
|
|
|
|
|
if (Database::query($sql)) { |
|
|
|
|
$documentId = Database::insert_id(); |
|
|
|
|
|