make member name sorts case insensitive
authorAndrew Dunstan <andrew@dunslane.net>
Fri, 23 Mar 2007 15:50:05 +0000 (15:50 +0000)
committerAndrew Dunstan <andrew@dunslane.net>
Fri, 23 Mar 2007 15:50:05 +0000 (15:50 +0000)
cgi-bin/show_members.pl

index 9846a6eba51ca61d9a5db05a8c674a5408a0913f..341103eba10701a1a1f1a7d84f0b742729fc4d74 100644 (file)
@@ -14,13 +14,13 @@ require "$ENV{BFConfDir}/BuildFarmWeb.pl";
 #require "BuildFarmWeb.pl";
 
 my $query = new CGI;
-my %sort_ok = ('name' => 'name' , 
+my %sort_ok = ('name' => 'lower(name)' , 
               'owner' => 'lower(owner_email)', 
               'os' => 'lower(operating_system), os_version', 
               'compiler' => 'lower(compiler), compiler_version' ,
               'arch' => 'lower(architecture)' );
 $sort_by = $query->param('sort_by');$sort_by =~ s/[^a-zA-Z0-9_ -]//g;
-$sort_by = $sort_ok{$sort_by} || 'name';
+$sort_by = $sort_ok{$sort_by} || $sort_ok{name};
 
 my $dsn="dbi:Pg:dbname=$dbname";
 $dsn .= ";host=$dbhost" if $dbhost;