]> Lady’s Gitweb - Gitweb/blobdiff - gitweb.perl
gitweb: href(..., -path_info => 0|1)
[Gitweb] / gitweb.perl
index d2bb028a66e95965b0304cd801b0bf6cc2432a0550233c2ad5e5cc5c8f4f11f5..875e98272f8b2126a05f063c778b7dd1bc5a9d172cd47cf316137812562c440d 100755 (executable)
@@ -978,6 +978,10 @@ exit;
 ## ======================================================================
 ## action links
 
+# possible values of extra options
+# -full => 0|1      - use absolute/full URL ($my_uri/$my_url as base)
+# -replay => 1      - start from a current view (replay with modifications)
+# -path_info => 0|1 - don't use/use path_info URL (if possible)
 sub href {
        my %params = @_;
        # default is to use -absolute url() i.e. $my_uri
@@ -994,7 +998,8 @@ sub href {
        }
 
        my $use_pathinfo = gitweb_check_feature('pathinfo');
-       if ($use_pathinfo and defined $params{'project'}) {
+       if (defined $params{'project'} &&
+           (exists $params{-path_info} ? $params{-path_info} : $use_pathinfo)) {
                # try to put as many parameters as possible in PATH_INFO:
                #   - project name
                #   - action
This page took 0.21362 seconds and 4 git commands to generate.