gitweb: Quote hash keys, and do not use barewords keys
Ensure that in all references to an element of a hash, the key is singlequoted, instead of using bareword: use $hash{'key'} instead of $hash{key} Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
Jakub Narebski committed
Apr 1, 2007 at 22:22 UTC
3be8e720d95f8d040dbfdd8a579616a9423280df
1 file changed
+8
-8
gitweb/gitweb.perl
+8
-8
@@ -19,7 +19,7 @@ use File::Basename qw(basename);
19
binmode STDOUT, ':utf8';
20
21
BEGIN {
22
- CGI->compile() if $ENV{MOD_PERL};
22
+ CGI->compile() if $ENV{'MOD_PERL'};
23
}
24
25
our $cgi = new CGI;
@@ -1870,16 +1870,16 @@ sub git_print_page_nav {
1870
my %arg = map { $_ => {action=>$_} } @navs;
1871
if (defined $head) {
1872
for (qw(commit commitdiff)) {
1873
- $arg{$_}{hash} = $head;
1873
+ $arg{$_}{'hash'} = $head;
1874
}
1875
if ($current =~ m/^(tree | log | shortlog | commit | commitdiff | search)$/x) {
1876
for (qw(shortlog log)) {
1877
- $arg{$_}{hash} = $head;
1877
+ $arg{$_}{'hash'} = $head;
1878
}
1879
}
1880
}
1881
- $arg{tree}{hash} = $treehead if defined $treehead;
1882
- $arg{tree}{hash_base} = $treebase if defined $treebase;
1881
+ $arg{'tree'}{'hash'} = $treehead if defined $treehead;
1882
+ $arg{'tree'}{'hash_base'} = $treebase if defined $treebase;
1883
1884
print "<div class=\"page_nav\">\n" .
1885
(join " | ",
@@ -1927,9 +1927,9 @@ sub git_print_header_div {
1927
my ($action, $title, $hash, $hash_base) = @_;
1928
my %args = ();
1929
1930
- $args{action} = $action;
1931
- $args{hash} = $hash if $hash;
1932
- $args{hash_base} = $hash_base if $hash_base;
1930
+ $args{'action'} = $action;
1931
+ $args{'hash'} = $hash if $hash;
1932
+ $args{'hash_base'} = $hash_base if $hash_base;
1933
1934
print "<div class=\"header\">\n" .
1935
$cgi->a({-href => href(%args), -class => "title"},