Skip to content

Commit

Permalink
Merge pull request #221 from gullyn/show-copyvio-url
Browse files Browse the repository at this point in the history
Show copyvio url when not selecting speedy deletion
  • Loading branch information
IngenuityWP committed Sep 10, 2022
2 parents fc3e7db + f0e559e commit f27f961
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions src/modules/submissions.js
Expand Up @@ -2433,19 +2433,21 @@
}

// Copyright violations get {{db-g12}}'d as well
if ( ( declineReason === 'cv' || declineReason2 === 'cv' ) && data.csdSubmission ) {
if ( declineReason === 'cv' || declineReason2 === 'cv' ) {
var cvUrls = data.cvUrlTextarea.split( '\n' ).slice( 0, 3 ),
urlParam = '';

// Build url param for db-g12 template
urlParam = cvUrls[ 0 ];
if ( cvUrls.length > 1 ) {
urlParam += '|url2=' + cvUrls[ 1 ];
if ( cvUrls.length > 2 ) {
urlParam += '|url3=' + cvUrls[ 2 ];
if ( data.csdSubmission ) {
// Build url param for db-g12 template
urlParam = cvUrls[ 0 ];
if ( cvUrls.length > 1 ) {
urlParam += '|url2=' + cvUrls[ 1 ];
if ( cvUrls.length > 2 ) {
urlParam += '|url3=' + cvUrls[ 2 ];
}
}
text.prepend( '{{db-g12|url=' + urlParam + ( afchPage.additionalData.revId ? '|oldid=' + afchPage.additionalData.revId : '' ) + '}}\n' );
}
text.prepend( '{{db-g12|url=' + urlParam + ( afchPage.additionalData.revId ? '|oldid=' + afchPage.additionalData.revId : '' ) + '}}\n' );

// Include the URLs in the decline template
if ( declineReason === 'cv' ) {
Expand Down

0 comments on commit f27f961

Please sign in to comment.