Bugzilla – Attachment 90027 Details for
Bug 22630
Add ability to change the homebranch in course reserves
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22630: Do not modify item fields if course reserve item says LEAVE UNCHANGED
Bug-22630-Do-not-modify-item-fields-if-course-rese.patch (text/plain), 1.34 KB, created by
Biblibre Sandboxes
on 2019-05-23 11:14:51 UTC
(
hide
)
Description:
Bug 22630: Do not modify item fields if course reserve item says LEAVE UNCHANGED
Filename:
MIME Type:
Creator:
Biblibre Sandboxes
Created:
2019-05-23 11:14:51 UTC
Size:
1.34 KB
patch
obsolete
>From 4993988b843c38c8026a34e8ac99e884c448b62e Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Tue, 14 May 2019 14:43:31 +0200 >Subject: [PATCH] Bug 22630: Do not modify item fields if course reserve item > says LEAVE UNCHANGED > >Signed-off-by: SONIA BOUIS <sonia.bouis@univ-lyon3.fr> > >Signed-off-by: SONIA BOUIS <sonia.bouis@univ-lyon3.fr> >--- > C4/CourseReserves.pm | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > >diff --git a/C4/CourseReserves.pm b/C4/CourseReserves.pm >index 0488dd4..e6ab9a8 100644 >--- a/C4/CourseReserves.pm >+++ b/C4/CourseReserves.pm >@@ -534,7 +534,9 @@ sub _UpdateCourseItem { > > my %mod_params; > foreach (@FIELDS) { >- $mod_params{$_} = $params{$_}; >+ if (defined $params{$_} and $params{$_} ne '') { >+ $mod_params{$_} = $params{$_}; >+ } > } > > ModItem( \%mod_params, undef, $course_item->{'itemnumber'} ); >@@ -589,7 +591,9 @@ sub _RevertFields { > > my $mod_item_params; > foreach my $field ( @FIELDS ) { >- $mod_item_params->{$field} = $course_item->{$field}; >+ if (defined $course_item->{$field} and $course_item->{$field} ne '') { >+ $mod_item_params->{$field} = $course_item->{$field}; >+ } > } > > ModItem( $mod_item_params, undef, $course_item->{'itemnumber'} ) if $mod_item_params && %$mod_item_params; >-- >2.7.4
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 22630
:
87355
|
87369
|
89037
|
89741
|
89742
|
89743
|
90023
|
90024
|
90025
|
90026
|
90027
|
90028
|
91177
|
91178
|
91179
|
91180
|
91575
|
91576
|
91577
|
91578
|
92579
|
92580
|
92603
|
92604
|
103556
|
103634
|
103635
|
103733
|
103734
|
103735
|
103736
|
105324