add a delete button to delete a video
This commit is contained in:
1 parent
c2991bcd50
commit
13a980f161
4 files changed
+57
-5
No files matched your search
@@ -219,5 +219,18 @@ class Video extends RequestBase {
|
||||
$this->commitMessage('{"result":"' . $this->conn->error . '"}');
|
||||
}
|
||||
});
|
||||
|
||||
$this->addActionHandler("deleteVideo", function () {
|
||||
$movieid = $_POST['movieid'];
|
||||
|
||||
// delete video entry and corresponding tag infos
|
||||
$query = "DELETE FROM videos WHERE movie_id=$movieid";
|
||||
|
||||
if ($this->conn->query($query) === TRUE) {
|
||||
$this->commitMessage('{"result":"success"}');
|
||||
} else {
|
||||
$this->commitMessage('{"result":"' . $this->conn->error . '"}');
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user