From 13f191b93f0bfecfd0b61088beecf9b11c0df79a Mon Sep 17 00:00:00 2001 From: Jared Hancock <jared@osticket.com> Date: Thu, 11 Dec 2014 11:03:00 -0600 Subject: [PATCH] oops: Allow staff edit of tickets with immutable data --- include/class.ticket.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/include/class.ticket.php b/include/class.ticket.php index d25b006a0..8227d1142 100644 --- a/include/class.ticket.php +++ b/include/class.ticket.php @@ -2285,11 +2285,15 @@ class Ticket { if (!in_array($form->getId(), $vars['forms'])) continue; $form->setSource($_POST); - if (!$form->isValidForStaff()) + if (!$form->isValid(function($f) { + return $f->isVisibleToStaff() && $f->isEditableToStaff(); + })) { $errors = array_merge($errors, $form->errors()); + } } - if($errors) return false; + if ($errors) + return false; $sql='UPDATE '.TICKET_TABLE.' SET updated=NOW() ' .' ,topic_id='.db_input($vars['topicId']) -- GitLab