From: <Cra...@nt...> - 2005-06-23 06:22:03
|
Author: CrawfordCurrie Date: 2005-06-22 23:21:36 -0700 (Wed, 22 Jun 2005) New Revision: 4412 Modified: twiki/branches/DEVELOP/lib/TWiki/Render.pm twiki/branches/DEVELOP/lib/TWiki/UI.pm Log: CleanApacheErrorLog: for some reason, the signal handler installed in TWiki.pm is lost before UI::run is called, so re-installed the same handler there. Also fixed a couple of warnings highlighted by Anton. Modified: twiki/branches/DEVELOP/lib/TWiki/Render.pm =================================================================== --- twiki/branches/DEVELOP/lib/TWiki/Render.pm 2005-06-22 08:11:59 UTC (rev 4411) +++ twiki/branches/DEVELOP/lib/TWiki/Render.pm 2005-06-23 06:21:36 UTC (rev 4412) @@ -206,14 +206,15 @@ '[['.$name.']]' )); my @fields = $meta->find( 'FIELD' ); foreach my $field ( @fields ) { - unless ( $field->{attributes} =~ /H/ ) { - my $value = $field->{value} || ' '; - $metaText .= CGI::Tr( { valign => 'top' }, - CGI::Td( { class => 'twikiFirstCol', - align => 'right' }, - ' '.$field->{title}.':' ). - CGI::Td( ' '.$value.' ' )); - } + my $fa = $field->{attributes} || ''; + unless ( $fa =~ /H/ ) { + my $value = $field->{value} || ' '; + $metaText .= CGI::Tr( { valign => 'top' }, + CGI::Td( { class => 'twikiFirstCol', + align => 'right' }, + ' '.$field->{title}.':' ). + CGI::Td( ' '.$value.' ' )); + } } return CGI::div( { class => 'twikiForm' }, CGI::table( { border => 1 }, $metaText )); @@ -1268,8 +1269,7 @@ # tip text by escaping links (external, internal, Interwiki) $text =~ s/(?<=[\s\(])((($TWiki::regex{webNameRegex})\.)?($TWiki::regex{wikiWordRegex}|$TWiki::regex{abbrevRegex}))/<nop>$1/g; $text =~ s/(?<=[\-\*\s])($TWiki::regex{linkProtocolPattern}\:)/<nop>$1/go; - $text =~ s/@/@<nop>$1/g; # email address - $text =~ s/%/%<nop>$1/g; # % + $text =~ s/([@%])/@<nop>$1/g; # email address, variable return $text; } Modified: twiki/branches/DEVELOP/lib/TWiki/UI.pm =================================================================== --- twiki/branches/DEVELOP/lib/TWiki/UI.pm 2005-06-22 08:11:59 UTC (rev 4411) +++ twiki/branches/DEVELOP/lib/TWiki/UI.pm 2005-06-23 06:21:36 UTC (rev 4412) @@ -56,6 +56,12 @@ # Use unbuffered IO $| = 1; + if( DEBUG || $TWiki::cfg{WarningsAreErrors} ) { + # For some mysterious reason if this handler is defined + # in 'new TWiki' it gets lost again before we get here + $SIG{__WARN__} = sub { die @_; }; + } + if( $ENV{'DOCUMENT_ROOT'} ) { # script is called by browser $query = new CGI; |