@@ 4527-4542 (lines=16) @@ | ||
4524 | $documentData['comment'] |
|
4525 | ); |
|
4526 | ||
4527 | if (!empty($documentId)) { |
|
4528 | ||
4529 | if ($deleteWavFile) { |
|
4530 | $coursePath = $courseInfo['directory'].'/document'; |
|
4531 | $documentPath = api_get_path(SYS_COURSE_PATH).$coursePath; |
|
4532 | self::delete_document( |
|
4533 | $courseInfo, |
|
4534 | null, |
|
4535 | $documentPath, |
|
4536 | $sessionId, |
|
4537 | $documentData['id'] |
|
4538 | ); |
|
4539 | } |
|
4540 | ||
4541 | return $documentId; |
|
4542 | } |
|
4543 | } |
|
4544 | } |
|
4545 | ||
@@ 6137-6145 (lines=9) @@ | ||
6134 | public static function purgeDocument($id, $courseInfo, $sessionId = 0) |
|
6135 | { |
|
6136 | $document = self::getDeletedDocument($id, $courseInfo, $sessionId); |
|
6137 | if (!empty($document)) { |
|
6138 | $path = $document['path']; |
|
6139 | $coursePath = api_get_path(SYS_COURSE_PATH).$courseInfo['path'].'/document/'; |
|
6140 | my_delete($coursePath.$path); |
|
6141 | // Hard delete. |
|
6142 | self::deleteDocumentFromDb($id, $courseInfo, $sessionId, true); |
|
6143 | ||
6144 | return true; |
|
6145 | } |
|
6146 | return false; |
|
6147 | } |
|
6148 |