]> Lady’s Gitweb - Gitweb/blobdiff - gitweb.perl
gitweb: Fix bug in git_difftree_body (was '!=' instead of 'ne')
[Gitweb] / gitweb.perl
index 8b257eec5e5c0d149f00b7a3faa24fa7b81f7c34b2e21da94442a5cfc100e4ff..c12a6ce6c180341cc709a7b13023f4272c32758549c2a5186fb452d8dba5bb0e 100755 (executable)
@@ -18,6 +18,10 @@ use File::Find qw();
 use File::Basename qw(basename);
 binmode STDOUT, ':utf8';
 
+BEGIN {
+       CGI->compile() if $ENV{MOD_PERL};
+}
+
 our $cgi = new CGI;
 our $version = "++GIT_VERSION++";
 our $my_url = $cgi->url();
@@ -2271,7 +2275,7 @@ sub git_difftree_body {
                        my $mode_chnge = "";
                        if ($diff{'from_mode'} != $diff{'to_mode'}) {
                                $mode_chnge = "<span class=\"file_status mode_chnge\">[changed";
-                               if ($from_file_type != $to_file_type) {
+                               if ($from_file_type ne $to_file_type) {
                                        $mode_chnge .= " from $from_file_type to $to_file_type";
                                }
                                if (($from_mode_oct & 0777) != ($to_mode_oct & 0777)) {
@@ -2992,7 +2996,7 @@ sub git_project_index {
 
        foreach my $pr (@projects) {
                if (!exists $pr->{'owner'}) {
-                       $pr->{'owner'} = get_file_owner("$projectroot/$project");
+                       $pr->{'owner'} = get_file_owner("$projectroot/$pr->{'path'}");
                }
 
                my ($path, $owner) = ($pr->{'path'}, $pr->{'owner'});
This page took 0.192115 seconds and 4 git commands to generate.