Skip to content

Commit

Permalink
9.4 compatibility
Browse files Browse the repository at this point in the history
version 2.5.0
  • Loading branch information
tomolimo committed Jul 2, 2019
1 parent ac18d2d commit b02004c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@ Added arTableExists and arFieldExists to be compatible with 9.2
Remove functions for 9.1 compatibility

## 2.3.3
Compatibility with GLPI 9.2
Fixed issue with the \r\n

## 2.4.0
Compatibility with GLPI 9.3

## 2.5.0
Compatibility with GLPI 9.4
5 changes: 0 additions & 5 deletions hook.php
Original file line number Diff line number Diff line change
Expand Up @@ -223,13 +223,8 @@ public static function cleanText($parm) {

////////////////////
// GLPI fixes
// cases of the \r\n or \n for GLPI 9.2, and what about GLPI 9.3?
$temp_content = preg_replace('/(\\\\r)?\\\\n/', ';,<br />', $temp_content);

// cases of the &quot; that are converted into '; instead of " in GLPI 9.2, 9.3 and 9.4
$temp_content = str_replace('\\\';', '\\"', $temp_content);
// backport of addslashes_deep from GLPI 9.4/bugfixes, completes the one from GLPI 9.2
$temp_content = str_replace(['&#x27;'], ["'"], $temp_content);
// End of GLPI fixes
////////////////////

Expand Down
6 changes: 3 additions & 3 deletions setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// and it cleans attached pictures to emails
// It has been succesfully tested with plain TEXT and HTML emails
// ----------------------------------------------------------------------
define ("PLUGIN_TICKETCLEANER_VERSION", "2.4.0");
define ("PLUGIN_TICKETCLEANER_VERSION", "2.5.0");

/**
* Summary of plugin_init_ticketcleaner
Expand All @@ -28,11 +28,11 @@ function plugin_init_ticketcleaner() {

$PLUGIN_HOOKS['pre_item_add']['ticketcleaner'] = [
'Ticket' => ['PluginTicketCleaner', 'plugin_pre_item_add_ticketcleaner'],
'TicketFollowup' => ['PluginTicketCleaner', 'plugin_pre_item_add_ticketcleaner_followup']
'ITILFollowup' => ['PluginTicketCleaner', 'plugin_pre_item_add_ticketcleaner_followup']
];
$PLUGIN_HOOKS['pre_item_update']['ticketcleaner'] = [
'Ticket' => ['PluginTicketCleaner', 'plugin_pre_item_update_ticketcleaner'],
'TicketFollowup' => ['PluginTicketCleaner', 'plugin_pre_item_update_ticketcleaner_followup']
'ITILFollowup' => ['PluginTicketCleaner', 'plugin_pre_item_update_ticketcleaner_followup']
];

$plugin = new Plugin();
Expand Down
4 changes: 4 additions & 0 deletions ticketcleaner.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ This plugin adds the possibility to translate it 'inline', see wiki.]]></en>
<num>2.4.0</num>
<compatibility>9.3</compatibility>
</version>
<version>
<num>2.5.0</num>
<compatibility>9.4</compatibility>
</version>
</versions>
<langs>
<lang>Any</lang>
Expand Down

0 comments on commit b02004c

Please sign in to comment.