2 # (c) Petr Baudis <pasky@suse.cz>
15 my $pname = $cgi->param('p');
16 my $ctags = $cgi->param('t');
19 my $proj = Girocco
::Project
->load($pname);
21 print $cgi->header(-status
=>404);
22 print "Project $pname does not exist.";
26 if ($ctags =~ /[^ a-zA-Z0-9:.+#_-]/) {
27 print $cgi->header(-status
=>403);
28 print "Content tag(s) '$ctags' contain evil characters.";
32 foreach my $ctag (split(/ /, $ctags)) {
33 # Locking is not important
35 open CT
, $proj->{path
}."/ctags/$ctag" and $val = <CT
> and close CT
;
37 open CT
, '>'.$proj->{path
}."/ctags/$ctag" and print CT
($val+1)."\n" and close CT
;
40 print $cgi->header(-status
=>303, -location
=>"$Girocco::Config::gitweburl/$pname.git");