diff --git a/include/ajax.thread.php b/include/ajax.thread.php index e1e8a26637f5b0c0fa9b45d945363e863aec1c7b..3a0c92e392c0b24951abf519b1639ec3a696143d 100644 --- a/include/ajax.thread.php +++ b/include/ajax.thread.php @@ -112,7 +112,7 @@ class ThreadAjaxAPI extends AjaxController { if ($user) { // FIXME: Refuse to add ticket owner?? if (($c=$thread->addCollaborator($user, - array('isactive'=>1), $errors))) { + array(), $errors))) { $info = array('msg' => sprintf(__('%s added as a collaborator'), Format::htmlchars($c->getName()))); $c->setCc(); diff --git a/include/class.collaborator.php b/include/class.collaborator.php index 4bd0e7cf8c4db2c1bb8fcf9e5659d765c7fdad0a..5081672213aebe6070d621d01772a897966b4915 100644 --- a/include/class.collaborator.php +++ b/include/class.collaborator.php @@ -196,7 +196,6 @@ implements EmailContact, ITicketUser { if ($errors) return false; $collab = static::create(array( - 'isactive' => isset($info['isactive']) ? $info['isactive'] : 0, 'thread_id' => $info['threadId'], 'user_id' => $info['userId'], )); diff --git a/include/class.thread.php b/include/class.thread.php index f101aef0d98d5d0baa16805da8ff680550d51bc6..eab798690b60242706a19e0bd9563f823e0e463f 100644 --- a/include/class.thread.php +++ b/include/class.thread.php @@ -202,7 +202,6 @@ implements Searchable { 'id__in' => $cids ))->update(array( 'updated' => SqlFunction::NOW(), - 'isactive' => 1, )); foreach ($vars['cid'] as $c) { @@ -225,7 +224,6 @@ implements Searchable { } $inactive->update(array( 'updated' => SqlFunction::NOW(), - 'isactive' => 0, )); } diff --git a/include/class.ticket.php b/include/class.ticket.php index e6c85da6bb15b99da181102cb2adb8a8e41a901c..4cdb6db1cdd345427e43d2022b73913f58d7d1bb 100644 --- a/include/class.ticket.php +++ b/include/class.ticket.php @@ -948,7 +948,6 @@ implements RestrictedAccess, Threadable, Searchable { 'id__in' => $cids ))->update(array( 'updated' => SqlFunction::NOW(), - 'isactive' => 1, )); $collab->save(); } @@ -959,7 +958,6 @@ implements RestrictedAccess, Threadable, Searchable { Q::not(array('id__in' => $cids)) ))->update(array( 'updated' => SqlFunction::NOW(), - 'isactive' => 0, )); } @@ -2349,7 +2347,7 @@ implements RestrictedAccess, Threadable, Searchable { else $user = User::lookup($vars['userId']); - $c = $this->getThread()->addCollaborator($user,array('isactive'=>1), $errors); + $c = $this->getThread()->addCollaborator($user,array(), $errors); foreach (array('To', 'TO', 'Cc', 'CC') as $k) { if ($user && isset($hdr[$k]) && $hdr[$k]) @@ -2607,7 +2605,7 @@ implements RestrictedAccess, Threadable, Searchable { foreach ($vars['ccs'] as $uid) { $user = User::lookup($uid); if (!in_array($uid, $collabIds)) - if (($c2=$ticket->getThread()->addCollaborator($user,array('isactive'=>1), $errors))) + if (($c2=$ticket->getThread()->addCollaborator($user,array(), $errors))) $c2->setCc(); } } @@ -2615,7 +2613,7 @@ implements RestrictedAccess, Threadable, Searchable { foreach ($vars['bccs'] as $uid) { $user = User::lookup($uid); if (!in_array($uid, $collabIds)) - if (($c2=$ticket->getThread()->addCollaborator($user,array('isactive'=>1), $errors))) + if (($c2=$ticket->getThread()->addCollaborator($user,array(), $errors))) $c2->setBcc(); } } @@ -3731,7 +3729,7 @@ implements RestrictedAccess, Threadable, Searchable { if ($ccuser && !$existing = Collaborator::getIdByUserId($ccuser->getId(), $ticket->getThreadId())) { $collabsCc[] = $ccuser->getEmail()->address; - if (($c2=$ticket->getThread()->addCollaborator($ccuser,array('isactive'=>1), $errors))) + if (($c2=$ticket->getThread()->addCollaborator($ccuser,array(), $errors))) $c2->setCc(); } } @@ -3745,7 +3743,7 @@ implements RestrictedAccess, Threadable, Searchable { if ($bccuser && !$existing = Collaborator::getIdByUserId($bccuser->getId(), $ticket->getThreadId())) { $collabsBcc[] = $bccuser; - if (($c2=$ticket->getThread()->addCollaborator($bccuser,array('isactive'=>1), $errors))) + if (($c2=$ticket->getThread()->addCollaborator($bccuser,array(), $errors))) $c2->setBcc(); } } diff --git a/include/upgrader/streams/core.sig b/include/upgrader/streams/core.sig index 891a53e7d2881a1f8a469df49bdd3de22c29a0e3..72ff8c4ba3e1939c399f5633dc1f30417781d329 100644 --- a/include/upgrader/streams/core.sig +++ b/include/upgrader/streams/core.sig @@ -1 +1 @@ -ad9d0a5f1bd9f83a4ecb3f590b334eac +0ca8585781bc6656f3ca008212554441 diff --git a/include/upgrader/streams/core/98ad7d55-b2ce8ba7.patch.sql b/include/upgrader/streams/core/ad9d0a5f-0ca85857.patch.sql similarity index 86% rename from include/upgrader/streams/core/98ad7d55-b2ce8ba7.patch.sql rename to include/upgrader/streams/core/ad9d0a5f-0ca85857.patch.sql index 3c10b87fd44ad6b414e9f87e3119e3ea7454e0f7..ee61ea4e15c9a0365f55770ce2901fc73339622a 100644 --- a/include/upgrader/streams/core/98ad7d55-b2ce8ba7.patch.sql +++ b/include/upgrader/streams/core/ad9d0a5f-0ca85857.patch.sql @@ -1,7 +1,7 @@ /** + * @signature 0ca8585781bc6656f3ca008212554441 * @version v1.11.0 - * @title Add recipients field/collaborator flags - * @signature b2ce8ba794a40ed5380d7cdf30bca233 + * @title Add recipients field and collaborator flags * * This patch adds a new field called recipients to the thread entry table * allowing agents to see a list of recipients for any thread entry where @@ -27,5 +27,5 @@ -- Finished with patch UPDATE `%TABLE_PREFIX%config` - SET `value` = 'b2ce8ba794a40ed5380d7cdf30bca233' + SET `value` = '0ca8585781bc6656f3ca008212554441' WHERE `key` = 'schema_signature' AND `namespace` = 'core'; diff --git a/scp/tasks.php b/scp/tasks.php index 23f83dba07351d5a8d1365599f2e9ccd27afab8e..8ba17864d9091d1710087b8e39c6daca2ac15ed5 100644 --- a/scp/tasks.php +++ b/scp/tasks.php @@ -117,7 +117,7 @@ if($_POST && !$errors): $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 = $task->addCollaborator($user, array('isactive'=>1), $errors)) { + } elseif ($c2 = $task->addCollaborator($user, array(), $errors)) { $c2->setFlag(Collaborator::FLAG_CC, true); $c2->save(); $msg = sprintf(__('Collaborator %s added'), diff --git a/scp/tickets.php b/scp/tickets.php index a79354e61e2fd5c71c64e75cfc9f21689a464622..d9cc0d52e48585e18d2a5dbbe201d629e75692fb 100644 --- a/scp/tickets.php +++ b/scp/tickets.php @@ -371,7 +371,7 @@ if($_POST && !$errors): $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('isactive'=>1), $errors)) { + } elseif ($c2 = $ticket->addCollaborator($user, array(), $errors)) { $c2->setFlag(Collaborator::FLAG_CC, true); $c2->save(); $msg = sprintf(__('Collaborator %s added'), @@ -386,7 +386,7 @@ if($_POST && !$errors): $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('isactive'=>1), $errors)) { + } elseif ($c2 = $ticket->addCollaborator($user, array(), $errors)) { $msg = sprintf(__('Collaborator %s added'), Format::htmlchars($user->getName())); }