diff --git a/assets/default/css/theme.css b/assets/default/css/theme.css index f27deeaed27a94a465ba971d79dbf9c33ab540b4..e8435a45e27022d10ac14416b6249279cdc728a0 100644 --- a/assets/default/css/theme.css +++ b/assets/default/css/theme.css @@ -1127,28 +1127,6 @@ img.avatar { margin-left: 1px; } -.thread-entry.bccmessage .header { - background:#DDFDAC; -} -.thread-entry.avatar.bccmessage .header:before { - top: 7px; - left: -8px; - right: initial; - border-left: none; - border-right: 8px solid #CCC; -} -.thread-entry.avatar.bccmessage .header:before { - border-right-color: #CCC; -} -.thread-entry.avatar.bccmessage .header:after { - top: 7px; - left: -8px; - right: initial; - border-left: none; - border-right: 7px solid #DDFDAC; - margin-left: 1px; -} - .thread-entry .header .title { max-width: 500px; vertical-align: bottom; diff --git a/include/ajax.thread.php b/include/ajax.thread.php index 0369548ed5deb1b855c6f2f9c3127d4eb9b4ff22..7e72aef126e2992dcba539dfb8da011a4244f0d6 100644 --- a/include/ajax.thread.php +++ b/include/ajax.thread.php @@ -107,7 +107,7 @@ class ThreadAjaxAPI extends AjaxController { array(), $errors))) { $info = array('msg' => sprintf(__('%s added as a collaborator'), Format::htmlchars($c->getName()))); - $type == 'addbcc' ? $c->setBcc() : $c->setCc(); + $c->setCc(); $c->save(); return self::_collaborators($thread, $info); } diff --git a/include/class.collaborator.php b/include/class.collaborator.php index d6fdbbfc566baf4ea95f039db4ada378648cfb97..94e97fee65f55a37d9cff4f27707fee0934a742a 100644 --- a/include/class.collaborator.php +++ b/include/class.collaborator.php @@ -150,12 +150,6 @@ implements EmailContact, ITicketUser { $this->save(); } - public function setBcc() { - $this->setFlag(Collaborator::FLAG_ACTIVE, true); - $this->setFlag(Collaborator::FLAG_CC, false); - $this->save(); - } - function isCc() { return !!($this->flags & self::FLAG_CC); } diff --git a/include/class.template.php b/include/class.template.php index 4e73ecb32967f248d6781b6d6696036bd4ff1088..53f1caf431a542d115bcfe49a5baa5d08bdf3eb7 100644 --- a/include/class.template.php +++ b/include/class.template.php @@ -60,14 +60,6 @@ class EmailTemplateGroup { 'ticket', 'signature', 'recipient', 'staff', 'message', ), ), - 'ticket.notice.bcc'=>array( - 'group'=>'a.ticket.user', - 'name'=>/* @trans */ 'New Ticket Notice (BCC)', - 'desc'=>/* @trans */ 'Notice sent to BCCd users, if enabled, on new ticket created by an agent on behalf of a user (e.g phone calls).', - 'context' => array( - 'ticket', 'signature', 'recipient', 'staff', 'message', - ), - ), 'ticket.overlimit'=>array( 'group'=>'a.ticket.user', 'name'=>/* @trans */ 'Overlimit Notice', @@ -84,14 +76,6 @@ class EmailTemplateGroup { 'ticket', 'signature', 'response', 'staff', 'poster', 'recipient', ), ), - 'ticket.reply.bcc'=>array( - 'group'=>'a.ticket.user', - 'name'=>/* @trans */ 'Response/Reply Template (BCC)', - 'desc'=>/* @trans */ 'Template used on ticket response/reply', - 'context' => array( - 'ticket', 'signature', 'response', 'staff', 'poster', 'recipient', - ), - ), 'ticket.activity.notice'=>array( 'group'=>'a.ticket.user', 'name'=>/* @trans */ 'New Activity Notice', @@ -100,14 +84,6 @@ class EmailTemplateGroup { 'ticket', 'signature', 'message', 'poster', 'recipient', ), ), - 'ticket.activity.notice.bcc'=>array( - 'group'=>'a.ticket.user', - 'name'=>/* @trans */ 'New Activity Notice (BCC)', - 'desc'=>/* @trans */ 'Template used to notify BCCd collaborators on ticket activity', - 'context' => array( - 'ticket', 'signature', 'message', 'poster', 'recipient', - ), - ), 'ticket.alert'=>array( 'group'=>'b.ticket.staff', 'name'=>/* @trans */ 'New Ticket Alert', @@ -333,10 +309,6 @@ class EmailTemplateGroup { return $this->getMsgTemplate('ticket.notice'); } - function getNewTicketNoticeBCCMsgTemplate() { - return $this->getMsgTemplate('ticket.notice.bcc'); - } - function getNewMessageAutorepMsgTemplate() { return $this->getMsgTemplate('message.autoresp'); } @@ -353,18 +325,10 @@ class EmailTemplateGroup { return $this->getMsgTemplate('ticket.reply'); } - function getReplyBCCMsgTemplate() { - return $this->getMsgTemplate('ticket.reply.bcc'); - } - function getActivityNoticeMsgTemplate() { return $this->getMsgTemplate('ticket.activity.notice'); } - function getActivityNoticeBCCMsgTemplate() { - return $this->getMsgTemplate('ticket.activity.notice.bcc'); - } - function getOverlimitMsgTemplate() { return $this->getMsgTemplate('ticket.overlimit'); } diff --git a/include/class.thread.php b/include/class.thread.php index 034eb35054e227351dcc03dcd8cfff651a925ea8..9ce4fa5169486b392634733caacbc35e3fa6a457 100644 --- a/include/class.thread.php +++ b/include/class.thread.php @@ -240,18 +240,6 @@ implements Searchable { )); } - if($vars['recipientType']) { - $combo = array_combine($vars['uid'], $vars['recipientType']); - foreach ($combo as $id => $type) { - $collab = Collaborator::lookup($id); - if(get_class($collab) == 'Collaborator') { - $type == 'Cc' ? $collab->setFlag(Collaborator::FLAG_CC, true) : - $collab->setFlag(Collaborator::FLAG_CC, false); - $collab->save(); - } - } - } - unset($this->ht['active_collaborators']); $this->_collaborators = null; @@ -366,9 +354,6 @@ implements Searchable { } $entries->filter($visibility); - - if ($type['hideBCC']) - $entries->exclude(array('flags__hasbit' => ThreadEntry::FLAG_REPLY_BCC)); } if ($options['sort'] && !strcasecmp($options['sort'], 'DESC')) @@ -457,7 +442,7 @@ implements Searchable { $body = $mailinfo['message']; - // extra handling for determining Cc and Bcc collabs + // extra handling for determining Cc collabs if ($mailinfo['email']) { $staffSenderId = Staff::getIdByEmail($mailinfo['email']); @@ -474,8 +459,6 @@ implements Searchable { if ($collaborator && ($collaborator->isCc())) $vars['thread-type'] = 'M'; - else - $vars['thread-type'] = 'N'; } } } @@ -765,8 +748,6 @@ implements TemplateVariable { const FLAG_SYSTEM = 0x0080; // Entry is a system note. const FLAG_REPLY_ALL = 0x00100; // Agent response, reply all const FLAG_REPLY_USER = 0x00200; // Agent response, reply to User - const FLAG_REPLY_COLLAB = 0x00400; // Agent response, reply to Collaborators - const FLAG_REPLY_BCC = 0x00800; // Agent response, reply to BCC const PERM_EDIT = 'thread.edit'; @@ -790,7 +771,6 @@ implements TemplateVariable { 'M' => 'message', 'R' => 'response', 'N' => 'note', - 'B' => 'bccmessage', ); function getTypeName() { @@ -1492,14 +1472,6 @@ implements TemplateVariable { case 'reply-user': return $entry->flags |= ThreadEntry::FLAG_REPLY_USER; break; - - case 'reply-collab': - return $entry->flags |= ThreadEntry::FLAG_REPLY_COLLAB; - break; - - case 'reply-bcc': - return $entry->flags |= ThreadEntry::FLAG_REPLY_BCC; - break; } } @@ -1566,12 +1538,6 @@ implements TemplateVariable { $recipients['cc'] = $cc; } - //Bcc Collaborators - if($vars['bccs'] && Ticket::checkReply('bcc', $vars['emailreply'])) { - $bcc = Collaborator::getCollabList($vars['bccs']); - $recipients['bcc'] = $bcc; - } - if ($vars['emailreply'] != '0' && $recipients) $entry->recipients = json_encode($recipients); diff --git a/include/class.thread_actions.php b/include/class.thread_actions.php index 95d116d085a05a2c5189b18637f626bb92002ee5..26b16d08b6ba3b43935ddd391b98c0c015edc59b 100644 --- a/include/class.thread_actions.php +++ b/include/class.thread_actions.php @@ -53,7 +53,7 @@ class TEA_ShowEmailRecipients extends ThreadEntryAction { $this->entry->getEmailHeader(), true); $recipients = array(); - foreach (array('To', 'TO', 'Cc', 'CC', 'Bcc', 'BCC') as $k) { + foreach (array('To', 'TO', 'Cc', 'CC') as $k) { if (isset($hdr[$k]) && $hdr[$k] && ($addresses=Mail_Parse::parseAddressList($hdr[$k]))) { foreach ($addresses as $addr) { diff --git a/include/class.ticket.php b/include/class.ticket.php index fe669668d6fa58b58a39f42ea012ef15324c6d9b..aac5be02ae07e4fa723f5046d9dcf144135f64d5 100644 --- a/include/class.ticket.php +++ b/include/class.ticket.php @@ -830,34 +830,15 @@ implements RestrictedAccess, Threadable, Searchable { } //UserList of recipients (owner + collaborators) - function getRecipients($excludeBcc=false) { - if ($excludeBcc && isset($this->recipients)) { - $list = new UserList(); - - if ($collabs = $this->getThread()->getActiveCollaborators()) { - $list->add($this->getOwner()); - foreach ($collabs as $c) { - if (get_class($c) == 'Collaborator' && !$c->isCc()) //skip bcc - continue; - else - $list->add($c); - } - } - - $this->recipients = $list; - } - //I think we need to rebuild each time since it - //would be incomplete if called after an exclude bcc call - else { - $list = new UserList(); - $list->add($this->getOwner()); - if ($collabs = $this->getThread()->getActiveCollaborators()) { - foreach ($collabs as $c) { - $list->add($c); - } + function getRecipients() { + $list = new UserList(); + $list->add($this->getOwner()); + if ($collabs = $this->getThread()->getActiveCollaborators()) { + foreach ($collabs as $c) { + $list->add($c); } - $this->recipients = $list; - } + } + $this->recipients = $list; return $this->recipients; } @@ -1387,13 +1368,10 @@ implements RestrictedAccess, Threadable, Searchable { } function checkReply($userType, $replyType) { - if ($userType == 'cc' && ($replyType == 'reply-all' || $replyType == 'reply-collab')) + if ($userType == 'cc' && $replyType == 'reply-all') return true; - if ($userType == 'bcc' && ($replyType == 'reply-all' || $replyType == 'reply-bcc')) - return true; - - if ($userType == 'user' && ($replyType == 'reply-all' || $replyType == 'reply-user' || $replyType == 'reply-collab')) + if ($userType == 'user' && ($replyType == 'reply-all' || $replyType == 'reply-user')) return true; return false; @@ -1596,7 +1574,6 @@ implements RestrictedAccess, Threadable, Searchable { || !($dept=$this->getDept()) || !($tpl=$dept->getTemplate()) || !($msg=$tpl->getActivityNoticeMsgTemplate()) - || !($bccmsg=$tpl->getActivityNoticeBCCMsgTemplate()) || !($email=$dept->getEmail()) ) { return; @@ -1612,13 +1589,6 @@ implements RestrictedAccess, Threadable, Searchable { } } - if($vars['bccs']) { - foreach ($vars['bccs'] as $bcc) { - $collab = Collaborator::getIdByUserId($bcc, $this->getThread()->getId()); - $recipients[] = Collaborator::lookup($collab); - } - } - $vars = array_merge($vars, array( 'message' => (string) $entry, 'poster' => $poster ?: _S('A collaborator'), @@ -1626,7 +1596,6 @@ implements RestrictedAccess, Threadable, Searchable { ); $msg = $this->replaceVars($msg->asArray(), $vars); - $bccmsg = $this->replaceVars($bccmsg->asArray(), $vars); $attachments = $cfg->emailAttachments()?$entry->getAttachments():array(); $options = array('thread' => $entry); @@ -1643,29 +1612,14 @@ implements RestrictedAccess, Threadable, Searchable { $collaborators = array(); $collabsCc = array(); - $collabsBcc = array(); foreach ($recipients as $recipient) { if(get_class($recipient) == 'Collaborator') { - if ($recipient->isCc()) { + if ($recipient->isCc()) $collabsCc[] = $recipient->getEmail()->address; - } - else - $collabsBcc[] = $recipient; } - if(get_class($recipient) == 'TicketOwner') { + if(get_class($recipient) == 'TicketOwner') $owner = $recipient; - } - } - - //send bcc messages seperately for privacy - if ($collabsBcc) { - foreach ($collabsBcc as $recipient) { - $notice = $this->replaceVars($bccmsg, array('recipient' => $recipient)); - if ($posterEmail != $recipient->getEmail()->address) - $email->send($recipient, $notice['subj'], $notice['body'], $attachments, - $options); - } } foreach ($collabsCc as $cc) { @@ -2206,7 +2160,7 @@ implements RestrictedAccess, Threadable, Searchable { function replaceVars($input, $vars = array()) { global $ost; - $recipients = $this->getRecipients(true); + $recipients = $this->getRecipients(); $vars = array_merge($vars, array('ticket' => $this)); return $ost->replaceTemplateVariables($input, $vars); @@ -2664,8 +2618,6 @@ implements RestrictedAccess, Threadable, Searchable { $isMsg = true; $c->setCc(); } - else - $c->setBcc(); } else { $c = Collaborator::lookup($existingCollab); @@ -2684,21 +2636,6 @@ implements RestrictedAccess, Threadable, Searchable { if ($vars['userId'] == $this->user_id) $isMsg = true; - //lookup user by userId. if they are bcc in thread, post internal note - if($collabs = $this->getRecipients()) { - foreach ($collabs as $collab) { - if(get_class($collab) == 'Collaborator' && $collab->user_id == $vars['userId'] && !$collab->isCc()) { - $user = User::lookup($vars['userId']); - $vars['note'] = $vars['message']; - - //post internal note - if (!$isMsg) { - return $this->postNote($vars,$errors, $user, true); - } - } - } - } - if (!($message = $this->getThread()->addMessage($vars, $errors))) return null; @@ -2916,14 +2853,6 @@ implements RestrictedAccess, Threadable, Searchable { $c2->setCc(); } } - if (isset($vars['bccs'])) { - foreach ($vars['bccs'] as $uid) { - $user = User::lookup($uid); - if (!in_array($uid, $collabIds)) - if (($c2=$ticket->getThread()->addCollaborator($user,array(), $errors))) - $c2->setBcc(); - } - } if (!$vars['poster'] && $thisstaff) $vars['poster'] = $thisstaff; @@ -3019,22 +2948,6 @@ implements RestrictedAccess, Threadable, Searchable { $email->send($user, $msg['subj'], $msg['body'], $attachments, $options, $collabsCc); - //Bcc Collaborators - if ($vars['bccs'] - && (Ticket::checkReply('bcc', $vars['emailreply'])) - && ($bcctpl = $dept->getTemplate()) - && ($bccmsg=$bcctpl->getReplyBCCMsgTemplate())) { - foreach ($vars['bccs'] as $uid) { - if (!($recipient = User::lookup($uid))) - continue; - - $extraVars = UsersName::getNameFormats($recipient, 'recipient'); - $extraVars = array_merge($extraVars, array('recipient' => $user)); - $msg = $this->replaceVars($bccmsg->asArray(), $variables + $extraVars); - - $email->send($recipient, $msg['subj'], $msg['body'], $attachments, $options); - } - } } return $response; @@ -4108,7 +4021,6 @@ implements RestrictedAccess, Threadable, Searchable { return false; $collabsCc = array(); - $collabsBcc = array(); if (isset($vars['ccs'])) { foreach ($vars['ccs'] as $uid) { $ccuser = User::lookup($uid); @@ -4123,19 +4035,6 @@ implements RestrictedAccess, Threadable, Searchable { $collabsCc['cc'] = $collabsCc; } - if (isset($vars['bccs'])) { - foreach ($vars['bccs'] as $uid) { - $bccuser = User::lookup($uid); - - if ($bccuser && !$existing = Collaborator::getIdByUserId($bccuser->getId(), $ticket->getThreadId())) { - $collabsBcc[] = $bccuser; - - if (($c2=$ticket->getThread()->addCollaborator($bccuser,array(), $errors))) - $c2->setBcc(); - } - } - } - $vars['msgId']=$ticket->getLastMsgId(); // Effective role for the department @@ -4213,26 +4112,6 @@ implements RestrictedAccess, Threadable, Searchable { elseif (Ticket::checkReply('user', $vars['emailreply'])) $email->send($ticket->getOwner(), $msg['subj'], $msg['body'], $attachments, $options); - - if ($collabsBcc && Ticket::checkReply('bcc', $vars['emailreply'])) { - foreach ($collabsBcc as $recipient) { - if (($tpl=$dept->getTemplate()) - && ($bccmsg=$tpl->getNewTicketNoticeBCCMsgTemplate()) - && ($email=$dept->getEmail()) - ) - $extraVars = UsersName::getNameFormats($recipient, 'recipient'); - $extraVars = array_merge($extraVars, array( - 'message' => $message, - 'signature' => $signature, - 'response' => ($response) ? $response->getBody() : '', - 'recipient' => $ticket->getOwner())); - $bccmsg = $ticket->replaceVars($bccmsg->asArray(), $extraVars); - - $email->send($recipient, $bccmsg['subj'], $bccmsg['body'], $attachments, - $options); - } - } - } return $ticket; } diff --git a/include/client/templates/thread-entry.tmpl.php b/include/client/templates/thread-entry.tmpl.php index e49b3b0389bf1c9d2f7c330ebac9039b536c0fc9..d2dead396590a155ef07481af686f54280de0db3 100644 --- a/include/client/templates/thread-entry.tmpl.php +++ b/include/client/templates/thread-entry.tmpl.php @@ -11,16 +11,11 @@ if ($cfg->isAvatarsEnabled() && $user) $avatar = $user->getAvatar(); ?> <?php -$type = $entryTypes[$entry->type]; -if ($type == 'note') { - $type = 'bccmessage'; - $entry->type = 'B'; -} -?> - + $type = $entryTypes[$entry->type]; + ?> <div class="thread-entry <?php echo $type; ?> <?php if ($avatar) echo 'avatar'; ?>"> <?php if ($avatar) { ?> - <span class="<?php echo ($entry->type == 'M' || $entry->type == 'B') ? 'pull-left' : 'pull-right'; ?> avatar"> + <span class="<?php echo ($entry->type == 'M') ? 'pull-left' : 'pull-right'; ?> avatar"> <?php echo $avatar; ?> </span> <?php } ?> diff --git a/include/client/view.inc.php b/include/client/view.inc.php index 3ff95cedafb6ea014b5381ede363f710736d5ce6..59c3baff9d4e559422c6ebf5ab494fbd378d65af 100644 --- a/include/client/view.inc.php +++ b/include/client/view.inc.php @@ -38,14 +38,6 @@ if ($thisclient && $thisclient->isGuest() </b> <small>#<?php echo $ticket->getNumber(); ?></small> <div class="pull-right"> - <?php - if($collabs = $ticket->getRecipients()) { - foreach ($collabs as $collab) { - if(get_class($collab) == 'Collaborator' && $collab->user_id == $thisclient->getId() && !$collab->isCc()) { - $viewThreads = true; - } - } - } ?> <a class="action-button" href="tickets.php?a=print&id=<?php echo $ticket->getId(); ?>"><i class="icon-print"></i> <?php echo __('Print'); ?></a> @@ -147,7 +139,7 @@ echo $v; $email = $thisclient->getUserName(); $clientId = TicketUser::lookupByEmail($email)->getId(); - $ticket->getThread()->render(array('M', 'R', 'user_id' => $clientId, 'hideBCC' => !$viewThreads), array( + $ticket->getThread()->render(array('M', 'R', 'user_id' => $clientId), array( 'mode' => Thread::MODE_CLIENT, 'html-id' => 'ticketThread') ); diff --git a/include/i18n/en_US/help/tips/tickets.queue.yaml b/include/i18n/en_US/help/tips/tickets.queue.yaml index 2b799b166dadccdf2a354a9614058881002fb3ea..b59b1ae6215c2148a6921de1f829a2037747a760 100644 --- a/include/i18n/en_US/help/tips/tickets.queue.yaml +++ b/include/i18n/en_US/help/tips/tickets.queue.yaml @@ -81,12 +81,8 @@ reply_types: title: Reply Types content: > <b>Reply All:</b> - This reply is sent to the User and the Collaborators (CC and BCC) you choose to include.</br> + This reply is sent to the User and the Collaborators you choose to include.</br> <b>Reply to User:</b> This reply is sent to the User only, no Collaborators.</br> - <b>Reply to CC + User:</b> - This reply is sent to only the User and CC'd Collaborators</br> - <b>Reply to BCC:</b> - This is sent only to the BCC'd Collaborators. <b>Do Not Email Reply:</b> No email alerts are sent out, however, the Agent response is visible to <b>ALL</b> Users upon viewing the Ticket. diff --git a/include/i18n/en_US/templates/email/ticket.activity.notice.bcc.yaml b/include/i18n/en_US/templates/email/ticket.activity.notice.bcc.yaml deleted file mode 100644 index c6553869044b8901cedbfe939a38b02a212b217c..0000000000000000000000000000000000000000 --- a/include/i18n/en_US/templates/email/ticket.activity.notice.bcc.yaml +++ /dev/null @@ -1,38 +0,0 @@ -# -# Email template: ticket.activity.notice.bcc.yaml -# -# Notice sent to BCCd collaborators on ticket activity e.g reply or message -# ---- -notes: | - Notice sent to BCCd collaborators on ticket activity e.g reply or message. - -subject: | - Re: %{ticket.subject} [#%{ticket.number}] -body: | - <h3><strong>Dear %{recipient.name.first},</strong></h3> - <div> - <em>%{poster.name}</em> just logged a message to a ticket in which you participate. - </div> - <br> - %{message} - <br> - <br> - Ticket recipients can be seen below where the User is first and any other - names are ticket Collaborators. - <br> - <br> - Recipients: - <br> - %{ticket.recipients} - <br> - <br> - <hr> - <div style="color: rgb(127, 127, 127); font-size: small; text-align: center;"> - <em>You're getting this email because you have been BCC'd - on ticket <a href="%{recipient.ticket_link}" style="color: rgb(84, 141, 212);" - >#%{ticket.number}</a> This means that only agents can see your responses to - this ticket. To participate, simply reply to this email - or <a href="%{recipient.ticket_link}" style="color: rgb(84, 141, 212);" - >click here</a> for a complete archive of the ticket thread.</em> - </div> diff --git a/include/i18n/en_US/templates/email/ticket.notice.bcc.yaml b/include/i18n/en_US/templates/email/ticket.notice.bcc.yaml deleted file mode 100644 index b0b1799f6655f3f9e6823e8fafbbfdf82a9354ba..0000000000000000000000000000000000000000 --- a/include/i18n/en_US/templates/email/ticket.notice.bcc.yaml +++ /dev/null @@ -1,52 +0,0 @@ -# -# Email template: ticket.notice.bcc.yaml -# -# Sent to a BCC'd user when a staff member creates a ticket on another user's behalf. -# ---- -notes: | - Sent to a BCC'd user when a staff member creates a ticket on another user's behalf. - -subject: | - %{ticket.subject} [#%{ticket.number}] -body: | - <h3><strong>Dear %{recipient.name.first},</strong></h3> - Our customer care team has created a ticket, <a - href="%{recipient.ticket_link}">#%{ticket.number}</a> on behalf of %{ticket.name}, with - the following details and summary: - <br> - <br> - Topic: <strong>%{ticket.topic.name}</strong> - <br> - Subject: <strong>%{ticket.subject}</strong> - <br> - <br> - %{message} - <br> - <br> - You have been BCC'd on this ticket. This means that only agents can see your - responses to this ticket. - <br> - <br> - You can <a href="%{recipient.ticket_link}">view this - ticket's progress online</a>. - <br> - <br> - Ticket recipients can be seen below where the User is first and any other - names are ticket Collaborators. - <br> - <br> - Recipients: - <br> - %{ticket.recipients} - <br> - <br> - <div style="color: rgb(127, 127, 127);"> - Your %{company.name} Team,<br> - %{signature}</div> - <hr> - <div style="color: rgb(127, 127, 127); font-size: small; "><em>If you - wish to provide additional comments or information regarding the issue, - please reply to this email or <a href="%{recipient.ticket_link}"><span - style="color: rgb(84, 141, 212);" >login to your account</span></a> for - a complete archive of your support requests.</em></div> diff --git a/include/i18n/en_US/templates/email/ticket.reply.bcc.yaml b/include/i18n/en_US/templates/email/ticket.reply.bcc.yaml deleted file mode 100644 index 4f18c78075f21551032416507bcd8ffbf42bc27e..0000000000000000000000000000000000000000 --- a/include/i18n/en_US/templates/email/ticket.reply.bcc.yaml +++ /dev/null @@ -1,39 +0,0 @@ -# -# Email template: ticket.reply.bcc.yaml -# -# Sent to BCC'd collaborators when a staff member makes a reply to a ticket. -# Replies are only generated by staff members. -# ---- -notes: | - Sent to BCC'd collaborators when a staff member makes a reply to their ticket. - Replies are only generated by staff members. - -subject: | - Re: %{ticket.subject} [#%{ticket.number}] -body: | - <h3><strong>Dear %{recipient.name.first},</strong></h3> - %{response} - <br> - <br> - Ticket recipients can be seen below where the User is first and any other - names are ticket Collaborators. - <br> - <br> - Recipients: - <br> - %{ticket.recipients} - <br> - <br> - <div style="color: rgb(127, 127, 127);"> - Your %{company.name} Team,<br> - %{signature} - </div> - <hr> - <div style="color: rgb(127, 127, 127); font-size: small; text-align: center;" - ><em>You are receiving this message because you have been BCC'd on a ticket. - This means that only agents can see your responses to this ticket. - To participate in this ticket, please reply to this email or - <a href="%{recipient.ticket_link}" style="color: rgb(84, 141, 212);" >login - to your account</a> for a complete archive of all your support requests - and responses.</em></div> diff --git a/include/staff/templates/collaborators.tmpl.php b/include/staff/templates/collaborators.tmpl.php index 1a50164f1f78421050098dfef38f89de93d9cf0b..d25d10a83fb72bd3c84797137503ac74d89f8f9c 100644 --- a/include/staff/templates/collaborators.tmpl.php +++ b/include/staff/templates/collaborators.tmpl.php @@ -20,7 +20,6 @@ if(($users=$thread->getCollaborators())) {?> foreach($users as $user) { $checked = $user->isActive() ? 'checked="checked"' : ''; $cc = $user->isCc() ? 'selected="selected"' : ''; - $bcc = !$user->isCc() ? 'selected="selected"' : ''; echo sprintf('<tr> <td> @@ -44,15 +43,6 @@ if(($users=$thread->getCollaborators())) {?> Format::htmlchars($user->getName()), $user->getEmail()); - if ($thread->object_type == 'T') { - echo sprintf('<td> - <select name="recipientType[]"> - <option value="Cc" %s>Cc</option> - <option value="Bcc" %s>Bcc</option> - </select> - </td>', $cc, $bcc); - } - echo sprintf('<td width="10"> <input type="hidden" name="del[]" id="d%d" value=""> <a class="remove" href="#d%d"> diff --git a/include/staff/templates/thread-entry.tmpl.php b/include/staff/templates/thread-entry.tmpl.php index f32553f186fc5deb76785b5c1ca38825c719ba57..3407e534b966dd6d9a588e45367e70a3731c789f 100644 --- a/include/staff/templates/thread-entry.tmpl.php +++ b/include/staff/templates/thread-entry.tmpl.php @@ -7,17 +7,13 @@ if ($thisstaff && !strcasecmp($thisstaff->datetime_format, 'relative')) { }; } -$entryTypes = array('M'=>'message', 'R'=>'response', 'N'=>'note','B' => 'bccmessage'); +$entryTypes = array('M'=>'message', 'R'=>'response', 'N'=>'note'); $user = $entry->getUser() ?: $entry->getStaff(); $name = $user ? $user->getName() : $entry->poster; $avatar = ''; if ($user && $cfg->isAvatarsEnabled()) $avatar = $user->getAvatar(); -if ($entry->flags & ThreadEntry::FLAG_COLLABORATOR && $entry->type == 'N') { - $entryTypes[$entry->type] = 'bccmessage'; - $entry->type = 'B'; -} ?> <div class="thread-entry <?php echo $entry->isSystem() ? 'system' : $entryTypes[$entry->type]; ?> <?php if ($avatar) echo 'avatar'; ?>"> @@ -63,15 +59,6 @@ if ($entry->flags & ThreadEntry::FLAG_COLLABORATOR && $entry->type == 'N') { <?php } if ($entry->flags & ThreadEntry::FLAG_REPLY_USER) { ?> <span class="label label-bare"><?php echo __('Reply to User'); ?></span> -<?php } - if ($entry->flags & ThreadEntry::FLAG_REPLY_COLLAB) { ?> - <span class="label label-bare"><?php echo __('Reply to Collaborator'); ?></span> -<?php } - if ($entry->flags & ThreadEntry::FLAG_REPLY_BCC) { ?> - <span class="label label-bare"><?php echo __('Reply to BCC'); ?></span> -<?php } - if ($entry->flags & ThreadEntry::FLAG_COLLABORATOR && $entry->type == 'B') { ?> - <span class="label label-bare"><?php echo __('Bcc Collaborator'); ?></span> <?php } if ($entry->flags & ThreadEntry::FLAG_COLLABORATOR && $entry->type == 'M') { ?> <span class="label label-bare"><?php echo __('Cc Collaborator'); ?></span> diff --git a/include/staff/ticket-open.inc.php b/include/staff/ticket-open.inc.php index dc03024d9e47592630b606a3538e9f22173f383c..daaa18a38ec823c22ca406e3e9b00161caa25e50 100644 --- a/include/staff/ticket-open.inc.php +++ b/include/staff/ticket-open.inc.php @@ -162,41 +162,18 @@ if ($_POST) <br/><span class="error"><?php echo $errors['ccs']; ?></span> </td> </tr> - <tr id="bccRow"> - <td width="160"><?php echo __('Bcc'); ?>:</td> + <tr class="no_border"> <td> - <span> - <select class="collabSelections" name="bccs[]" id="bcc_users_open" multiple="multiple" - data-placeholder="<?php echo __('Select Contacts'); ?>"> + <?php echo __('Ticket Notice');?>: + </td> + <td> + <select id="emailreply" name="emailreply"> + <option value="reply-all"><?php echo __('Alert All'); ?></option> + <option value="reply-user"><?php echo __('Alert to User'); ?></option> + <option value="0">— <?php echo __('Do Not Send Alert'); ?> —</option> </select> - </span> - - <a class="inline button" style="overflow:inherit" href="#" - onclick="javascript: - $.userLookup('ajax.php/users/lookup/form', function (user) { - var newUser = new Option(user.name, user.id, true, true); - return $("#bcc_users_open").append(newUser).trigger('change'); - }); - "><i class="icon-plus"></i> <?php echo __('Add New'); ?></a> - - <br/><span class="error"><?php echo $errors['bccs']; ?></span> - </td> - </tr> - <tr class="no_border"> - <td> - <?php echo __('Ticket Notice');?>: - </td> - <td> - <select id="emailreply" name="emailreply"> - <option value="reply-all"><?php echo __('Alert All'); ?></option> - <option value="reply-user"><?php echo __('Alert to User'); ?></option> - <option value="reply-collab" <?php echo 'selected="selected"'; ?>><?php echo __('Alert to CC + User'); ?></option> - <option value="reply-bcc"><?php echo __('Alert to BCC'); ?></option> - <option value="reply-bcc"><?php echo __('Alert to BCC'); ?></option> - <option value="0">— <?php echo __('Do Not Send Alert'); ?> —</option> - </select> - </td> - </tr> + </td> + </tr> </table> </td> </tr> diff --git a/include/staff/ticket-view.inc.php b/include/staff/ticket-view.inc.php index 5a1a90e2ed1e9240d738cf353cdb53e378d62f86..65636d0fbb8aac188a2b941c742b6edac2f737f2 100644 --- a/include/staff/ticket-view.inc.php +++ b/include/staff/ticket-view.inc.php @@ -752,18 +752,14 @@ if ($errors['err'] && isset($_POST['a'])) { foreach ($collabs as $collab) { if ($collab->getUserId() == $lastUser->getId() && $collab->isCc()) $ccUser = true; - elseif ($collab->getUserId() == $lastUser->getId() && !$collab->isCc()) - $bccUser = true; } } - if ($ticketUser || $ccUser || $bccUser) + if ($ticketUser || $ccUser) $emailReply = true; ?> <select id="emailreply" name="emailreply"> <option value="reply-all"><?php echo __('Reply All'); ?></option> <option value="reply-user"><?php echo __('Reply to User'); ?></option> - <option value="reply-collab" <?php echo ($ccUser || $ticketUser ) ? 'selected="selected"' : ''; ?>><?php echo __('Reply to CC + User'); ?></option> - <option value="reply-bcc" <?php echo $bccUser || $errors['bccs'] ? 'selected="selected"' : ''; ?>><?php echo __('Reply to BCC'); ?></option> <option value="0" <?php echo !$emailReply ? 'selected="selected"' : ''; ?> >— <?php echo __('Do Not Email Reply'); ?> —</option> </select> @@ -786,13 +782,9 @@ if ($errors['err'] && isset($_POST['a'])) { </tr> <?php $collaborators = $ticket->getThread()->getCollaborators(); $cc_cids = array(); - $bcc_cids = array(); foreach ($collaborators as $c) { if ($c->flags & Collaborator::FLAG_CC && $c->flags & Collaborator::FLAG_ACTIVE) $cc_cids[] = $c->user_id; - elseif (!($c->flags & Collaborator::FLAG_CC) && $c->flags & Collaborator::FLAG_ACTIVE) { - $bcc_cids[] = $c->user_id; - } } ?> <tr id="cc-row"> @@ -803,7 +795,7 @@ if ($errors['err'] && isset($_POST['a'])) { data-placeholder="<?php echo __('Select Contacts'); ?>"> <?php foreach ($cc_cids as $u) { - if($u != $ticket->user_id && !in_array($u, $bcc_cids)) { + if($u != $ticket->user_id) { ?> <option value="<?php echo $u; ?>" <?php if (in_array($u, $cc_cids)) @@ -825,36 +817,6 @@ if ($errors['err'] && isset($_POST['a'])) { <br/><span class="error"><?php echo $errors['ccs']; ?></span> </td> </tr> - <tr id="bcc-row"> - <td width="160" style="padding-left:20px;"><?php echo __('Bcc'); ?></td> - <td> - <span> - <select class="collabSelections" name="bccs[]" id="bcc_users" multiple="multiple" - data-placeholder="<?php echo __('Select Contacts'); ?>"> - <?php - foreach ($bcc_cids as $u) { - if($u != $ticket->user_id && !in_array($u, $cc_cids)) { - ?> - <option value="<?php echo $u; ?>" <?php - if (in_array($u, $bcc_cids)) - echo 'selected="selected"'; ?>><?php echo User::lookup($u); ?> - </option> - <?php } } ?> - ?> - </select> - </span> - - <a class="inline button" style="overflow:inherit" href="#" - onclick="javascript: - $.userLookup('ajax.php/users/lookup/form', function (user) { - var newUser = new Option(user.name, user.id, true, true); - return $("#bcc_users").append(newUser).trigger('change'); - }); - "><i class="icon-plus"></i> <?php echo __('Add New'); ?></a> - - <br/><span class="error"><?php echo $errors['bccs']; ?></span> - </td> - </tr> </tbody> <?php } ?> @@ -1231,27 +1193,14 @@ $(function() { case "reply-all": $('#user-row').show(); $('#cc-row').show(); - $('#bcc-row').show(); break; case "reply-user": $('#user-row').show(); $('#cc-row').hide(); - $('#bcc-row').hide(); - break; - case "reply-collab": - $('#user-row').show(); - $('#cc-row').show(); - $('#bcc-row').hide(); - break; - case "reply-bcc": - $('#user-row').hide(); - $('#cc-row').hide(); - $('#bcc-row').show(); break; default: $('#user-row').show(); $('#cc-row').show(); - $('#bcc-row').hide(); break; } } diff --git a/include/upgrader/streams/core/ad9d0a5f-0ca85857.patch.sql b/include/upgrader/streams/core/ad9d0a5f-0ca85857.patch.sql index ee61ea4e15c9a0365f55770ce2901fc73339622a..d3563164b5f092a2168efe3246a281b34e507b21 100644 --- a/include/upgrader/streams/core/ad9d0a5f-0ca85857.patch.sql +++ b/include/upgrader/streams/core/ad9d0a5f-0ca85857.patch.sql @@ -8,8 +8,7 @@ * an email was involved (agent or user generated) * * It also adds a flags field to the thread_collaborator table which - * tracks whether a collaborator is a CC or BCC collaborator as well as - * storing whether or not the collaborator is active. As a result, we can + * tracks whether or not the collaborator is active. As a result, we can * remove the isactive field */ diff --git a/scp/css/scp.css b/scp/css/scp.css index bfd36840bf5c32c52da2fb88794f577851c7f2cb..47f0e655fef9d66dbe1a353d0aa977c7baafe618 100644 --- a/scp/css/scp.css +++ b/scp/css/scp.css @@ -1588,27 +1588,6 @@ img.avatar { position: relative; } -.thread-entry.bccmessage .header { - background:#DDFDAC; -} - -.thread-entry.avatar.bccmessage .header:before { - top: 7px; - left: -8px; - right: initial; - border-left: none; - border-right: 8px solid #CCC; -} - -.thread-entry.avatar.bccmessage .header:after { - top: 7px; - left: -8px; - right: initial; - border-left: none; - border-right: 7px solid #DDFDAC; - margin-left: 1px; -} - .thread-entry.message .header { background:#C3D9FF; } diff --git a/scp/tickets.php b/scp/tickets.php index 8698fa0f407882ad9fb6d18f98ef1469f56ba034..95720d202fe230a8e8ca1019c5fd0358adb57891 100644 --- a/scp/tickets.php +++ b/scp/tickets.php @@ -152,12 +152,6 @@ if($_POST && !$errors): if(!$vars['response']) $errors['response']=__('Response required'); - //do not post a thread entry if response intended for only bccs and there are no bccs - if (is_null($vars['bccs']) && $vars['emailreply'] == 'reply-bcc') { - $vars['emailreply'] = 'reply-bcc'; - $errors['bccs']=sprintf(__('Please add a %s'), 'BCC Recipient'); - } - if ($cfg->getLockTime()) { if (!$lock) { $errors['err'] = sprintf('%s %s', __('This action requires a lock.'), __('Please try again!')); @@ -385,19 +379,6 @@ if($_POST && !$errors): $errors['err'] = sprintf('%s %s', __('Unable to add collaborator.'), __('Please try again!')); } break; - case 'addbcc': - if (!$role->hasPerm(Ticket::PERM_EDIT)) { - $errors['err']=__('Permission Denied. You are not allowed to add collaborators'); - } elseif (!$_POST['user_id'] || !($user=User::lookup($_POST['user_id']))) { - $errors['err'] = __('Unknown user selected'); - } elseif ($c2 = $ticket->addCollaborator($user, array(), $errors)) { - $msg = sprintf(__('Collaborator %s added'), - Format::htmlchars($user->getName())); - } - else { - $errors['err'] = sprintf('%s %s', __('Unable to add collaborator.'), __('Please try again!')); - } - break; default: $errors['err']=__('You must select action to perform'); endswitch;