mirror of
https://github.com/Foltik/Shimapan
synced 2024-12-01 06:44:24 -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();
|
$q->execute();
|
||||||
$result = $q->fetch();
|
$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 = $db->prepare("DELETE FROM files WHERE id = (:id)");
|
||||||
$q->bindParam(':id', $result['id']);
|
$q->bindParam(':id', $result['id']);
|
||||||
$q->execute();
|
$q->execute();
|
||||||
|
Loading…
Reference in New Issue
Block a user