Patches applied:
* sgunderson@bigfoot.com--2005-private/ccbs--pgweb--1.0--patch-29
Fix a bug where challenge would never be shown.
* sgunderson@bigfoot.com--2005-private/ccbs--pgweb--1.0--patch-30
Order the song ratings list by title, not internal song number.
* sgunderson@bigfoot.com--2005-private/ccbs--pgweb--1.0--patch-31
Show artist names in the song ratings.
my $dbh = ccbs::db_connect();
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 $show_challenge = 0;
for my $song (@$songs_raw) {
if ($song->{'song'} != $last_song) {
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'};
}
my $key = $song->{'playmode'} . '_' . $song->{'difficulty'};
ccbs::print_header();
ccbs::process_template('songratings.tmpl', 'Sanger', {
songs => \@songs,
ccbs::print_header();
ccbs::process_template('songratings.tmpl', 'Sanger', {
songs => \@songs,
+ show_challenge => $show_challenge
<div>
<table class="scores">
<tr>
<div>
<table class="scores">
<tr>
[% IF show_challenge %]
<th colspan="5">Single</th>
<th colspan="4">Double</th>
[% IF show_challenge %]
<th colspan="5">Single</th>
<th colspan="4">Double</th>
<th>B</th>
<th>S</th>
<th>D</th>
<th>B</th>
<th>S</th>
<th>D</th>
[% FOR s = songs %]
<tr>
<td><a href="song.pl?id=[% s.song %]">[% s.title %]</a></td>
[% FOR s = songs %]
<tr>
<td><a href="song.pl?id=[% s.song %]">[% s.title %]</a></td>
+ <td>[% s.artist %]</td>
<td>[% s.single_beginner %]</td>
<td>[% s.single_standard %]</td>
<td>[% s.single_difficult %]</td>
<td>[% s.single_beginner %]</td>
<td>[% s.single_standard %]</td>
<td>[% s.single_difficult %]</td>