X-Git-Url: https://git.exim.org/buildfarm-server.git/blobdiff_plain/fbc70c03af36d901a27ba6426bf436e297892e65..b82a14979c08ae940b8c0b8df8583ae4e79ceea8:/cgi-bin/show_members.pl?ds=sidebyside diff --git a/cgi-bin/show_members.pl b/cgi-bin/show_members.pl index 5d4a0c9..f35c66a 100755 --- a/cgi-bin/show_members.pl +++ b/cgi-bin/show_members.pl @@ -1,17 +1,22 @@ #!/usr/bin/perl +=comment + +Copyright (c) 2003-2010, Andrew Dunstan + +See accompanying License file for license details + +=cut + use strict; use CGI; use DBI; use Template; - - use vars qw($dbhost $dbname $dbuser $dbpass $dbport $template_dir $sort_by); - -require "$ENV{BFConfDir}/BuildFarmWeb.pl"; -#require "BuildFarmWeb.pl"; +use FindBin qw($RealBin); +require "$RealBin/../BuildFarmWeb.pl"; my $query = new CGI; my %sort_ok = ('name' => 'lower(name)' , @@ -26,7 +31,7 @@ my $dsn="dbi:Pg:dbname=$dbname"; $dsn .= ";host=$dbhost" if $dbhost; $dsn .= ";port=$dbport" if $dbport; -my $db = DBI->connect($dsn,$dbuser,$dbpass); +my $db = DBI->connect($dsn,$dbuser,$dbpass,{pg_expand_array => 0}); # there is possibly some redundancy in this query, but it makes # a lot of the processing simpler. @@ -34,14 +39,15 @@ my $db = DBI->connect($dsn,$dbuser,$dbpass); my $statement = q{ select name, operating_system, os_version, compiler, compiler_version, owner_email, + sys_notes_ts::date AS sys_notes_date, sys_notes, architecture as arch, ARRAY( - select branch || ':' || + select branch || E':' || extract(days from now() - l.snapshot) from latest_snapshot l where l.sysname = s.name order by branch <> 'HEAD', branch desc ) as branches, - ARRAY(select compiler_version || '\t' || os_version || '\t' || effective_date + ARRAY(select compiler_version || E'\t' || os_version || E'\t' || effective_date from personality p where p.name = s.name order by effective_date @@ -93,4 +99,3 @@ $template->process('members.tt', {statrows=>$statrows}); exit; -