X-Git-Url: https://git.sesse.net/?p=itkacl;a=blobdiff_plain;f=itkacl-web-1.0%2Fweb%2Fchange-comment.pl;fp=itkacl-web-1.0%2Fweb%2Fchange-comment.pl;h=d92a6a51e1330692b997a6f6d9a07ac6782f5107;hp=0000000000000000000000000000000000000000;hb=e7130e30ca2a76082de68a72fb2a52b4510f7bf1;hpb=b9014762b8051b457c68d8de11a08d64401026fa diff --git a/itkacl-web-1.0/web/change-comment.pl b/itkacl-web-1.0/web/change-comment.pl new file mode 100755 index 0000000..d92a6a5 --- /dev/null +++ b/itkacl-web-1.0/web/change-comment.pl @@ -0,0 +1,21 @@ +#! /usr/bin/perl -T +use strict; +use warnings; +use utf8; + +use lib '../include'; +use itkaclcommon; + +itkaclcommon::init(); + +my $entry = $itkaclcommon::cgi->param('entry'); +my $entity = $itkaclcommon::cgi->param('entity'); +my $entity_type = $itkaclcommon::cgi->param('entity_type'); +my $comment = $itkaclcommon::cgi->param('comment'); + +$itkaclcommon::dbh->do('UPDATE aclentries SET comment=? WHERE object=? AND entity_type=? AND entity=?', undef, + $comment, $entry, $entity_type, $entity) + or die "Couldn't change comment"; + +print $itkaclcommon::cgi->header(-type=>'text/plain'); +print "OK\n";