@@ 4518-4533 (lines=16) @@ | ||
4515 | $documentData['comment'] |
|
4516 | ); |
|
4517 | ||
4518 | if (!empty($documentId)) { |
|
4519 | ||
4520 | if ($deleteWavFile) { |
|
4521 | $coursePath = $courseInfo['directory'].'/document'; |
|
4522 | $documentPath = api_get_path(SYS_COURSE_PATH).$coursePath; |
|
4523 | self::delete_document( |
|
4524 | $courseInfo, |
|
4525 | null, |
|
4526 | $documentPath, |
|
4527 | $sessionId, |
|
4528 | $documentData['id'] |
|
4529 | ); |
|
4530 | } |
|
4531 | ||
4532 | return $documentId; |
|
4533 | } |
|
4534 | } |
|
4535 | } |
|
4536 | ||
@@ 6128-6136 (lines=9) @@ | ||
6125 | public static function purgeDocument($id, $courseInfo, $sessionId = 0) |
|
6126 | { |
|
6127 | $document = self::getDeletedDocument($id, $courseInfo, $sessionId); |
|
6128 | if (!empty($document)) { |
|
6129 | $path = $document['path']; |
|
6130 | $coursePath = api_get_path(SYS_COURSE_PATH).$courseInfo['path'].'/document/'; |
|
6131 | my_delete($coursePath.$path); |
|
6132 | // Hard delete. |
|
6133 | self::deleteDocumentFromDb($id, $courseInfo, $sessionId, true); |
|
6134 | ||
6135 | return true; |
|
6136 | } |
|
6137 | return false; |
|
6138 | } |
|
6139 |