- display "No results" message when displaying testday stats
This commit is contained in:
ccooper%deadsquid.com 2007-12-31 15:30:07 +00:00
Родитель 3bdb0832b1
Коммит aa10073bdd
1 изменённых файлов: 4 добавлений и 2 удалений

Просмотреть файл

@ -560,6 +560,7 @@ sub getL10nAggregateResults($\%) {
$args->{"start_timestamp"},
$args->{"finish_timestamp"},
);
my $num_locales = 0;
while (my ($locale_abbrev,$num_results) = $sth->fetchrow_array) {
$l10n->{$locale_abbrev}->{'num_results'} = $num_results;
# Setup placeholders
@ -567,11 +568,12 @@ sub getL10nAggregateResults($\%) {
$l10n->{$locale_abbrev}->{'num_fail'} = 0;
$l10n->{$locale_abbrev}->{'num_unclear'} = 0;
$l10n->{$locale_abbrev}->{'num_testers'} = 0;
$num_locales++;
}
$sth->finish();
# No results? Don't bother looking up the rest.
unless ($l10n) {
if ($num_locales == 0) {
$l10n->{'error'} = 'No results';
return $l10n;
}