summaryrefslogtreecommitdiff
path: root/lib/VNDB/DB/Tags.pm
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2019-06-26 13:03:27 +0200
committerYorhel <git@yorhel.nl>2019-06-26 13:03:27 +0200
commit7eacaba4ab19e4a57d02e0ac35f66bb10e85823a (patch)
treead974f84925b73ccf5c25b305219ef996528a278 /lib/VNDB/DB/Tags.pm
parent8972da44acdc5fa4e053f32a184430fb0bdf9e80 (diff)
Re-add tag vote deletion moderation feature
Diffstat (limited to 'lib/VNDB/DB/Tags.pm')
-rw-r--r--lib/VNDB/DB/Tags.pm8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/VNDB/DB/Tags.pm b/lib/VNDB/DB/Tags.pm
index dc542ff8..97852724 100644
--- a/lib/VNDB/DB/Tags.pm
+++ b/lib/VNDB/DB/Tags.pm
@@ -5,7 +5,7 @@ use strict;
use warnings;
use Exporter 'import';
-our @EXPORT = qw|dbTagGet dbTTTree dbTagEdit dbTagAdd dbTagMerge dbTagLinks dbTagLinkEdit dbTagStats|;
+our @EXPORT = qw|dbTagGet dbTTTree dbTagEdit dbTagAdd dbTagMerge dbTagLinks dbTagLinkEdit dbTagStats dbTagWipeVotes|;
# %options->{ id noid name search state searchable applicable page results what sort reverse }
@@ -275,5 +275,11 @@ sub dbTagStats {
return wantarray ? ($r, $np) : $r;
}
+
+# Deletes all votes on a tag.
+sub dbTagWipeVotes {
+ $_[0]->dbExec('DELETE FROM tags_vn WHERE tag = ?', $_[1])
+}
+
1;