Skip to content

Commit cdc5eb5

Browse files
committed
change use
1 parent 1eb987e commit cdc5eb5

File tree

1 file changed

+12
-14
lines changed

1 file changed

+12
-14
lines changed

inc/ticket.class.php

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -759,20 +759,18 @@ static function cloneAndLink($tickets_id) {
759759

760760
//add actors to the new ticket (without assign)
761761
//users
762-
$res = $DB->insert('glpi_tickets_user', [
763-
new QuerySubQuery([
764-
'SELECT' => [
765-
new QueryExpression("'' AS " . $DB::quoteName('id')),
766-
new QueryExpression($DB::quoteValue($newID) . " AS " . $DB::quoteName('tickets_id')),
767-
'users_id', 'type', 'use_notification', 'alternative_email'
768-
],
769-
'FROM' => 'glpi_tickets_users',
770-
'WHERE' => [
771-
'tickets_id' => $tickets_id,
772-
'type' => ['!=', 2]
773-
]
774-
])
775-
]);
762+
$res = $DB->insert('glpi_tickets_user', new QuerySubQuery([
763+
'SELECT' => [
764+
new QueryExpression("'' AS " . $DB::quoteName('id')),
765+
new QueryExpression($DB::quoteValue($newID) . " AS " . $DB::quoteName('tickets_id')),
766+
'users_id', 'type', 'use_notification', 'alternative_email'
767+
],
768+
'FROM' => 'glpi_tickets_users',
769+
'WHERE' => [
770+
'tickets_id' => $tickets_id,
771+
'type' => ['!=', 2]
772+
]
773+
]));
776774
if (!$res) {
777775
echo "{\"success\":false, \"message\":\"".__("Error : adding actors (user)", "escalade")."\"}";
778776
exit;

0 commit comments

Comments
 (0)