chiark / gitweb /
New dataage mode actually works
[ypp-sc-tools.web-live.git] / yarrg / web / routetextstring
index d66e756b1a4e9f3517cb8055b3a927918a03d27e..4d59c7fa5e2d4b5697d9e55bb6a00aa7d1e90bc9 100644 (file)
@@ -15,8 +15,7 @@ use HTML::Entities;
 use JSON;
 use Data::Dumper;
 
-db_setocean($ocean);
-db_connect();
+my $dbh= dbw_connect($ocean);
 
 my $sth= $dbh->prepare("SELECT archipelago,islandid,islandname
                                FROM islands WHERE islandname LIKE ?
@@ -78,7 +77,6 @@ foreach my $each (split m#[/|,]#, $string) {
 }
 
 $canontext= join ' | ', map { $_->[2] } @results;
-
 return $output->();
 
 </%perl>