From ee4b8faf0125f86af424ca0300b47b535578e1f2 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Mon, 18 Mar 2024 13:46:26 +0000 Subject: [PATCH] Bug 29392: Improve hook consistency. It would appear we've adopted 'payload' for passing additional data into action hooks. --- authorities/merge.pl | 12 +++++++----- cataloguing/merge.pl | 12 +++++++----- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/authorities/merge.pl b/authorities/merge.pl index aeaed31649f..f1470c4c3c3 100755 --- a/authorities/merge.pl +++ b/authorities/merge.pl @@ -79,11 +79,13 @@ if ($op eq 'cud-merge') { Koha::Plugins->call( 'before_authority_action', { - action => 'merge', - authority => $authority, - authority_id => $recordid1, - record => $record, - merged_authority_ids => [$recordid2], + action => 'merge', + payload => { + authority => $authority, + authority_id => $recordid1, + record => $record, + merged_authority_ids => [$recordid2], + } } ); diff --git a/cataloguing/merge.pl b/cataloguing/merge.pl index a872368e79a..c3e2a17bc7e 100755 --- a/cataloguing/merge.pl +++ b/cataloguing/merge.pl @@ -72,11 +72,13 @@ if ($op eq 'cud-merge') { Koha::Plugins->call( 'before_biblio_action', { - action => 'merge', - biblio => $biblio, - biblio_id => $ref_biblionumber, - record => $record, - merged_biblio_ids => \@biblionumbers + action => 'merge', + payload => { + biblio => $biblio, + biblio_id => $ref_biblionumber, + record => $record, + merged_biblio_ids => \@biblionumbers + } } ); -- 2.44.0