summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2009-07-04 18:16:46 +0200
committerYorhel <git@yorhel.nl>2009-07-04 18:16:46 +0200
commit70d87e3330639295fb656495c2afa1ca258d0867 (patch)
tree75f7548a377367e66bdbf39e9ca4060390df7fca /lib
parent5c0143d7da6e57b8040396ee2681f8251a3c88ef (diff)
Automatically fill out title and original title fiels on add release
<eyeless> Yorhel: Please make fields "title" and "original title" filled automatically when adding a release of vn <Yorhel> finally an easy request!
Diffstat (limited to 'lib')
-rw-r--r--lib/VNDB/Handler/Releases.pm2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/VNDB/Handler/Releases.pm b/lib/VNDB/Handler/Releases.pm
index 6b9de1f0..cc3f56bc 100644
--- a/lib/VNDB/Handler/Releases.pm
+++ b/lib/VNDB/Handler/Releases.pm
@@ -365,6 +365,8 @@ sub edit {
$frm->{languages} = ['ja'] if !$rid && !defined $frm->{languages};
$frm->{editsum} = sprintf 'Reverted to revision r%d.%d', $rid, $rev if !$copy && $rev && !defined $frm->{editsum};
$frm->{editsum} = sprintf 'New release based on r%d.%d', $rid, $r->{rev} if $copy && !defined $frm->{editsum};
+ $frm->{title} = $v->{title} if !defined $frm->{title} && !$r;
+ $frm->{original} = $v->{original} if !defined $frm->{original} && !$r;
$self->htmlHeader(js => 'forms', title => $rid ? ''.($copy ? 'Copy ':'Edit ').$r->{title} : 'Add release to '.$v->{title}, noindex => 1);
$self->htmlMainTabs('r', $r, $copy ? 'copy' : 'edit') if $rid;