diff options
author | Yorhel <git@yorhel.nl> | 2020-03-05 13:50:54 +0100 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2020-03-05 13:50:54 +0100 |
commit | 7c4fbd11d23a735a14cb04a36de264f82e8f94d3 (patch) | |
tree | 554aeb3ffd174a456997f46dbc2400ad18bc0e7a /lib/VNWeb | |
parent | 47b15c59ecfc80c3d35509039d6cdd41af939a0f (diff) |
RelEdit: Don't fill out gtin, catalog and links when copying an entry
Diffstat (limited to 'lib/VNWeb')
-rw-r--r-- | lib/VNWeb/Releases/Edit.pm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/VNWeb/Releases/Edit.pm b/lib/VNWeb/Releases/Edit.pm index 802f8370..02e7a537 100644 --- a/lib/VNWeb/Releases/Edit.pm +++ b/lib/VNWeb/Releases/Edit.pm @@ -80,6 +80,12 @@ TUWF::get qr{/$RE{rrev}/(?<action>edit|copy)} => sub { enrich_merge vid => 'SELECT id AS vid, title FROM vn WHERE id IN', $e->{vn}; enrich_merge pid => 'SELECT id AS pid, name FROM producers WHERE id IN', $e->{producers}; + if($copy) { + $e->{gtin} = 0; + $e->{catalog} = 0; + $e->{extlinks} = empty_extlinks 'r'; + } + my $title = ($copy ? 'Copy ' : 'Edit ').$e->{title}; framework_ title => $title, type => 'r', dbobj => $e, tab => tuwf->capture('action'), sub { |