]> ruin.nu Git - ndwebbie.git/commitdiff
oops
authorMichael Andreen <harv@ruin.nu>
Mon, 5 Feb 2007 20:38:20 +0000 (20:38 +0000)
committerMichael Andreen <harv@ruin.nu>
Mon, 5 Feb 2007 20:38:20 +0000 (20:38 +0000)
ND/Web/Pages/Alliances.pm
ND/Web/Pages/Forum.pm

index f9b830fc1c58a10c0a416a25a36a1e4dddb804dc..69d7c92594695bfbaa6fe88e15ad3e5f34045120 100644 (file)
@@ -103,12 +103,12 @@ sub render_body {
                }
                $BODY->param(Members => \@members);
 
-               my $query = $DBH->prepare(intelquery('o.alliance AS oalliance,coords(o.x,o.y,o.z) AS origin, t.alliance AS talliance,coords(t.x,t.y,t.z) AS target',qq{not ingal AND (t.alliance_id = ? OR t.alliance_id = ?)
+               my $query = $DBH->prepare(intelquery('o.alliance AS oalliance,coords(o.x,o.y,o.z) AS origin, t.alliance AS talliance,coords(t.x,t.y,t.z) AS target',q{not ingal AND (o.alliance_id = $1 OR t.alliance_id = $1)
                                AND (i.mission = 'Defend' OR i.mission = 'AllyDef')
-                               AND (t.alliance_id != ? OR t.alliance_id IS NULL OR o.alliance_id != ? OR o.alliance_id IS NULL)
+                               AND ((( t.alliance_id != o.alliance_id OR t.alliance_id IS NULL OR o.alliance_id IS NULL)))
                                AND i.sender NOT IN (SELECT planet FROM users u NATURAL JOIN groupmembers gm WHERE gid = 8 AND planet IS NOT NULL)
                                }));
-               $query->execute($alliance->{id},$alliance->{id},$alliance->{id},$alliance->{id}) or $error .= $DBH->errstr;
+               $query->execute($alliance->{id}) or $error .= $DBH->errstr;
 
                my @intel;
                $i = 0;
index 06b3dfd5738e8a0b6d3b5e085b3f8bb60d034870..b18bc350c8ddb08044395c922377f5b02ba402de 100644 (file)
@@ -225,6 +225,7 @@ sub render_body {
                        ,undef,$board->{fcid}) or $ND::ERROR .= p($DBH->errstr);
                $BODY->param(Category =>  $category);
 
+       }elsif($self->{URI} =~ m{^/.*/search/(.*)}){ #List threads in this board
        }else{ #List boards
                $BODY->param(Overview => 1);
                $categories->execute or $ND::ERROR .= p($DBH->errstr);