summaryrefslogtreecommitdiff
path: root/lib/VNDB/Handler/Misc.pm
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2010-01-24 09:45:02 +0100
committerYorhel <git@yorhel.nl>2010-01-24 09:45:02 +0100
commitd2dd07de4e0d9b8c00cd2db49aa2e7c0a5150bbc (patch)
tree4fc891330f8d7d513e1d22b1599880da304cdcd0 /lib/VNDB/Handler/Misc.pm
parent0f35ebbfc2cb4f8da4975ded1331bb80f408ccad (diff)
Versioned the deleting and locking of database entries
This is implemented by adding ihid (item hidden) and ilock (item locked) columns to the changes table, The (vn|release|producer).(hidden|locked) columns now work as a cache, refering to the changes.(ihid|ilock) columns with changes.id = (vn|release|producer).latest. The cached columns are updated automatically each time a new revision is inserted. This is a pretty large change, bugs are quite likely.
Diffstat (limited to 'lib/VNDB/Handler/Misc.pm')
-rw-r--r--lib/VNDB/Handler/Misc.pm16
1 files changed, 0 insertions, 16 deletions
diff --git a/lib/VNDB/Handler/Misc.pm b/lib/VNDB/Handler/Misc.pm
index 625b0463..820f34cd 100644
--- a/lib/VNDB/Handler/Misc.pm
+++ b/lib/VNDB/Handler/Misc.pm
@@ -14,7 +14,6 @@ YAWF::register(
qr{(?:([upvr])([1-9]\d*)/)?hist}, \&history,
qr{d([1-9]\d*)}, \&docpage,
qr{nospam}, \&nospam,
- qr{([vrp])([1-9]\d*)/(lock|hide)}, \&itemmod,
qr{we-dont-like-ie6}, \&ie6message,
qr{opensearch\.xml}, \&opensearch,
@@ -336,21 +335,6 @@ sub nospam {
}
-# /hide and /lock for v/r/p+ pages
-sub itemmod {
- my($self, $type, $iid, $act) = @_;
- return $self->htmlDenied if !$self->authCan($act eq 'hide' ? 'del' : 'lock');
-
- my $obj = $type eq 'v' ? $self->dbVNGet(id => $iid)->[0] :
- $type eq 'r' ? $self->dbReleaseGet(id => $iid, what => 'extended')->[0] :
- $self->dbProducerGet(id => $iid, what => 'extended')->[0];
- return 404 if !$obj->{id};
-
- $self->dbItemMod($type, $iid, $act eq 'hide' ? (hidden => !$obj->{hidden}) : (locked => !$obj->{locked}));
- $self->resRedirect("/$type$iid", 'temp');
-}
-
-
sub ie6message {
my $self = shift;