diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/VNDB/Handler/Discussions.pm | 3 | ||||
-rw-r--r-- | lib/VNDB/Handler/Tags.pm | 1 | ||||
-rw-r--r-- | lib/VNDB/Handler/VNEdit.pm | 2 | ||||
-rw-r--r-- | lib/VNDB/Plugin/TransAdmin.pm | 6 |
4 files changed, 8 insertions, 4 deletions
diff --git a/lib/VNDB/Handler/Discussions.pm b/lib/VNDB/Handler/Discussions.pm index 6f6cb385..a5064ad2 100644 --- a/lib/VNDB/Handler/Discussions.pm +++ b/lib/VNDB/Handler/Discussions.pm @@ -151,7 +151,8 @@ sub edit { # are we allowed to perform this action? return $self->htmlDenied if !$self->authCan('board') || ($tid && ($t->{locked} || $t->{hidden}) && !$self->authCan('boardmod')) - || ($num && $p->{uid} != $self->authInfo->{id} && !$self->authCan('boardmod')); + || ($num && $p->{uid} != $self->authInfo->{id} && !$self->authCan('boardmod')) + || ($num && $p->{uid} == $self->authInfo->{id} && $p->{hidden}); # check form etc... my $frm; diff --git a/lib/VNDB/Handler/Tags.pm b/lib/VNDB/Handler/Tags.pm index 2326ed17..3d698fc3 100644 --- a/lib/VNDB/Handler/Tags.pm +++ b/lib/VNDB/Handler/Tags.pm @@ -139,6 +139,7 @@ sub tagedit { $par = $self->dbTagGet(id => $tag)->[0]; return $self->resNotFound if !$par; $frm->{parents} = $par->{name}; + $frm->{cat} = $par->{cat}; $tag = undef; } diff --git a/lib/VNDB/Handler/VNEdit.pm b/lib/VNDB/Handler/VNEdit.pm index 82f7e169..ce564fc0 100644 --- a/lib/VNDB/Handler/VNEdit.pm +++ b/lib/VNDB/Handler/VNEdit.pm @@ -128,7 +128,7 @@ sub _uploadimage { # perform some elementary checks my $imgdata = $self->reqUploadRaw('img'); $frm->{_err} = [ 'noimage' ] if $imgdata !~ /^(\xff\xd8|\x89\x50)/; # JPG or PNG headers - $frm->{_err} = [ 'toolarge' ] if length($imgdata) > 512*1024; + $frm->{_err} = [ 'toolarge' ] if length($imgdata) > 5*1024*1024; return undef if $frm->{_err}; # get image ID and save it, to be processed by Multi diff --git a/lib/VNDB/Plugin/TransAdmin.pm b/lib/VNDB/Plugin/TransAdmin.pm index 19ce336e..5f3dd1bf 100644 --- a/lib/VNDB/Plugin/TransAdmin.pm +++ b/lib/VNDB/Plugin/TransAdmin.pm @@ -16,7 +16,7 @@ package VNDB::Plugin::TransAdmin; use strict; use warnings; -use TUWF ':html', 'uri_escape'; +use TUWF ':html', 'uri_escape', 'html_escape'; use LangFile; use VNDB::Func; @@ -216,7 +216,9 @@ sub _section { my(undef, $key, $en, $sync, $tl) = @$l; b class => $sync ? 'grayedout' : 'standout', ":$key"; br; - div style => 'margin-left: 25px; font: 12px Tahoma; width: 700px; overflow-x: auto; white-space: nowrap', $en; + div style => 'margin-left: 25px; font: 12px Tahoma; width: 700px; overflow-x: auto; white-space: nowrap'; + lit html_escape $en; + end; my $multi = $en =~ y/\n//; div style => 'width: 23px; float: left; text-align: right'; |