From 276d47b6d96d714679f99d478f6cebfec62d8481 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Mon, 31 Dec 2012 21:17:51 +0100 Subject: [PATCH] UCW::Support for user-defined error handling --- gal/UCW/Gallery/Web.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gal/UCW/Gallery/Web.pm b/gal/UCW/Gallery/Web.pm index 693e349..3a55363 100644 --- a/gal/UCW/Gallery/Web.pm +++ b/gal/UCW/Gallery/Web.pm @@ -54,7 +54,6 @@ sub html_top($) { my ($self) = @_; my $title = UCW::CGI::html_escape($self->get('Title')); my $hextras = $self->extras('WebHeadExtras'); - my $textras = $self->extras('WebTopExtras'); my $theme_hextras = $self->theme_head_extras; print < $hextras$theme_hextras$title -$textras EOF + $UCW::CGI::ErrorHandler::error_hook = \&error; + + # WebTopExtras are evaluated separately, since they can override the error hook + print $self->extras('WebTopExtras'); } sub html_bot($) { -- 2.39.2