]> ruin.nu Git - ndwebbie.git/commitdiff
fatal warnings
authorMichael Andreen <harv@ruin.nu>
Fri, 29 Dec 2006 15:32:41 +0000 (15:32 +0000)
committerMichael Andreen <harv@ruin.nu>
Fri, 29 Dec 2006 15:32:41 +0000 (15:32 +0000)
memberIntel.pl
templates/memberIntel.tmpl

index db7c939f66f25f6071ac12ae33102ca4e4a62c24..6aa1e0ebb2771f715c10d0aa417e059c9ff9c061 100644 (file)
@@ -18,6 +18,8 @@
 #**************************************************************************/
 
 use strict;
+use warnings FATAL => 'all';
+no warnings qw(uninitialized);
 use POSIX;
 our $BODY;
 our $DBH;
@@ -39,7 +41,7 @@ if (param('show') eq 'all'){
 my $query = $DBH->prepare(intelquery('o.alliance AS oalliance,coords(o.x,o.y,o.z) AS origin, coords(t.x,t.y,t.z) AS target, t.nick',"t.alliance_id = 1 $showticks"));
 $query->execute() or $error .= $DBH->errstr;
 my @intellists;
-my @intel;
+my @incomings;
 my $i = 0;
 while (my $intel = $query->fetchrow_hashref){
        if ($intel->{ingal}){
@@ -49,14 +51,14 @@ while (my $intel = $query->fetchrow_hashref){
        }
        $i++;
        $intel->{ODD} = $i % 2;
-       push @intel,$intel;
+       push @incomings,$intel;
 }
-push @intellists,{Message => 'Incoming fleets', Intel => \@intel, Origin => 1};
+push @intellists,{Message => 'Incoming fleets', Intel => \@incomings, Origin => 1};
 
-my $query = $DBH->prepare(intelquery('o.nick,coords(o.x,o.y,o.z) AS origin,t.alliance AS talliance,coords(t.x,t.y,t.z) AS target',"o.alliance_id = 1 $showticks"));
+$query = $DBH->prepare(intelquery('o.nick,coords(o.x,o.y,o.z) AS origin,t.alliance AS talliance,coords(t.x,t.y,t.z) AS target',"o.alliance_id = 1 $showticks"));
 $query->execute() or $error .= $DBH->errstr;
-my @intel;
-my $i = 0;
+my @outgoings;
+$i = 0;
 while (my $intel = $query->fetchrow_hashref){
        if ($intel->{ingal}){
                $intel->{missionclass} = 'ingal';
@@ -65,9 +67,9 @@ while (my $intel = $query->fetchrow_hashref){
        }
        $i++;
        $intel->{ODD} = $i % 2;
-       push @intel,$intel;
+       push @outgoings,$intel;
 }
-push @intellists,{Message => 'Outgoing Fleets', Intel => \@intel, Target => 1};
+push @intellists,{Message => 'Outgoing Fleets', Intel => \@outgoings, Target => 1};
 
 $BODY->param(IntelLIsts => \@intellists);
 
index 9d74cf317cd96ce83f9a782348460d8cbe037a19..bc69dc76c8226b8172051289e7457e2d4057c59a 100644 (file)
        </tr>
        <TMPL_LOOP Intel>
        <tr class="<TMPL_IF ODD>odd<TMPL_ELSE>even</TMPL_IF>">
-       <td><a href="intel?coords=<TMPL_VAR NAME=Origin>"><TMPL_VAR NAME=Origin></a></td>
        <TMPL_IF OAlliance>
        <td><TMPL_VAR NAME=OAlliance></td>
        <TMPL_ELSE>
        <td><TMPL_VAR NAME=Nick></td>
        </TMPL_IF>
+       <td><a href="intel?coords=<TMPL_VAR NAME=Origin>"><TMPL_VAR NAME=Origin></a></td>
        <td class="<TMPL_VAR NAME=MissionClass>"><TMPL_VAR NAME=Mission></td>
        <td align="center"><TMPL_VAR NAME=landingtick></td>
        <td align="center"><TMPL_VAR NAME=ETA></td>