Commit 42e84696 authored by Ruslan Kabalin's avatar Ruslan Kabalin
Browse files

comments: quota checks on commenting of own views/artefacts



Do not let user to attach a file to comment if will cause his own quota
exceeding.
Signed-off-by: default avatarRuslan Kabalin <ruslan.kabalin@luns.net.uk>
parent e96c21fd
......@@ -888,7 +888,11 @@ function add_feedback_form_submit(Pieform $form, $values) {
try {
$fileid = ArtefactTypeFile::save_uploaded_file($filesindex, $attachment);
}
catch (QuotaExceededException $e) {}
catch (QuotaExceededException $e) {
if ($data->owner == $USER->get('id')) {
$form->reply(PIEFORM_ERR, array('message' => $e->getMessage()));
}
}
$comment->attach($fileid);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment