Bugzilla – Attachment 28969 Details for
Bug 11891
Make Koha::Schema use C4::Context->dbh
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11891: (follow-up) set DBIC storage flags correctly
Bug-11891-follow-up-set-DBIC-storage-flags-correct.patch (text/plain), 1.25 KB, created by
Chris Cormack
on 2014-06-18 23:29:43 UTC
(
hide
)
Description:
Bug 11891: (follow-up) set DBIC storage flags correctly
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2014-06-18 23:29:43 UTC
Size:
1.25 KB
patch
obsolete
>From feea59532ce47bf34f80631972ec5b0a6a26248e Mon Sep 17 00:00:00 2001 >From: Galen Charlton <gmc@esilibrary.com> >Date: Tue, 27 May 2014 17:57:33 +0000 >Subject: [PATCH] Bug 11891: (follow-up) set DBIC storage flags correctly > >Since we're passing an existing DBI database handle to >DBIC, and that handle doesn't have RaiseError set to true >by default, don't let DBIC override that -- for now. > >Test plan: verify that the DB-dependent test suite passes. > >Signed-off-by: Galen Charlton <gmc@esilibrary.com> >Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> >--- > Koha/Database.pm | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > >diff --git a/Koha/Database.pm b/Koha/Database.pm >index 99888c6..92e83ec 100644 >--- a/Koha/Database.pm >+++ b/Koha/Database.pm >@@ -45,7 +45,12 @@ __PACKAGE__->mk_accessors(qw( )); > # database connection from the data given in the current context, and > # returns it. > sub _new_schema { >- my $schema = Koha::Schema->connect( sub { C4::Context->dbh } ); >+ >+ my $context = C4::Context->new(); >+ >+ # we are letting C4::Context->dbh not set the RaiseError handle attribute >+ # for now for compatbility purposes >+ my $schema = Koha::Schema->connect( sub { C4::Context->dbh }, { unsafe => 1 } ); > return $schema; > } > >-- >2.0.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 11891
:
25828
|
25829
|
28962
|
28963
|
28964
|
28965
|
28966
|
28967
|
28968
| 28969