summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 59e3b14)
raw | patch | inline | side by side (parent: 59e3b14)
author | Jakub Narebski <jnareb@gmail.com> | |
Sun, 19 Nov 2006 14:05:21 +0000 (15:05 +0100) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Tue, 21 Nov 2006 22:35:41 +0000 (14:35 -0800) |
href subroutine by default generates absolute URL (generated using
CGI::url(-absolute=>1), and saved in $my_uri) using $my_uri as base;
add an option to generate full URL using $my_url as base.
New feature usage: href(..., -full=>1)
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
CGI::url(-absolute=>1), and saved in $my_uri) using $my_uri as base;
add an option to generate full URL using $my_url as base.
New feature usage: href(..., -full=>1)
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
gitweb/gitweb.perl | patch | blob | history |
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 5875ba0846a342e80179aab66abe46a87fcc1fc8..873950126a8f2ba4125622c3b73498107cb7bce2 100755 (executable)
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
sub href(%) {
my %params = @_;
- my $href = $my_uri;
+ # default is to use -absolute url() i.e. $my_uri
+ my $href = $params{-full} ? $my_url : $my_uri;
# XXX: Warning: If you touch this, check the search form for updating,
# too.