Bugzilla – Attachment 18291 Details for
Bug 8215
Add Course Reserves
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
bug 8215: (followup) avoid SQL syntax error in logs
bug-8215-followup-avoid-SQL-syntax-error-in-logs.patch (text/plain), 2.12 KB, created by
Kyle M Hall (khall)
on 2013-05-21 20:27:10 UTC
(
hide
)
Description:
bug 8215: (followup) avoid SQL syntax error in logs
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2013-05-21 20:27:10 UTC
Size:
2.12 KB
patch
obsolete
>From 4613eb1d20793298cfc960be68ed51f790f57787 Mon Sep 17 00:00:00 2001 >From: Galen Charlton <gmc@esilibrary.com> >Date: Tue, 21 May 2013 10:12:15 -0700 >Subject: [PATCH] bug 8215: (followup) avoid SQL syntax error in logs > >ModItem currently will attempt to update an item >even if no field updates are specified. This patch >avoids (harmless) error messages in the Apache >logs if an item is not actually being changed when it >is placed or taken off reserve. > >Signed-off-by: Galen Charlton <gmc@esilibrary.com> >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > C4/CourseReserves.pm | 8 ++++---- > 1 files changed, 4 insertions(+), 4 deletions(-) > >diff --git a/C4/CourseReserves.pm b/C4/CourseReserves.pm >index 12b6375..39cd3d2 100644 >--- a/C4/CourseReserves.pm >+++ b/C4/CourseReserves.pm >@@ -568,7 +568,7 @@ sub _UpdateCourseItem { > $mod_params{$_} = $params{$_}; > } > } >- ModItem( \%mod_params, undef, $course_item->{'itemnumber'} ); >+ ModItem( \%mod_params, undef, $course_item->{'itemnumber'} ) if %mod_params; > > ## Update fields that didn't have an original value, but now do > ## We must save the original value in course_items, and also >@@ -583,7 +583,7 @@ sub _UpdateCourseItem { > } > } > _ModStoredFields( 'ci_id' => $params{'ci_id'}, %mod_params_old ); >- ModItem( \%mod_params_new, undef, $course_item->{'itemnumber'} ); >+ ModItem( \%mod_params_new, undef, $course_item->{'itemnumber'} ) if %mod_params_new; > > } > >@@ -648,7 +648,7 @@ sub _RevertFields { > } > } > } >- ModItem( $mod_item_params, undef, $course_item->{'itemnumber'} ); >+ ModItem( $mod_item_params, undef, $course_item->{'itemnumber'} ) if $mod_item_params && %$mod_item_params; > > my $query = "UPDATE course_items SET " . join( ',', map { "$_=NULL" } @fields_to_null ) . " WHERE ci_id = ?"; > >@@ -677,7 +677,7 @@ sub _SwapAllFields { > } > } > >- ModItem( \%course_item_fields, undef, $course_item->{'itemnumber'} ); >+ ModItem( \%course_item_fields, undef, $course_item->{'itemnumber'} ) if %course_item_fields; > _ModStoredFields( %item_fields, ci_id => $ci_id ); > } > >-- >1.7.2.5
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 8215
:
9990
|
10181
|
10224
|
11131
|
11612
|
11657
|
11677
|
11678
|
11679
|
11680
|
11681
|
11682
|
11683
|
11860
|
11861
|
11862
|
11865
|
11875
|
11881
|
11882
|
11980
|
12039
|
12120
|
12128
|
12188
|
12189
|
12192
|
12246
|
12361
|
12400
|
12413
|
12414
|
12593
|
12627
|
13496
|
13497
|
13498
|
13499
|
15195
|
15196
|
15197
|
15198
|
15199
|
16228
|
16229
|
16251
|
16252
|
16532
|
16533
|
16534
|
16536
|
16537
|
16545
|
16567
|
16568
|
16587
|
16588
|
16599
|
16621
|
16623
|
16634
|
17333
|
17334
|
17335
|
17336
|
17337
|
17377
|
17378
|
17379
|
17894
|
17895
|
17896
|
17897
|
17898
|
17899
|
18274
|
18275
|
18276
|
18277
|
18278
|
18279
|
18282
|
18283
|
18284
|
18285
|
18286
|
18287
|
18288
|
18289
|
18290
| 18291 |
18292
|
18293
|
21885
|
23264