diff --git a/inc/common.class.php b/inc/common.class.php index db6a549cd..7f65de912 100644 --- a/inc/common.class.php +++ b/inc/common.class.php @@ -73,12 +73,6 @@ public static function setNotification($enable) { $CFG_GLPI['use_notifications'] = $enable ? '1' : '0'; } - public static function getGlpiVersion() { - return defined('GLPI_PREVER') - ? GLPI_PREVER - : GLPI_VERSION; - } - /** * Get Link Name * diff --git a/inc/targetticket.class.php b/inc/targetticket.class.php index 3f9e98887..d96992587 100644 --- a/inc/targetticket.class.php +++ b/inc/targetticket.class.php @@ -745,22 +745,13 @@ public function save(PluginFormcreatorFormAnswer $formanswer) { 'content' => $message, '_do_not_compute_takeintoaccount' => true ]; - if (class_exists(ITILFollowup::class)) { - // GLPI 9.4+ - $followUpInput += [ - 'items_id' => $ticketID, - 'itemtype' => Ticket::class, - ]; - $ticketFollowup = new ITILFollowup(); - $ticketFollowup->add($followUpInput); - } else { - // GLPI < 9.4 - $followUpInput += [ - 'tickets_id' => $ticketID, - ]; - $ticketFollowup = new TicketFollowup(); - $ticketFollowup->add($followUpInput); - } + // GLPI 9.4+ + $followUpInput += [ + 'items_id' => $ticketID, + 'itemtype' => Ticket::class, + ]; + $ticketFollowup = new ITILFollowup(); + $ticketFollowup->add($followUpInput); // Restore mail notification setting PluginFormcreatorCommon::setNotification($use_mailing);