X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=lib%2FNDWeb%2FController%2FStats.pm;h=36cc1e5ef19e1997415ff53a956537b8a17661ad;hb=28cc9c2d61cf6ee0bfcd02c82e0195efaf6cf27a;hp=1c52a02c62c911bd8cd0733a32edfbcc67afd8ab;hpb=230e61ee1d992255138b56c50caf9cca52532c2b;p=ndwebbie.git diff --git a/lib/NDWeb/Controller/Stats.pm b/lib/NDWeb/Controller/Stats.pm index 1c52a02..36cc1e5 100644 --- a/lib/NDWeb/Controller/Stats.pm +++ b/lib/NDWeb/Controller/Stats.pm @@ -55,7 +55,10 @@ sub galaxy : Local { }); $query->execute($x,$y); - $c->stash(g => $query->fetchrow_hashref ); + my $g = $query->fetchrow_hashref; + $c->detach('/default') unless $g; + $c->stash(g => $g); + my $extra_columns = ''; if ($c->check_user_roles(qw/stats_intel/)){ @@ -102,6 +105,8 @@ sub planet : Local { my $p = $dbh->selectrow_hashref(q{SELECT id,x,y,z FROM current_planet_stats WHERE id = $1},undef,$id); + $c->detach('/default') unless $p; + $c->forward('galaxy',[$p->{x},$p->{y},$p->{z}]); $c->stash(p => $p);