[Pkg-nagios-changes] [pkg-icingaweb2] 01/01: Add patch for HTMLPurifier path loading

Markus Frosch lazyfrosch at moszumanska.debian.org
Mon Nov 16 17:07:24 UTC 2015


This is an automated email from the git hooks/post-receive script.

lazyfrosch pushed a commit to branch master
in repository pkg-icingaweb2.

commit ac348b165aec20503a037a633aed7f670bd81591
Author: Markus Frosch <markus at lazyfrosch.de>
Date:   Mon Nov 16 18:07:08 2015 +0100

    Add patch for HTMLPurifier path loading
---
 debian/patches/10_html_purifier | 26 ++++++++++++++++++++++++++
 debian/patches/series           |  1 +
 2 files changed, 27 insertions(+)

diff --git a/debian/patches/10_html_purifier b/debian/patches/10_html_purifier
new file mode 100644
index 0000000..06424b2
--- /dev/null
+++ b/debian/patches/10_html_purifier
@@ -0,0 +1,26 @@
+Description: Fix HTMLPurifier loading for versions >= 4.7.0
+Author: Markus Frosch <lazyfrosch at debian.org>
+Forwarded: https://dev.icinga.org/issues/10652
+Last-Update: 2015-11-16
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/modules/monitoring/application/views/helpers/PluginOutput.php
++++ b/modules/monitoring/application/views/helpers/PluginOutput.php
+@@ -92,8 +92,15 @@
+     {
+         if (self::$purifier === null) {
+             require_once 'HTMLPurifier/Bootstrap.php';
+-            require_once 'HTMLPurifier/HTMLPurifier.php';
+-            require_once 'HTMLPurifier/HTMLPurifier.autoload.php';
++            try {
++                require_once 'HTMLPurifier.php';
++                require_once 'HTMLPurifier.autoload.php';
++
++            } catch (ErrorException $e) {
++                // loading failed, try to load old location
++                require_once 'HTMLPurifier/HTMLPurifier.php';
++                require_once 'HTMLPurifier/HTMLPurifier.autoload.php';
++            }
+ 
+             $config = HTMLPurifier_Config::createDefault();
+             $config->set('Core.EscapeNonASCIICharacters', true);
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..cd204d5
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+10_html_purifier

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-nagios/pkg-icingaweb2.git



More information about the Pkg-nagios-changes mailing list