X-Git-Url: https://git.ladys.computer/Gitweb/blobdiff_plain/47663ba66c8948081a83fc72c9ab3fed983b7678f4058fc2645ebb2b301077a2..9942474cf9d36f1bf24a061720b9a27f68291e977ea43330a9e1e85f2b535126:/gitweb.perl diff --git a/gitweb.perl b/gitweb.perl index 9e4bd61..bebb1a3 100755 --- a/gitweb.perl +++ b/gitweb.perl @@ -973,11 +973,16 @@ if ($action !~ m/^(?:opml|project_list|project_index)$/ && die_error(400, "Project needed"); } $actions{$action}->(); -exit; +DONE_GITWEB: +1; ## ====================================================================== ## 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 +999,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 @@ -2217,8 +2223,7 @@ sub config_to_multi { sub git_get_project_config { my ($key, $type) = @_; - # do we have project - return unless (defined $project && defined $git_dir); + return unless defined $git_dir; # key sanity check return unless ($key); @@ -3429,7 +3434,7 @@ EOF print "\n"; git_footer_html(); - exit; + goto DONE_GITWEB; } ## ----------------------------------------------------------------------