X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=NDWeb%2FInclude.pm;h=5794b469c4eef5f9a1b7e7c9f239b3239c4039ec;hb=8250eb360c341a4eeaa76e5e3fc0f57cf0014a60;hp=6916392aac0d37a8255574bc8455a9c3b2b24f24;hpb=d6c9085e748c4d61901aaea72f0e1546dcc7cdda;p=ndwebbie.git diff --git a/NDWeb/Include.pm b/NDWeb/Include.pm index 6916392..5794b46 100644 --- a/NDWeb/Include.pm +++ b/NDWeb/Include.pm @@ -17,7 +17,7 @@ # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * #**************************************************************************/ -package ND::Web::Include; +package NDWeb::Include; use strict; use warnings; use CGI qw{:standard}; @@ -65,8 +65,8 @@ sub alliances { my ($alliance) = @_; my @alliances; $alliance = -1 unless defined $alliance; - push @alliances,{Id => -1, Name => ' ', Selected => not $alliance}; - my $query = $ND::DBH->prepare(q{SELECT id,name FROM alliances ORDER BY name}); + push @alliances,{Id => -1, Name => '', Selected => not $alliance}; + my $query = $ND::DBH->prepare(q{SELECT id,name FROM alliances ORDER BY LOWER(name)}); $query->execute; while (my $ally = $query->fetchrow_hashref){ push @alliances,{Id => $ally->{id}, Name => $ally->{name}, Selected => $alliance == $ally->{id}}; @@ -78,7 +78,7 @@ sub intelquery { my ($columns,$where) = @_; return qq{ SELECT $columns, i.mission, i.tick AS landingtick,MIN(i.eta) AS eta, i.amount, i.ingal, u.username -FROM (intel i NATURAL JOIN users u) +FROM (fleets i NATURAL JOIN users u) JOIN current_planet_stats t ON i.target = t.id JOIN current_planet_stats o ON i.sender = o.id WHERE $where