Bugzilla – Attachment 33277 Details for
Bug 12627
SQLHelper replacement - C4::Suggestions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 12627: DBIx::Class is case sensitive for column names
PASSED-QA-Bug-12627-DBIxClass-is-case-sensitive-fo.patch (text/plain), 1.88 KB, created by
Katrin Fischer
on 2014-11-05 21:39:29 UTC
(
hide
)
Description:
[PASSED QA] Bug 12627: DBIx::Class is case sensitive for column names
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2014-11-05 21:39:29 UTC
Size:
1.88 KB
patch
obsolete
>From 12c26a29076ecc5c97ac65048e41071efb1ae500 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Mon, 29 Sep 2014 15:18:31 +0200 >Subject: [PATCH] [PASSED QA] Bug 12627: DBIx::Class is case sensitive for > column names > >STATUS should be "STATUS", not "status". > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > C4/Suggestions.pm | 14 +++----------- > 1 file changed, 3 insertions(+), 11 deletions(-) > >diff --git a/C4/Suggestions.pm b/C4/Suggestions.pm >index ddfa1b6..eae80a0 100644 >--- a/C4/Suggestions.pm >+++ b/C4/Suggestions.pm >@@ -426,13 +426,10 @@ Insert a new suggestion on database with value given on input arg. > sub NewSuggestion { > my ($suggestion) = @_; > >- my $new_suggestion = { %$suggestion }; > $suggestion->{STATUS} = "ASKED" unless $suggestion->{STATUS}; >- $new_suggestion->{status} = $suggestion->{STATUS}; >- delete $new_suggestion->{STATUS}; > > my $rs = Koha::Database->new->schema->resultset('Suggestion'); >- return $rs->create($new_suggestion)->id; >+ return $rs->create($suggestion)->id; > } > > =head2 ModSuggestion >@@ -452,19 +449,14 @@ sub ModSuggestion { > my ($suggestion) = @_; > return unless( $suggestion and defined($suggestion->{suggestionid}) ); > >- my $mod_suggestion = { %$suggestion }; >- my $status = $suggestion->{STATUS}; >- delete $mod_suggestion->{STATUS}; >- $mod_suggestion->{status} = $status; >- > my $rs = Koha::Database->new->schema->resultset('Suggestion')->find($suggestion->{suggestionid}); > my $status_update_table = 1; > eval { >- $rs->update($mod_suggestion); >+ $rs->update($suggestion); > }; > $status_update_table = 0 if( $@ ); > >- if ( $status ) { >+ if ( $suggestion->{STATUS} ) { > > # fetch the entire updated suggestion so that we can populate the letter > my $full_suggestion = GetSuggestion( $suggestion->{suggestionid} ); >-- >1.9.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 12627
:
29963
|
30095
|
30237
|
30269
|
30624
|
30635
|
30892
|
31916
|
31917
|
31937
|
31939
|
31940
|
31941
|
31942
|
31944
|
31948
|
31953
|
33244
|
33276
| 33277 |
33278
|
33279
|
33280
|
33281