gitweb: support for / as home_link.
If the webserver is configured to use gitweb even for the root directory of the site, then my_uri is empty which leads to a non-functional home link. Fix that by defaulting to "/" in this case. Signed-off-by: Martin Waitz <tali@admingilde.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
Martin Waitz committed
Aug 17, 2006 at 00:28 UTC
6132b7e4bbdbca14aff72d87784909810edefb82
1 file changed
+1
-1
gitweb/gitweb.perl
+1
-1
@@ -34,7 +34,7 @@ our $projectroot = "++GITWEB_PROJECTROOT++";
34
our $git_temp = "/tmp/gitweb";
35
36
# target of the home link on top of all pages
37
-our $home_link = $my_uri;
37
+our $home_link = $my_uri || "/";
38
39
# string of the home link on top of all pages
40
our $home_link_str = "++GITWEB_HOME_LINK_STR++";