X-Git-Url: https://git.sesse.net/?p=ccbs;a=blobdiff_plain;f=html%2Fsongratings.pl;fp=html%2Fsongratings.pl;h=68abcead5faa759e7c49fed8f2563a4bbd79e6d2;hp=c8be12d46c4912532b1cb8cb759413c9e3dec6c2;hb=bcb73c11262a6de77c9af117390127797629478b;hpb=74d491c65da42e950c25ac21b85f211ef56735c6 diff --git a/html/songratings.pl b/html/songratings.pl index c8be12d..68abcea 100755 --- a/html/songratings.pl +++ b/html/songratings.pl @@ -9,7 +9,7 @@ my $machine = $cgi->param('machine'); my $dbh = ccbs::db_connect(); -my $songs_raw = ccbs::db_fetch_all($dbh, 'SELECT song,title,playmode,difficulty,feetrating FROM songratings NATURAL JOIN songs WHERE machine=? ORDER BY machine,song', $machine); +my $songs_raw = ccbs::db_fetch_all($dbh, 'SELECT song,title,artist,playmode,difficulty,feetrating FROM songratings NATURAL JOIN songs WHERE machine=? ORDER BY LOWER(title)', $machine); my @songs = (); @@ -17,7 +17,7 @@ my $last_song = -1; my $show_challenge = 0; for my $song (@$songs_raw) { if ($song->{'song'} != $last_song) { - push @songs, { song => $song->{'song'}, title => $song->{'title'} }; + push @songs, { song => $song->{'song'}, title => $song->{'title'}, artist => $song->{'artist'} }; } my $key = $song->{'playmode'} . '_' . $song->{'difficulty'}; @@ -30,5 +30,6 @@ for my $song (@$songs_raw) { ccbs::print_header(); ccbs::process_template('songratings.tmpl', 'Sanger', { songs => \@songs, + show_challenge => $show_challenge }); $dbh->disconnect;