Skip to content

Commit d9c9828

Browse files
committed
refactor: remove dead code
remove backward compatibility code with no longer supported versins of GLPI Signed-off-by: Thierry Bugier <[email protected]>
1 parent 2535f4a commit d9c9828

File tree

2 files changed

+7
-22
lines changed

2 files changed

+7
-22
lines changed

inc/common.class.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,6 @@ public static function setNotification($enable) {
7373
$CFG_GLPI['use_notifications'] = $enable ? '1' : '0';
7474
}
7575

76-
public static function getGlpiVersion() {
77-
return defined('GLPI_PREVER')
78-
? GLPI_PREVER
79-
: GLPI_VERSION;
80-
}
81-
8276
/**
8377
* Get Link Name
8478
*

inc/targetticket.class.php

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -745,22 +745,13 @@ public function save(PluginFormcreatorFormAnswer $formanswer) {
745745
'content' => $message,
746746
'_do_not_compute_takeintoaccount' => true
747747
];
748-
if (class_exists(ITILFollowup::class)) {
749-
// GLPI 9.4+
750-
$followUpInput += [
751-
'items_id' => $ticketID,
752-
'itemtype' => Ticket::class,
753-
];
754-
$ticketFollowup = new ITILFollowup();
755-
$ticketFollowup->add($followUpInput);
756-
} else {
757-
// GLPI < 9.4
758-
$followUpInput += [
759-
'tickets_id' => $ticketID,
760-
];
761-
$ticketFollowup = new TicketFollowup();
762-
$ticketFollowup->add($followUpInput);
763-
}
748+
// GLPI 9.4+
749+
$followUpInput += [
750+
'items_id' => $ticketID,
751+
'itemtype' => Ticket::class,
752+
];
753+
$ticketFollowup = new ITILFollowup();
754+
$ticketFollowup->add($followUpInput);
764755

765756
// Restore mail notification setting
766757
PluginFormcreatorCommon::setNotification($use_mailing);

0 commit comments

Comments
 (0)