Bug 40934: (follow-up) --code and --exclude-code should be mutually exclusive
Both options were being accepted but only the last one in the command line was being applied. Now they are mutually exclusive like --category and --skip-category in longoverdue.pl. Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
This commit is contained in:
parent
3430793f07
commit
e6908ef0a7
|
|
@ -75,6 +75,10 @@ ENDUSAGE
|
|||
|
||||
die $usage if $help;
|
||||
|
||||
if ( @letter_code && @exclude_letter_code ) {
|
||||
die "The options --code and --exclude-code are mutually exclusive.\nUse one or the other.\n" . $usage;
|
||||
}
|
||||
|
||||
my $script_handler = Koha::Script->new( { script => $0 } );
|
||||
|
||||
try {
|
||||
|
|
@ -88,7 +92,7 @@ try {
|
|||
};
|
||||
|
||||
# Remove empty elements, see bug 37075
|
||||
@letter_code = grep { $_ ne q{} } @letter_code;
|
||||
@letter_code = grep { $_ ne q{} } @letter_code;
|
||||
@exclude_letter_code = grep { $_ ne q{} } @exclude_letter_code;
|
||||
|
||||
C4::Letters::SendQueuedMessages(
|
||||
|
|
|
|||
Loading…
Reference in New Issue