summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormorkt <>2015-01-27 12:33:30 +0100
committerYorhel <git@yorhel.nl>2015-01-27 12:33:30 +0100
commit36d749dbb1a5b0ba48babf5c8767962e1b7f84d9 (patch)
treef0e699baeb312bb7c022bd88829fa1477d8c7426
parentf7232a44e53692eda370b55cf64a03ededcfe40a (diff)
staff: Fix various parts to recognize the new staff database
-rw-r--r--data/lang.txt3
-rw-r--r--lib/VNDB/Handler/Misc.pm3
-rw-r--r--lib/VNDB/Handler/VNBrowse.pm2
-rw-r--r--lib/VNDB/Util/CommonHTML.pm4
-rw-r--r--lib/VNDBUtil.pm4
5 files changed, 10 insertions, 6 deletions
diff --git a/data/lang.txt b/data/lang.txt
index c219a707..c1d77bc8 100644
--- a/data/lang.txt
+++ b/data/lang.txt
@@ -4227,6 +4227,9 @@ tr : Sadece yapımcılar
uk : Лише компанії
it : Solo editori
+:_hist_filter_onlystaff
+en : Only staff
+
:_hist_filter_onlychars
en : Only characters
ru : Только персонажи
diff --git a/lib/VNDB/Handler/Misc.pm b/lib/VNDB/Handler/Misc.pm
index 1540c5fe..7505028a 100644
--- a/lib/VNDB/Handler/Misc.pm
+++ b/lib/VNDB/Handler/Misc.pm
@@ -195,7 +195,7 @@ sub history {
{ get => 'p', required => 0, default => 1, template => 'int' },
{ get => 'm', required => 0, default => !$type, enum => [ 0, 1 ] },
{ get => 'h', required => 0, default => 0, enum => [ -1..1 ] },
- { get => 't', required => 0, default => '', enum => [qw|v r p c a|] },
+ { get => 't', required => 0, default => '', enum => [qw|v r p c s a|] },
{ get => 'e', required => 0, default => 0, enum => [ -1..1 ] },
{ get => 'r', required => 0, default => 0, enum => [ 0, 1 ] },
);
@@ -261,6 +261,7 @@ sub history {
a $f->{t} eq 'v' ? (class => 'optselected') : (), href => $u->(t => 'v'), mt '_hist_filter_onlyvn';
a $f->{t} eq 'r' ? (class => 'optselected') : (), href => $u->(t => 'r'), mt '_hist_filter_onlyreleases';
a $f->{t} eq 'p' ? (class => 'optselected') : (), href => $u->(t => 'p'), mt '_hist_filter_onlyproducers';
+ a $f->{t} eq 's' ? (class => 'optselected') : (), href => $u->(t => 's'), mt '_hist_filter_onlystaff';
a $f->{t} eq 'c' ? (class => 'optselected') : (), href => $u->(t => 'c'), mt '_hist_filter_onlychars';
a $f->{t} eq 'a' ? (class => 'optselected') : (), href => $u->(t => 'a'), mt '_hist_filter_nochars';
end;
diff --git a/lib/VNDB/Handler/VNBrowse.pm b/lib/VNDB/Handler/VNBrowse.pm
index 7af01048..3323722c 100644
--- a/lib/VNDB/Handler/VNBrowse.pm
+++ b/lib/VNDB/Handler/VNBrowse.pm
@@ -45,7 +45,7 @@ sub list {
$f->{wish} = $read_write_pref->('wish', 'vn_list_wish');
return $self->resRedirect('/'.$1.$2.(!$3 ? '' : $1 eq 'd' ? '#'.$3 : '.'.$3), 'temp')
- if $f->{q} && $f->{q} =~ /^([gvrptudci])([0-9]+)(?:\.([0-9]+))?$/;
+ if $f->{q} && $f->{q} =~ /^([gvrptudcis])([0-9]+)(?:\.([0-9]+))?$/;
$f->{s} = 'title' if $f->{fil} !~ /tag_inc-/ && $f->{s} eq 'tagscore';
$f->{o} = $f->{s} eq 'tagscore' ? 'd' : 'a' if !$f->{o};
diff --git a/lib/VNDB/Util/CommonHTML.pm b/lib/VNDB/Util/CommonHTML.pm
index d535472d..7b3fa673 100644
--- a/lib/VNDB/Util/CommonHTML.pm
+++ b/lib/VNDB/Util/CommonHTML.pm
@@ -132,7 +132,7 @@ sub htmlDenied {
sub htmlHiddenMessage {
my($self, $type, $obj) = @_;
return 0 if !$obj->{hidden};
- my $board = $type eq 'c' ? 'db' : $type eq 'r' ? 'v'.$obj->{vn}[0]{vid} : $type.$obj->{id};
+ my $board = $type =~ /[cs]/ ? 'db' : $type eq 'r' ? 'v'.$obj->{vn}[0]{vid} : $type.$obj->{id};
# fetch edit summary (not present in $obj because the changes aren't fetched)
my $editsum = $type eq 'v' ? $self->dbVNGet(id => $obj->{id}, what => 'changes')->[0]{comments}
: $type eq 'r' ? $self->dbReleaseGet(id => $obj->{id}, what => 'changes')->[0]{comments}
@@ -303,7 +303,7 @@ sub htmlEditMessage {
ul;
li; lit mt '_editmsg_msg_guidelines', "/d$guidelines"; end;
if($obj) {
- li; lit mt '_editmsg_msg_discuss', $type eq 'c' ? '/t/db' : $type eq 'r' ? "/t/v$obj->{vn}[0]{vid}" : "/t/$type$obj->{id}"; end;
+ li; lit mt '_editmsg_msg_discuss', $type =~ /[cs]/ ? '/t/db' : $type eq 'r' ? "/t/v$obj->{vn}[0]{vid}" : "/t/$type$obj->{id}"; end;
li; lit mt '_editmsg_msg_history', "/$type$obj->{id}/hist"; end;
} elsif($type ne 'r') {
li; lit mt '_editmsg_msg_search', "/$type/all", $num; end;
diff --git a/lib/VNDBUtil.pm b/lib/VNDBUtil.pm
index c864fda9..82da52e6 100644
--- a/lib/VNDBUtil.pm
+++ b/lib/VNDBUtil.pm
@@ -56,8 +56,8 @@ sub bb2html {
while($raw =~ m{(
(d[1-9][0-9]*\.[1-9][0-9]*\.[1-9][0-9]*) | # 2. longid
- ([tdvprc][1-9][0-9]*\.[1-9][0-9]*) | # 3. exid
- ([tdvprcugi][1-9][0-9]*) | # 4. id
+ ([tdvprcs][1-9][0-9]*\.[1-9][0-9]*) | # 3. exid
+ ([tdvprcsugi][1-9][0-9]*) | # 4. id
(\[[^\s\]]+\]) | # 5. tag
((?:https?|ftp)://[^><"\n\s\]\[]+[\d\w=/-]) # 6. url
)}xg) {