Bug 40037: Remove redundant check in `notices_content` hook handling
I reused an implemented hook in C4::Letters and overlooked the
redundancy in it. This patch clears that.
To test:
1. Run:
$ ktd --shell
k$ prove t/db_dependent/Koha/Plugins/Notices_content_hook.t
=> SUCCESS: Tests pass
2. Apply this patch
3. Repeat 1
=> SUCCESS: Tests pass! No behavior change!
4. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 17d02662c4)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This commit is contained in:
parent
3d8a10a53b
commit
1a93081bf2
|
|
@ -631,18 +631,16 @@ sub GetPreparedLetter {
|
|||
}
|
||||
);
|
||||
|
||||
if (@plugins) {
|
||||
foreach my $plugin (@plugins) {
|
||||
my $namespace = $plugin->get_metadata()->{namespace};
|
||||
if ($namespace) {
|
||||
try {
|
||||
if ( my $content = $plugin->notices_content( \%params ) ) {
|
||||
$objects->{plugin_content}->{$namespace} = $content;
|
||||
}
|
||||
} catch {
|
||||
next;
|
||||
};
|
||||
}
|
||||
foreach my $plugin (@plugins) {
|
||||
my $namespace = $plugin->get_metadata()->{namespace};
|
||||
if ($namespace) {
|
||||
try {
|
||||
if ( my $content = $plugin->notices_content( \%params ) ) {
|
||||
$objects->{plugin_content}->{$namespace} = $content;
|
||||
}
|
||||
} catch {
|
||||
next;
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue