[WTF CVS] wtf/lib/WTF/Pages Reports.pm,1.9,1.10
Brought to you by:
gryphonshafer
From: Gryphon S. <gry...@us...> - 2006-12-03 00:06:32
|
Update of /cvsroot/wtf-tracker/wtf/lib/WTF/Pages In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv14612/lib/WTF/Pages Modified Files: Reports.pm Log Message: Fixed a bug that would happen if there's no Activity Summary data at all to display Index: Reports.pm =================================================================== RCS file: /cvsroot/wtf-tracker/wtf/lib/WTF/Pages/Reports.pm,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Reports.pm 2 Dec 2006 00:09:09 -0000 1.9 --- Reports.pm 3 Dec 2006 00:06:29 -0000 1.10 *************** *** 297,307 **** my $activity_months = $sth->{'activity_months'}->fetchall_arrayref({}); ! # set the current month; use user input if reasonable, ! # otherwise use the most recent month ! my $month = ( ! $req->param('month') and $req->param('month') =~ /^\d{4}-\d{2}$/ ! ) ? $req->param('month') : $activity_months->[0]{'datestamp'}; ! $sth->{'activities'}->execute() or die $dbh->errstr(); my $tmpl_obj = $self->setup_tmpl('reports/activity.tmpl'); --- 297,310 ---- my $activity_months = $sth->{'activity_months'}->fetchall_arrayref({}); ! my $month; ! if ( exists $activity_months->[0]{'datestamp'} ) { ! # set the current month; use user input if reasonable, ! # otherwise use the most recent month ! $month = ( ! $req->param('month') and $req->param('month') =~ /^\d{4}-\d{2}$/ ! ) ? $req->param('month') : $activity_months->[0]{'datestamp'}; ! $sth->{'activities'}->execute() or die $dbh->errstr(); ! } my $tmpl_obj = $self->setup_tmpl('reports/activity.tmpl'); *************** *** 309,312 **** --- 312,318 ---- 'title' => 'Activity Summary', 'nav_bar' => WTF::Utils::nav_bar_data( $r, 'activity' ), + ); + + $tmpl_obj->param( 'activity_months' => $activity_months, 'activities' => WTF::Utils::indent( *************** *** 336,340 **** }, ), ! ); return $tmpl_obj->output(); --- 342,346 ---- }, ), ! ) if ( exists $activity_months->[0]{'datestamp'} ); return $tmpl_obj->output(); |