mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 09:49:28 +02:00
Delete comment images when delete a video.
This commit is contained in:
parent
3c20d2a590
commit
e3d28d11ab
2 changed files with 7 additions and 1 deletions
|
@ -3051,6 +3051,12 @@ if (!class_exists('Video')) {
|
|||
|
||||
|
||||
$this->removeFiles($filename);
|
||||
|
||||
$commentsImagesDir = self::getStoragePath() . "uploads/comments/{$this->id}/";
|
||||
if(is_dir($commentsImagesDir)){
|
||||
rrmdir($commentsImagesDir);
|
||||
}
|
||||
|
||||
self::deleteThumbs($filename);
|
||||
}
|
||||
|
||||
|
|
|
@ -60,8 +60,8 @@ if (!User::canComment()) {
|
|||
?>
|
||||
});
|
||||
|
||||
$(document).ready(function() {
|
||||
var uploadCommentImageURL = webSiteRootURL + 'view/mini-upload-form/imageUpload.json.php';
|
||||
$(document).ready(function() {
|
||||
|
||||
$('#uploadImageBtn').on('click', function() {
|
||||
$('#commentImageInput').click();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue