aboutsummaryrefslogtreecommitdiffstats
path: root/web/nms.gathering.org/api/private/comment-change
diff options
context:
space:
mode:
authorKristian Lyngstol <kristian@bohemians.org>2016-03-13 22:04:00 +0100
committerKristian Lyngstol <kristian@bohemians.org>2016-03-13 22:04:00 +0100
commita57fe6b9a707222e0ca1b4e18a542b5b179e6b72 (patch)
treed342d858c8e142dafb76bb5d326ec1ebb3e040b3 /web/nms.gathering.org/api/private/comment-change
parent8a89ee32f56e37848ad29be033b095c46b7ce9e3 (diff)
parentfe776bbc6f2e62436acea72f2f3bf027a6138ed8 (diff)
Merge branch 'master' of github.com:tech-server/tgmanage
Diffstat (limited to 'web/nms.gathering.org/api/private/comment-change')
-rwxr-xr-xweb/nms.gathering.org/api/private/comment-change10
1 files changed, 7 insertions, 3 deletions
diff --git a/web/nms.gathering.org/api/private/comment-change b/web/nms.gathering.org/api/private/comment-change
index ccf336d..fb7da54 100755
--- a/web/nms.gathering.org/api/private/comment-change
+++ b/web/nms.gathering.org/api/private/comment-change
@@ -3,12 +3,16 @@
use lib '../../../../include';
use utf8;
use nms;
-use nms::web;
+use nms::web qw($dbh db_safe_quote get_input finalize_output);
+
use strict;
use warnings;
-my $id = db_safe_quote('comment');
-my $state = db_safe_quote('state');
+my $in = get_input();
+my %tmp = %{JSON::XS::decode_json($in)};
+
+my $id = $dbh->quote($tmp{'comment'});
+my $state = $dbh->quote($tmp{'state'});
my $q = $nms::web::dbh->prepare("UPDATE switch_comments SET state = " . $state . " WHERE id = " . $id . ";");
$q->execute();