Bugzilla – Attachment 95947 Details for
Bug 21761
Koha::Object supports passing through 'update' which means we can side step 'set' + 'store'
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21761: Call set + store as update
Bug-21761-Call-set--store-as-update.patch (text/plain), 1.20 KB, created by
Jonathan Druart
on 2019-12-03 15:03:35 UTC
(
hide
)
Description:
Bug 21761: Call set + store as update
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2019-12-03 15:03:35 UTC
Size:
1.20 KB
patch
obsolete
>From 1d5e49869e9bf41e8482952a13a65ad01ec41f9e Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Fri, 21 Jun 2019 16:47:55 +0100 >Subject: [PATCH] Bug 21761: Call set + store as update > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > Koha/Object.pm | 13 ++++++++++++- > 1 file changed, 12 insertions(+), 1 deletion(-) > >diff --git a/Koha/Object.pm b/Koha/Object.pm >index a92e870c40..8e7a235031 100644 >--- a/Koha/Object.pm >+++ b/Koha/Object.pm >@@ -191,6 +191,17 @@ sub store { > } > } > >+=head3 $object->update(); >+ >+A shortcut for set + store in one call. >+ >+=cut >+ >+sub update { >+ my ($self, $values) = @_; >+ return $self->set($values)->store();; >+} >+ > =head3 $object->delete(); > > Removes the object from storage. >@@ -491,7 +502,7 @@ sub AUTOLOAD { > } > } > >- my @known_methods = qw( is_changed id in_storage get_column discard_changes update make_column_dirty ); >+ my @known_methods = qw( is_changed id in_storage get_column discard_changes make_column_dirty ); > > Koha::Exceptions::Object::MethodNotCoveredByTests->throw( > error => sprintf("The method %s->%s is not covered by tests!", ref($self), $method), >-- >2.11.0
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 21761
:
86017
|
90914
|
95947
|
96136
|
96154
|
96155