]> mj.ucw.cz Git - gallery.git/commitdiff
UCW::Support for user-defined error handling
authorMartin Mares <mj@ucw.cz>
Mon, 31 Dec 2012 20:17:51 +0000 (21:17 +0100)
committerMartin Mares <mj@ucw.cz>
Sun, 8 Feb 2015 20:14:17 +0000 (21:14 +0100)
gal/UCW/Gallery/Web.pm

index 693e349d37c59483ea17fe648df5cf9f52a6b039..3a5536338ee97b549fe1fa2093e89d9b931bd7d9 100644 (file)
@@ -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 <<EOF ;
 Content-Type: text/html
@@ -63,9 +62,12 @@ Content-Type: text/html
 <html><head>
 $hextras$theme_hextras<title>$title</title>
 </head><body>
-$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($) {