summaryrefslogtreecommitdiff
path: root/bucky2/bin/move-comment
diff options
context:
space:
mode:
Diffstat (limited to 'bucky2/bin/move-comment')
-rwxr-xr-xbucky2/bin/move-comment18
1 files changed, 18 insertions, 0 deletions
diff --git a/bucky2/bin/move-comment b/bucky2/bin/move-comment
new file mode 100755
index 0000000..29c59ef
--- /dev/null
+++ b/bucky2/bin/move-comment
@@ -0,0 +1,18 @@
+#!/usr/bin/perl
+use strict;
+use lib "../lib";
+use Bucky;
+
+if (scalar(@ARGV) < 2) {
+ print "usage: move-comment id thread\n";
+ exit(1);
+}
+
+my $bucky = new Bucky;
+$bucky->db->update_by_id('comment', {
+ "id" => $ARGV[0],
+ "record" => {
+ "thread" => $ARGV[1]
+ }
+});
+