mirror of
https://github.com/Foltik/Shimapan
synced 2024-11-30 22:41:47 -05:00
Allow users to delete their own files
This commit is contained in:
parent
eecfe7e35f
commit
19e082cc14
@ -115,7 +115,7 @@ function delete($filename, $deleteid)
|
||||
$q->execute();
|
||||
$result = $q->fetch();
|
||||
|
||||
if ($_SESSION['level'] === '0' || $result['user'] === $_SESSION['id']) {
|
||||
if ($_SESSION['level'] === '0' || $result['user'] === $_SESSION['user']) {
|
||||
$q = $db->prepare("DELETE FROM files WHERE id = (:id)");
|
||||
$q->bindParam(':id', $result['id']);
|
||||
$q->execute();
|
||||
|
Loading…
Reference in New Issue
Block a user