Allow regular users to unlink tags from photos.
This commit is contained in:
1 parent
05c48be785
commit
42e5c7fe37
3 files changed
+61
-9
No files matched your search
@@ -98,8 +98,19 @@ class ViewPhoto extends HTMLController
|
||||
}
|
||||
|
||||
// We are!
|
||||
$photo->linkTags([(int) $_POST['id_tag']]);
|
||||
echo json_encode(['success' => true]);
|
||||
exit;
|
||||
if (!isset($_POST['delete']))
|
||||
{
|
||||
$photo->linkTags([(int) $_POST['id_tag']]);
|
||||
echo json_encode(['success' => true]);
|
||||
exit;
|
||||
}
|
||||
|
||||
// ... deleting, that is.
|
||||
else
|
||||
{
|
||||
$photo->unlinkTags([(int) $_POST['id_tag']]);
|
||||
echo json_encode(['success' => true]);
|
||||
exit;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user