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