]> git.sesse.net Git - itkacl/blob - itkacl-web-1.0/web/change-comment.pl
Add the bare minimum of what is required for the web interface to work (but be butt...
[itkacl] / itkacl-web-1.0 / web / change-comment.pl
1 #! /usr/bin/perl -T
2 use strict;
3 use warnings;
4 use utf8;
5
6 use lib '../include';
7 use itkaclcommon;
8
9 itkaclcommon::init();
10
11 my $entry = $itkaclcommon::cgi->param('entry');
12 my $entity = $itkaclcommon::cgi->param('entity');
13 my $entity_type = $itkaclcommon::cgi->param('entity_type');
14 my $comment = $itkaclcommon::cgi->param('comment');
15
16 $itkaclcommon::dbh->do('UPDATE aclentries SET comment=? WHERE object=? AND entity_type=? AND entity=?', undef,
17     $comment, $entry, $entity_type, $entity)
18         or die "Couldn't change comment";
19
20 print $itkaclcommon::cgi->header(-type=>'text/plain');
21 print "OK\n";