Skip to content

Commit

Permalink
Merge pull request #32 from tomolimo/10.0/bugfixes
Browse files Browse the repository at this point in the history
Fixed issue with \n that was clean into n
  • Loading branch information
tomolimo authored Nov 28, 2023
2 parents bf105b2 + 8b4ba2f commit 9aeaad7
Show file tree
Hide file tree
Showing 12 changed files with 45 additions and 180 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Home for Ticket Cleaner GLPI plugin

See wiki for filter explanations: https://github.com/tomolimo/ticketcleaner/wiki

## 4.0.0
## 4.0.1
GLPI 10.0 compatible release

## 3.0.0
Expand Down
4 changes: 2 additions & 2 deletions front/filter.form.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
/*
* -------------------------------------------------------------------------
Ticket Cleaner plugin
Copyright (C) 2016-2021 by Raynet SAS a company of A.Raymond Network.
Copyright (C) 2016-2023 by Raynet SAS a company of A.Raymond Network.
http://www.araymond.com
https://www.araymond.com
-------------------------------------------------------------------------
LICENSE
Expand Down
4 changes: 2 additions & 2 deletions front/filter.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
/*
* -------------------------------------------------------------------------
Ticket Cleaner plugin
Copyright (C) 2016-2021 by Raynet SAS a company of A.Raymond Network.
Copyright (C) 2016-2023 by Raynet SAS a company of A.Raymond Network.
http://www.araymond.com
https://www.araymond.com
-------------------------------------------------------------------------
LICENSE
Expand Down
44 changes: 0 additions & 44 deletions front/user.form.php

This file was deleted.

60 changes: 30 additions & 30 deletions hook.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
/*
* -------------------------------------------------------------------------
Ticket Cleaner plugin
Copyright (C) 2016-2021 by Raynet SAS a company of A.Raymond Network.
Copyright (C) 2016-2023 by Raynet SAS a company of A.Raymond Network.
http://www.araymond.com
https://www.araymond.com
-------------------------------------------------------------------------
LICENSE
Expand Down Expand Up @@ -111,28 +111,28 @@ function plugin_ticketcleaner_install() {

if (!$DB->tableExists("glpi_plugin_ticketcleaner_picturehashes_lastupdate")) {
$query = "CREATE TABLE `glpi_plugin_ticketcleaner_picturehashes_lastupdate` (
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`lastupdate` VARCHAR(50) NULL,
PRIMARY KEY (`id`)
)
COLLATE='utf8_general_ci'
ENGINE=InnoDB;
";
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`lastupdate` VARCHAR(50) NULL,
PRIMARY KEY (`id`)
)
COLLATE='utf8_general_ci'
ENGINE=InnoDB;
";

$DB->query($query) or die("error creating glpi_plugin_ticketcleaner_picturehashes_lastupdate " . $DB->error());
}

if (!$DB->tableExists("glpi_plugin_ticketcleaner_picturehashes")) {
$query = "CREATE TABLE `glpi_plugin_ticketcleaner_picturehashes` (
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`hash` CHAR(40) NOT NULL,
`filename` VARCHAR(255) NOT NULL,
PRIMARY KEY (`id`),
INDEX `hash` (`hash`)
)
COLLATE='utf8_general_ci'
ENGINE=InnoDB;
";
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`hash` CHAR(40) NOT NULL,
`filename` VARCHAR(255) NOT NULL,
PRIMARY KEY (`id`),
INDEX `hash` (`hash`)
)
COLLATE='utf8_general_ci'
ENGINE=InnoDB;
";

$DB->query($query) or die("error creating glpi_plugin_ticketcleaner_picturehashes " . $DB->error());
}
Expand All @@ -153,17 +153,17 @@ function plugin_ticketcleaner_install() {
if (!$DB->tableExists("glpi_plugin_ticketcleaner_filters")) {
$query = "
CREATE TABLE `glpi_plugin_ticketcleaner_filters` (
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`name` VARCHAR(255) NOT NULL,
`type` INT(1) NOT NULL DEFAULT '1',
`order` INT UNSIGNED NULL,
`regex` TEXT NOT NULL,
`replacement` TEXT NOT NULL,
`is_active` INT(1) NOT NULL DEFAULT '0',
`comment` TEXT NULL,
`date_mod` TIMESTAMP NULL DEFAULT NULL,
PRIMARY KEY (`id`),
INDEX `type` (`type`),
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`name` VARCHAR(255) NOT NULL,
`type` INT(1) NOT NULL DEFAULT '1',
`order` INT UNSIGNED NULL,
`regex` TEXT NOT NULL,
`replacement` TEXT NOT NULL,
`is_active` INT(1) NOT NULL DEFAULT '0',
`comment` TEXT NULL,
`date_mod` TIMESTAMP NULL DEFAULT NULL,
PRIMARY KEY (`id`),
INDEX `type` (`type`),
INDEX `order` (`order`)
)
COLLATE='utf8_general_ci'
Expand Down Expand Up @@ -274,7 +274,7 @@ public static function cleanText($parm) {

// unsanitize doesn't exist, so reverse one by one the sanitize
$temp_content = Sanitizer::decodeHtmlSpecialCharsRecursive([$temp_content]);
$temp_content = Toolbox::stripslashes_deep($temp_content[0]);
$temp_content = $temp_content[0];
if ($is_debug) {
Toolbox::logInFile('TicketCleaner', "\tText content after un-sanitize: " . $temp_content . "\n" );
}
Expand Down
4 changes: 2 additions & 2 deletions inc/filter.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
/*
* -------------------------------------------------------------------------
Ticket Cleaner plugin
Copyright (C) 2016-2021 by Raynet SAS a company of A.Raymond Network.
Copyright (C) 2016-2023 by Raynet SAS a company of A.Raymond Network.
http://www.araymond.com
https://www.araymond.com
-------------------------------------------------------------------------
LICENSE
Expand Down
4 changes: 2 additions & 2 deletions inc/menu.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
/*
* -------------------------------------------------------------------------
Ticket Cleaner plugin
Copyright (C) 2016-2021 by Raynet SAS a company of A.Raymond Network.
Copyright (C) 2016-2023 by Raynet SAS a company of A.Raymond Network.
http://www.araymond.com
https://www.araymond.com
-------------------------------------------------------------------------
LICENSE
Expand Down
87 changes: 0 additions & 87 deletions inc/user.class.php

This file was deleted.

4 changes: 0 additions & 4 deletions js/locales.js

This file was deleted.

4 changes: 2 additions & 2 deletions purgepictures.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
/*
* -------------------------------------------------------------------------
Ticket Cleaner plugin
Copyright (C) 2016-2021 by Raynet SAS a company of A.Raymond Network.
Copyright (C) 2016-2023 by Raynet SAS a company of A.Raymond Network.
http://www.araymond.com
https://www.araymond.com
-------------------------------------------------------------------------
LICENSE
Expand Down
6 changes: 3 additions & 3 deletions setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
/*
* -------------------------------------------------------------------------
Ticket Cleaner plugin
Copyright (C) 2016-2022 by Raynet SAS a company of A.Raymond Network.
Copyright (C) 2016-2023 by Raynet SAS a company of A.Raymond Network.
http://www.araymond.com
https://www.araymond.com
-------------------------------------------------------------------------
LICENSE
Expand Down Expand Up @@ -35,7 +35,7 @@
// and it cleans attached pictures to emails
// It has been succesfully tested with plain TEXT and HTML emails
// ----------------------------------------------------------------------
define ("PLUGIN_TICKETCLEANER_VERSION", "4.0.0");
define ("PLUGIN_TICKETCLEANER_VERSION", "4.0.1");
define ("PLUGIN_TICKETCLEANER_VERSION_MIN", "10.0");
define ("PLUGIN_TICKETCLEANER_VERSION_MAX", "11.0");

Expand Down
2 changes: 1 addition & 1 deletion ticketcleaner.xml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ This plugin adds the possibility to translate it 'inline', see wiki.]]></en>
<compatibility>9.5</compatibility>
</version>
<version>
<num>4.0.0</num>
<num>4.0.1</num>
<compatibility>10.0</compatibility>
</version>
</versions>
Expand Down

0 comments on commit 9aeaad7

Please sign in to comment.