summaryrefslogtreecommitdiff
path: root/lib/VNDB/DB/Producers.pm
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2008-11-13 11:46:14 +0100
committerYorhel <git@yorhel.nl>2008-11-13 11:46:14 +0100
commitf83a65ae51cbb8cefc200227807ff6b22d5a7ee4 (patch)
tree07de95575abc2db2d1c24607c44d16d8ed1f95df /lib/VNDB/DB/Producers.pm
parent4a40309762165f68565fcbd5fad3a0cf69e452f6 (diff)
Locking and hiding producers works
Diffstat (limited to 'lib/VNDB/DB/Producers.pm')
-rw-r--r--lib/VNDB/DB/Producers.pm11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/VNDB/DB/Producers.pm b/lib/VNDB/DB/Producers.pm
index d8a46774..ada38ab8 100644
--- a/lib/VNDB/DB/Producers.pm
+++ b/lib/VNDB/DB/Producers.pm
@@ -5,7 +5,7 @@ use strict;
use warnings;
use Exporter 'import';
-our @EXPORT = qw|dbProducerGet|;
+our @EXPORT = qw|dbProducerGet dbProducerMod|;
# options: results, page, id, search, char, rev
@@ -79,4 +79,13 @@ sub dbProducerGet {
}
+# arguments: id, %options ->( hidden, locked )
+sub dbProducerMod {
+ my($self, $id, %o) = @_;
+ $self->dbExec('UPDATE producers !H WHERE id = ?', {
+ map { ($_.' = ?', int $o{$_}) } keys %o
+ }, $id);
+}
+
+
1;