gitweb: Use single implementation of export_ok check.
GitWeb source contains a special function that implements the export_ok check, but validate_project still uses a separate copy of essentially the same code. This patch makes it use the dedicated function, thus ensuring that all checks are done through a single code path. Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com> Acked-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Alexander Gavrilov committed
Nov 6, 2008 at 01:15 UTC
ec26f098a6593bbd9d396fb7ee74368cdd3eeed3
1 file changed
+1
-2
gitweb/gitweb.perl
+1
-2
@@ -853,8 +853,7 @@ sub validate_project {
853
my $input = shift || return undef;
854
if (!validate_pathname($input) ||
855
!(-d "$projectroot/$input") ||
856
- !check_head_link("$projectroot/$input") ||
857
- ($export_ok && !(-e "$projectroot/$input/$export_ok")) ||
856
+ !check_export_ok("$projectroot/$input") ||
857
($strict_export && !project_in_list($input))) {
858
return undef;
859
} else {