File: 0008-gitweb-make-logo-optional.diff

package info (click to toggle)
git 1%3A1.7.2.5-3
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 18,036 kB
  • ctags: 13,298
  • sloc: ansic: 108,217; sh: 74,973; perl: 23,370; tcl: 20,137; python: 3,843; makefile: 2,885; lisp: 1,779; asm: 98
file content (39 lines) | stat: -rw-r--r-- 1,389 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
From dbae6a14bba60bf920f59b8a306364fa3c6986a9 Mon Sep 17 00:00:00 2001
From: Jonathan Nieder <jrnieder@gmail.com>
Date: Fri, 3 Sep 2010 19:45:09 -0500
Subject: gitweb: make logo optional

Some sites may not want to have a logo at all.  In particular,
git instaweb can benefit from this.

Cc: Jakub Narebski <jnareb@gmail.com>
Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
 gitweb/gitweb.perl |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index e8aa47a..813fd62 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -3496,10 +3496,12 @@ EOF
 		insert_file($site_header);
 	}
 
-	print "<div class=\"page_header\">\n" .
-	      $cgi->a({-href => esc_url($logo_url),
-	               -title => $logo_label},
-	              qq(<img src=").esc_url($logo).qq(" width="72" height="27" alt="git" class="logo"/>));
+	print "<div class=\"page_header\">\n";
+	if (defined $logo) {
+		print $cgi->a({-href => esc_url($logo_url),
+		               -title => $logo_label},
+		              qq(<img src=").esc_url($logo).qq(" width="72" height="27" alt="git" class="logo"/>));
+	}
 	print $cgi->a({-href => esc_url($home_link)}, $home_link_str) . " / ";
 	if (defined $project) {
 		print $cgi->a({-href => href(action=>"summary")}, esc_html($project));
-- 
1.7.4.1