diff --git a/include/class.mailfetch.php b/include/class.mailfetch.php index 5a4e7e0f73e2edbe006f485f9dbe50b6d69809ce..aa43ce89e960231bdf2e25bf0f622a24d2b44741 100644 --- a/include/class.mailfetch.php +++ b/include/class.mailfetch.php @@ -442,7 +442,7 @@ class MailFetcher { //This should be really a comment on message - NoT an internal note. //TODO: support comments on Messages and Responses. $error = sprintf('Attachment %s [%s] rejected because of file type', $a['name'], $a['mime']); - $ticket->postNote('Email Attachment Rejected', $error, false); + $ticket->postNote('Email Attachment Rejected', $error, 'SYSTEM', false); $ost->logDebug('Email Attachment Rejected (Ticket #'.$ticket->getExtId().')', $error); } } diff --git a/scp/tickets.php b/scp/tickets.php index 77eec14eab39caed7e1c235ffa079bdeaa658ace..9cc247cc68cf8aeed4530dfff6333ce5bf105921 100644 --- a/scp/tickets.php +++ b/scp/tickets.php @@ -81,13 +81,8 @@ if($_POST && !$errors): elseif(strlen($_POST['transfer_message'])<5) $errors['transfer_message'] = 'Transfer comments too short!'; - $currentDept = $ticket->getDeptName(); //save current dept name. if(!$errors && $ticket->transfer($_POST['deptId'], $_POST['transfer_message'])) { $msg = 'Ticket transferred successfully to '.$ticket->getDeptName(); - //ticket->transfer does a reload...new dept at this point. - $title='Dept. Transfer from '.$currentDept.' to '.$ticket->getDeptName(); - /*** log the message as internal note - with alerts disabled - ***/ - $ticket->postNote($title, $_POST['transfer_message'], false); //Check to make sure the staff still has access to the ticket if(!$ticket->checkStaffAccess($thisstaff)) $ticket=null; @@ -140,7 +135,7 @@ if($_POST && !$errors): if(!Validator::process($fields, $_POST, $errors) && !$errors['err']) $errors['err']=$errors['note']='Missing or invalid data. Correct the error(s) below and try again!'; - if(!$errors && ($noteId=$ticket->postNote($_POST['title'], $_POST['internal_note']))) { + if(!$errors && ($noteId=$ticket->postNote($_POST['title'], $_POST['internal_note'], $thisstaff))) { $msg='Internal note posted successfully'; //Upload attachments IF ANY - TODO: validate attachment types?? if($_FILES['attachments'] && ($files=Format::files($_FILES['attachments'])))