From f40a1bb3705baa606ef8de423af106ea450516f8 Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Tue, 27 Nov 2012 09:30:17 +0000 Subject: strip unused variables --- index.cgi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'index.cgi') diff --git a/index.cgi b/index.cgi index c79f761..786847b 100755 --- a/index.cgi +++ b/index.cgi @@ -295,10 +295,10 @@ sub get_archives { my $query = 'SELECT title, date, uri FROM articles WHERE enabled=1 ORDER BY date DESC'; my $sth = $dbh->prepare($query); $sth->execute || die $dbh->errstr; + while (my $result = $sth->fetchrow_hashref) { $result->{'date'} =~ /(\d{4})\-(\d{2})\-\d{2} \d{2}\:\d{2}\:\d{2}/; ($result->{'year'}, $result->{'month'}) = ($1, $2); - my $title = $result->{'title'}; if (($result->{'year'} eq $current_year) && ($result->{'month'} eq $current_month) && $result->{'uri'}) { push(@{$history{$result->{'year'}}{$result->{'month'}}->{'uri_loop'}}, @@ -306,7 +306,7 @@ sub get_archives { year => $result->{'year'}, month => $result->{'month'}, month_name => $months{$result->{'month'}}, - title => $title, + title => $result->{'title'}, uri => $result->{'uri'}, } ); -- cgit v1.2.3