From 11dad9b5b729da5b3f6367a74346152767cc99b8 Mon Sep 17 00:00:00 2001
From: Peter Rotich <peter@enhancesoft.com>
Date: Thu, 22 Mar 2018 12:16:45 +0000
Subject: [PATCH] Misc. Fixes

---
 include/api.tickets.php | 2 +-
 include/class.staff.php | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/api.tickets.php b/include/api.tickets.php
index e2ee066ae..c209086a9 100644
--- a/include/api.tickets.php
+++ b/include/api.tickets.php
@@ -40,7 +40,7 @@ class TicketApiController extends ApiController {
         if(!strcasecmp($format, 'email')) {
             $supported = array_merge($supported, array('header', 'mid',
                 'emailId', 'to-email-id', 'ticketId', 'reply-to', 'reply-to-name',
-                'in-reply-to', 'references', 'thread-type',
+                'in-reply-to', 'references', 'thread-type', 'system_emails',
                 'mailflags' => array('bounce', 'auto-reply', 'spam', 'viral'),
                 'recipients' => array('*' => array('name', 'email', 'source'))
                 ));
diff --git a/include/class.staff.php b/include/class.staff.php
index 965b7d429..8c943417b 100644
--- a/include/class.staff.php
+++ b/include/class.staff.php
@@ -559,7 +559,7 @@ implements AuthenticatedUser, EmailContact, TemplateVariable, Searchable {
         $assigned->add(array('thread__referrals__agent__staff_id' => $this->getId()));
 
         // -- Open and assigned to a team of mine
-        if ($teams = array_filter($this->getTeams())) {
+        if (($teams = array_filter($this->getTeams()))) {
             $assigned->add(array('team_id__in' => $teams));
             $assigned->add(array('thread__referrals__team__team_id__in' => $teams));
         }
-- 
GitLab