From: <Cra...@nt...> - 2005-01-14 11:13:39
|
Author: CrawfordCurrie Date: 2005-01-14 03:12:12 -0800 (Fri, 14 Jan 2005) New Revision: 3489 Modified: twiki/branches/DEVELOP/lib/TWiki/Search.pm twiki/branches/DEVELOP/lib/TWiki/UI.pm Log: SearchCantUseStringError: misread old code when converting and introduced an error. Now fixed. Modified: twiki/branches/DEVELOP/lib/TWiki/Search.pm =================================================================== --- twiki/branches/DEVELOP/lib/TWiki/Search.pm 2005-01-14 10:31:05 UTC (rev 3488) +++ twiki/branches/DEVELOP/lib/TWiki/Search.pm 2005-01-14 11:12:12 UTC (rev 3489) @@ -657,13 +657,13 @@ @tmpList = map { $_->[1] } sort {$b->[0] <=> $a->[0] } - map { $this->store()->getTopicLatestRevTime( $web, $_ ) } + map { [ $this->store()->getTopicLatestRevTime( $web, $_ ), $_ ] } @topicList; } else { @tmpList = map { $_->[1] } sort {$a->[0] <=> $b->[0] } - map { $this->store()->getTopicLatestRevTime( $web, $_ ) } + map { [ $this->store()->getTopicLatestRevTime( $web, $_ ), $_ ] } @topicList; } Modified: twiki/branches/DEVELOP/lib/TWiki/UI.pm =================================================================== --- twiki/branches/DEVELOP/lib/TWiki/UI.pm 2005-01-14 10:31:05 UTC (rev 3488) +++ twiki/branches/DEVELOP/lib/TWiki/UI.pm 2005-01-14 11:12:12 UTC (rev 3489) @@ -116,26 +116,34 @@ $query, $scripted ); $Error::Debug = 1 if DEBUG; # comment out in production - try { + if( $query->param( 'compile_debug' )) { eval "use $class"; my $m = "$class"."::$method"; no strict 'refs'; &$m( $session ); use strict 'refs'; - } catch TWiki::UI::OopsException with { - my $e = shift; - my $url = $session->getOopsUrl( $e->{-web}, - $e->{-topic}, - "oops$e->{-template}", - $e->{-param1}, - $e->{-param2}, - $e->{-param3}, - $e->{-param4} ); - $session->redirect( $url ); - } catch Error::Simple with { - my $e = shift; - print "Content-type: text/plain\n\n"; - print $e->stringify(); + } else { + try { + eval "use $class"; + my $m = "$class"."::$method"; + no strict 'refs'; + &$m( $session ); + use strict 'refs'; + } catch TWiki::UI::OopsException with { + my $e = shift; + my $url = $session->getOopsUrl( $e->{-web}, + $e->{-topic}, + "oops$e->{-template}", + $e->{-param1}, + $e->{-param2}, + $e->{-param3}, + $e->{-param4} ); + $session->redirect( $url ); + } catch Error::Simple with { + my $e = shift; + print "Content-type: text/plain\n\n"; + print $e->stringify(); + } } } |