[PATCH] gitweb: support for / as home_link.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>
---
 gitweb/gitweb.perl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index a022569..0a0b37f 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -34,7 +34,7 @@ # location for temporary files needed fo
 our $git_temp = "/tmp/gitweb";
 
 # target of the home link on top of all pages
-our $home_link = $my_uri;
+our $home_link = $my_uri || "/";
 
 # string of the home link on top of all pages
 our $home_link_str = "++GITWEB_HOME_LINK_STR++";
-- 
1.4.2.rc2.gf055

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]