Allow regular users to unlink tags from photos.
This commit is contained in:
@@ -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