gitweb: Require project for almost all actions

Require that project (repository) is given for all actions except
project_list, project_index and opml.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Jakub Narebski 2006-09-19 21:53:22 +02:00 committed by Junio C Hamano
parent cd90e75ff4
commit d04d3d424b

View File

@ -352,6 +352,10 @@ if (defined $project) {
if (!defined($actions{$action})) {
die_error(undef, "Unknown action");
}
if ($action !~ m/^(opml|project_list|project_index)$/ &&
!$project) {
die_error(undef, "Project needed");
}
$actions{$action}->();
exit;