Bugzilla – Attachment 35960 Details for
Bug 13645
DBIx connection needs to be cached
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED OFF] Bug 13645: Use DBIx::Connector
SIGNED-OFF-Bug-13645-Use-DBIxConnector.patch (text/plain), 1.36 KB, created by
Tomás Cohen Arazi
on 2015-02-17 03:52:09 UTC
(
hide
)
Description:
[SIGNED OFF] Bug 13645: Use DBIx::Connector
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi
Created:
2015-02-17 03:52:09 UTC
Size:
1.36 KB
patch
obsolete
>From cfb820c1fa4066891ba2a23ddead6d8e69f68609 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Tue, 10 Feb 2015 10:47:05 +0100 >Subject: [PATCH] [SIGNED OFF] Bug 13645: Use DBIx::Connector > >Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com> >--- > C4/Context.pm | 11 ++++++++--- > 1 file changed, 8 insertions(+), 3 deletions(-) > >diff --git a/C4/Context.pm b/C4/Context.pm >index 274522e..cc93af4 100644 >--- a/C4/Context.pm >+++ b/C4/Context.pm >@@ -97,7 +97,7 @@ BEGIN { > $VERSION = '3.07.00.049'; > } > >-use DBI; >+use DBIx::Connector; > use Encode; > use ZOOM; > use XML::Simple; >@@ -783,8 +783,13 @@ sub _new_dbh > my $db_user = $context->config("user"); > my $db_passwd = $context->config("pass"); > # MJR added or die here, as we can't work without dbh >- my $dbh = DBI->connect("DBI:$db_driver:dbname=$db_name;host=$db_host;port=$db_port", >- $db_user, $db_passwd, {'RaiseError' => $ENV{DEBUG}?1:0 }) or die $DBI::errstr; >+ my $dbh = DBIx::Connector->connect( >+ "dbi:$db_driver:dbname=$db_name;host=$db_host;port=$db_port", >+ $db_user, $db_passwd, >+ { >+ 'RaiseError' => $ENV{DEBUG} ? 1 : 0 >+ } >+ ); > > # Check for the existence of a systempreference table; if we don't have this, we don't > # have a valid database and should not set RaiseError in order to allow the installer >-- >2.3.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 13645
:
35636
|
35657
|
35668
|
35774
|
35959
|
35960
|
36092
|
36093
|
36094
|
36131