From cdc5eb58b27610ebf44239a43e7b3a79e56d820f Mon Sep 17 00:00:00 2001 From: Curtis Conard Date: Thu, 22 Jun 2023 16:24:51 -0400 Subject: [PATCH] change use --- inc/ticket.class.php | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/inc/ticket.class.php b/inc/ticket.class.php index 010f7076..ab34ded4 100644 --- a/inc/ticket.class.php +++ b/inc/ticket.class.php @@ -759,20 +759,18 @@ static function cloneAndLink($tickets_id) { //add actors to the new ticket (without assign) //users - $res = $DB->insert('glpi_tickets_user', [ - new QuerySubQuery([ - 'SELECT' => [ - new QueryExpression("'' AS " . $DB::quoteName('id')), - new QueryExpression($DB::quoteValue($newID) . " AS " . $DB::quoteName('tickets_id')), - 'users_id', 'type', 'use_notification', 'alternative_email' - ], - 'FROM' => 'glpi_tickets_users', - 'WHERE' => [ - 'tickets_id' => $tickets_id, - 'type' => ['!=', 2] - ] - ]) - ]); + $res = $DB->insert('glpi_tickets_user', new QuerySubQuery([ + 'SELECT' => [ + new QueryExpression("'' AS " . $DB::quoteName('id')), + new QueryExpression($DB::quoteValue($newID) . " AS " . $DB::quoteName('tickets_id')), + 'users_id', 'type', 'use_notification', 'alternative_email' + ], + 'FROM' => 'glpi_tickets_users', + 'WHERE' => [ + 'tickets_id' => $tickets_id, + 'type' => ['!=', 2] + ] + ])); if (!$res) { echo "{\"success\":false, \"message\":\"".__("Error : adding actors (user)", "escalade")."\"}"; exit;