[Pkg-nagios-changes] [pkg-icingaweb2] 02/03: Update html_purifier patch for downwards compatibility
Markus Frosch
lazyfrosch at moszumanska.debian.org
Wed Dec 23 13:08:52 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 bac2ae7416d0f87a6caaab4add4451628f3a4da5
Author: Markus Frosch <markus at lazyfrosch.de>
Date: Wed Dec 23 11:58:58 2015 +0100
Update html_purifier patch for downwards compatibility
---
debian/patches/10_html_purifier | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/debian/patches/10_html_purifier b/debian/patches/10_html_purifier
index 06424b2..8e29970 100644
--- a/debian/patches/10_html_purifier
+++ b/debian/patches/10_html_purifier
@@ -1,23 +1,23 @@
-Description: Fix HTMLPurifier loading for versions >= 4.7.0
+Description: Allow loading of HTMLPurifier in older Debian and Ubuntu version
+ (with php-htmlpurifier < 4.6)
Author: Markus Frosch <lazyfrosch at debian.org>
-Forwarded: https://dev.icinga.org/issues/10652
-Last-Update: 2015-11-16
+Last-Update: 2015-12-23
---
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 @@
+Index: icingaweb2/modules/monitoring/application/views/helpers/PluginOutput.php
+===================================================================
+--- icingaweb2.orig/modules/monitoring/application/views/helpers/PluginOutput.php 2015-12-23 11:53:41.173910143 +0100
++++ icingaweb2/modules/monitoring/application/views/helpers/PluginOutput.php 2015-12-23 11:56:50.821703087 +0100
+@@ -92,8 +92,13 @@
{
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.php';
+- require_once 'HTMLPurifier.autoload.php';
++ if (include_once 'HTMLPurifier.php') {
++ include_once 'HTMLPurifier.autoload.php';
++ } else {
++ // try to load the legacy location
+ require_once 'HTMLPurifier/HTMLPurifier.php';
+ require_once 'HTMLPurifier/HTMLPurifier.autoload.php';
+ }
--
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