diff options
author | Remi Collet <fedora@famillecollet.com> | 2014-10-30 12:43:04 +0100 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2014-10-30 12:43:04 +0100 |
commit | 5928c8d65301ab6f33188f79fdccbe3c5867546c (patch) | |
tree | 7131c787cbd4570bd42d9d8345d4c944398e6f70 | |
parent | a7c863eca15b929afdc13836b46ab7bcb0c7b1cd (diff) |
php-horde-Horde-Core: add upstream patch to avoid error on front page from an unconfigured block
-rw-r--r-- | Horde_Core-upstream.patch | 27 | ||||
-rw-r--r-- | php-horde-Horde-Core.spec | 12 |
2 files changed, 38 insertions, 1 deletions
diff --git a/Horde_Core-upstream.patch b/Horde_Core-upstream.patch new file mode 100644 index 0000000..5cc5fac --- /dev/null +++ b/Horde_Core-upstream.patch @@ -0,0 +1,27 @@ +From 1ee4e8b255c80e7baab6072c29e5705820d8d5d4 Mon Sep 17 00:00:00 2001 +From: Michael M Slusarz <slusarz@horde.org> +Date: Wed, 15 Oct 2014 13:41:27 -0600 +Subject: [PATCH] Hotfix: certain blocks (weather) don't throw Exceptions on + error + +They set enabled to false. Not sure how this is supposed to be fixed +properly, but this prevents fatal errors +--- + framework/Core/lib/Horde/Core/Block/Layout/View.php | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/framework/Core/lib/Horde/Core/Block/Layout/View.php b/framework/Core/lib/Horde/Core/Block/Layout/View.php +index eeaf551..4e92c98 100644 +--- a/framework/Core/lib/Horde/Core/Block/Layout/View.php ++++ b/framework/Core/lib/Horde/Core/Block/Layout/View.php +@@ -79,6 +79,10 @@ public function toHtml() + $rowspan = $colspan = 1; + try { + $block = $bc->getBlock($item['app'], $item['params']['type2'], $item['params']['params']); ++ ++ if (!$block->enabled) { ++ throw new Horde_Exception('Block not enabled.'); ++ } + $rowspan = $item['height']; + $colspan = $item['width']; + for ($i = 0; $i < $item['height']; $i++) { diff --git a/php-horde-Horde-Core.spec b/php-horde-Horde-Core.spec index c890d50..3bb5b26 100644 --- a/php-horde-Horde-Core.spec +++ b/php-horde-Horde-Core.spec @@ -14,7 +14,7 @@ Name: php-horde-Horde-Core Version: 2.15.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Horde Core Framework libraries Group: Development/Libraries @@ -22,6 +22,9 @@ License: LGPLv2 URL: http://pear.horde.org Source0: http://%{pear_channel}/get/%{pear_name}-%{version}.tgz +# Upstream patch +Patch0: %{pear_name}-upstream.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: gettext @@ -184,6 +187,8 @@ Framework. %setup -q -c cd %{pear_name}-%{version} +%patch0 -p3 -b .upstream + # Don't install .po and .pot files # Don't install prototype, scriptaculous, use system one # Remove checksum for .mo, as we regenerate them @@ -192,6 +197,7 @@ sed -e '/%{pear_name}\.po/d' \ -e '/js\/prototype.js/d' \ -e '/js\/scriptaculous/d' \ %endif + -e '/View.php/s/md5sum=.*name=/name=/' \ -e '/%{pear_name}.mo/s/md5sum=.*name=/name=/' \ ../package.xml >%{name}.xml touch -r ../package.xml %{name}.xml @@ -281,6 +287,10 @@ fi %changelog +* Thu Oct 30 2014 Remi Collet <remi@fedoraproject.org> - 2.15.0-2 +- add upstream patch to avoid error on front page from + an unconfigured block + * Sun Oct 12 2014 Remi Collet <remi@fedoraproject.org> - 2.15.0-1 - Update to 2.15.0 |