Skip to content
Permalink
Browse files

Fix an i18n typo in the SQL Report, and also make sure that a query i…

…s not pure whitespace. Fixes bug #11348.
  • Loading branch information...
perlDreamer committed Jan 14, 2010
1 parent 7f3ad03 commit 8667876f634f33cb347797904411ed317a4f89b3
@@ -5,6 +5,7 @@
- fixed #11343: Notify About Low Stock workflow activity not sending out emails
- fixed #11345: New Image Asset template does now work well with AssetProxy macro and some layouts
- fixed #11344: Badge Builder doesn't allow pagination
- fixed #11348: Typ-o in debug notice SQLReport

7.8.9
- fixed #11235: wiki search
@@ -649,14 +649,15 @@ sub _processQuery {
$page = 1 unless defined $page;
my $nr = shift || 1;
my ($query, %var, $prefix);
my $i18n = WebGUI::International->new($self->session,"Asset_SQLReport");

if($nr > 1) {
$prefix = 'query'.$nr.'.';
}

if (! $self->{_query}{$nr}{dbQuery}) {
if (! $self->{_query}{$nr}{dbQuery} || $self->{_query}{$nr}{dbQuery} =~ m{\A \s* \Z}msx) {
$self->session->errorHandler->warn("No query specified for query $nr on '" . $self->getId . "'");
push @{$self->{_debug_loop}}, { 'debug.output' => "No query specfied for query $nr" };
push @{$self->{_debug_loop}}, { 'debug.output' => sprintf($i18n->get('No query specified for query'), $nr) };
return \%var;
}

@@ -671,7 +672,6 @@ sub _processQuery {
$query = $self->{_query}{$nr}{dbQuery};
}

my $i18n = WebGUI::International->new($self->session,"Asset_SQLReport");
push(@{$self->{_debug_loop}},{'debug.output'=>$i18n->get(17).$query});
push(@{$self->{_debug_loop}},{'debug.output'=>$i18n->get('debug placeholder parameters').join(",",@$placeholderParams)});
my $dbLink = WebGUI::DatabaseLink->new($self->session,$self->{_query}{$nr}{databaseLinkId});
@@ -74,6 +74,10 @@ while the second question mark will contain the form variable "field1".</p>
message => q|<b>Debug:</b> Query:|,
lastUpdated => 1031514049
},
'No query specified for query' => {
message => q|No query specified for query %s|,
lastUpdated => 1263483624,
},
'debug placeholder parameters' => {
message => q|<b>Debug:</b> Processed Placeholder parameters:|,
lastUpdated => 1031514049

0 comments on commit 8667876

Please sign in to comment.
You can’t perform that action at this time.