Fix title range
[buildfarm-server.git] / cgi-bin / show_log.pl
index 22df73144db1911a26970c8ccdc73c440fe3c274..ab3d3cdb00050140c1a6cbda0eeac81ef973f127 100755 (executable)
@@ -16,7 +16,8 @@ use CGI;
 use vars qw($dbhost $dbname $dbuser $dbpass $dbport 
                        $template_dir @log_file_names $local_git_clone);
 
-require "$ENV{BFConfDir}/BuildFarmWeb.pl";
+use FindBin qw($RealBin);
+require "$RealBin/../BuildFarmWeb.pl";
 
 my $template_opts = { INCLUDE_PATH => $template_dir, EVAL_PERL => 1};
 my $template = new Template($template_opts);
@@ -107,6 +108,7 @@ if ($system && $logdate)
        $scm = $row->[7];
        $scm ||= 'cvs'; # legacy scripts
        $scmurl = $row->[8];
+       $scmurl = undef unless $scmurl =~ /^http/; # slight sanity check
        $scmurl = 'http://git.postgresql.org/gitweb?p=postgresql.git;a=commit;h=' 
            if ($scmurl eq 'http://git.postgresql.org/git/postgresql.git');
        $log_file_names =~ s/^\{(.*)\}$/$1/;
@@ -239,4 +241,3 @@ sub process_changed
        }
                return (\@changed_rows,\@commit_logs);
 }
-