Improves code according to Ivan's comments
This commit is contained in:
parent
5ab155f8ce
commit
995d302a49
|
@ -100,8 +100,8 @@ class CommentController extends Controller {
|
|||
'name' => $this->ticket->owner->name,
|
||||
'staff' => true
|
||||
]);
|
||||
} else if($isOwner) {
|
||||
!Controller::request('private') ? $this->sendMail($ticketAuthor) : null;
|
||||
} else if($isOwner && !Controller::request('private')) {
|
||||
$this->sendMail($ticketAuthor);
|
||||
}
|
||||
|
||||
Log::createLog('COMMENT', $this->ticket->ticketNumber);
|
||||
|
|
|
@ -71,7 +71,7 @@ class Log extends DataStore {
|
|||
'to' => $this->to,
|
||||
'author' => [
|
||||
'name' => $this->authorName,
|
||||
'id' => $author && !$author->isNull() ? $author->id : null,
|
||||
'id' => ($author && !$author->isNull()) ? $author->id : null,
|
||||
'staff' => $author instanceof Staff
|
||||
],
|
||||
'date' => $this->date
|
||||
|
|
|
@ -92,7 +92,7 @@ class Ticketevent extends DataStore {
|
|||
'name' => $user ? $user->name : $author['name'],
|
||||
'staff' => $user instanceOf Staff,
|
||||
'id' => $user ? $user->id : null,
|
||||
'customfields' => $user && $user->xownCustomfieldvalueList ? $user->xownCustomfieldvalueList->toArray() : [],
|
||||
'customfields' => ($user && $user->xownCustomfieldvalueList) ? $user->xownCustomfieldvalueList->toArray() : [],
|
||||
],
|
||||
'edited' => $this->editedContent
|
||||
];
|
||||
|
|
Loading…
Reference in New Issue