Bugzilla – Attachment 127577 Details for
Bug 28692
Reduce DB action_log table size
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28962: (QA follow-up) Fix test for objects
Bug-28962-QA-follow-up-Fix-test-for-objects.patch (text/plain), 1.29 KB, created by
Marcel de Rooy
on 2021-11-12 10:52:34 UTC
(
hide
)
Description:
Bug 28962: (QA follow-up) Fix test for objects
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2021-11-12 10:52:34 UTC
Size:
1.29 KB
patch
obsolete
>From eb5d200816a370391148899e1f2f77d927f7d444 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Fri, 12 Nov 2021 10:40:32 +0000 >Subject: [PATCH] Bug 28962: (QA follow-up) Fix test for objects >Content-Type: text/plain; charset=utf-8 > >Simpler to check the ref instead of isa. >Fix the bug where object is first stringified and then tested for >being a Koha::Item. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > C4/Log.pm | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > >diff --git a/C4/Log.pm b/C4/Log.pm >index 3f1255b25e..26fcad526c 100644 >--- a/C4/Log.pm >+++ b/C4/Log.pm >@@ -77,12 +77,13 @@ sub logaction { > $usernumber ||= 0; > $interface //= C4::Context->interface; > >- if ( ref($infos) && ref($infos) !~ /HASH|ARRAY/ && $infos->isa('Koha::Object') ) { >+ my $ref_type = ref($infos); >+ if( $ref_type =~ /^Koha::/ ) { > $infos = $infos->get_from_storage if $infos->in_storage; > local $Data::Dumper::Sortkeys = 1; > $infos = Dumper( $infos->unblessed ); > >- if ( $infos->isa('Koha::Item') && $modulename eq 'CATALOGUING' && $actionname eq 'MODIFY' ) { >+ if( $ref_type eq 'Koha::Item' && $modulename eq 'CATALOGUING' && $actionname eq 'MODIFY' ) { > $infos = "item " . $infos; > } > } >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 28692
:
122683
|
122782
|
125692
|
127289
|
127446
|
127574
|
127575
|
127576
|
127577
|
127630
|
127639
|
127640
|
127641
|
127642
|
127645
|
127646
|
127647
|
127648
|
127649