Bugzilla – Attachment 62234 Details for
Bug 17855
New onboarding tool feature to guide users through setting up Koha, and minor web installer UI improvements
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17855: Do not create a new dbh, get it from C4::Context->dbh
Bug-17855-Do-not-create-a-new-dbh-get-it-from-C4Co.patch (text/plain), 2.42 KB, created by
Alex Buckley
on 2017-04-17 20:28:40 UTC
(
hide
)
Description:
Bug 17855: Do not create a new dbh, get it from C4::Context->dbh
Filename:
MIME Type:
Creator:
Alex Buckley
Created:
2017-04-17 20:28:40 UTC
Size:
2.42 KB
patch
obsolete
>From 691263610b3230de5ec9db8a7eeb75af9b5cb7e9 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 17 Apr 2017 12:13:45 -0300 >Subject: [PATCH] Bug 17855: Do not create a new dbh, get it from > C4::Context->dbh > >Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> >--- > installer/onboarding.pl | 23 ----------------------- > 1 file changed, 23 deletions(-) > >diff --git a/installer/onboarding.pl b/installer/onboarding.pl >index d8de8ef..298bc6a 100755 >--- a/installer/onboarding.pl >+++ b/installer/onboarding.pl >@@ -17,9 +17,7 @@ > # You should have received a copy of the GNU General Public License > # along with Koha; if not, see <http://www.gnu.org/licenses>. > >-#Recommended pragmas > use Modern::Perl; >-use diagnostics; > use C4::InstallAuth; > use CGI qw ( -utf8 ); > use C4::Output; >@@ -51,25 +49,6 @@ my ( $template, $loggedinuser, $cookie ) = > } > ); > >-#Check database connection >-my %info; >-$info{'dbname'} = C4::Context->config("database"); >-$info{'dbms'} = ( >- C4::Context->config("db_scheme") >- ? C4::Context->config("db_scheme") >- : "mysql" >-); >- >-$info{'hostname'} = C4::Context->config("hostname"); >-$info{'port'} = C4::Context->config("port"); >-$info{'user'} = C4::Context->config("user"); >-$info{'password'} = C4::Context->config("pass"); >-my $dbh = DBI->connect( >- "DBI:$info{dbms}:dbname=$info{dbname};host=$info{hostname}" >- . ( $info{port} ? ";port=$info{port}" : "" ), >- $info{'user'}, $info{'password'} >-); >- > #Store the value of the template input name='op' in the variable $op so we can check if the user has pressed the button with the name="op" and value="finish" meaning the user has finished the onboarding tool. > my $op = $input->param('op') || ''; > $template->param( 'op' => $op ); >@@ -379,7 +358,6 @@ elsif ( $step && $step == 3 ) { > #Perform data validation on the flag that has been handed to onboarding.pl by the template > my $flag = $input->param('flag'); > if ( $input->param('newflags') ) { >- my $dbh = C4::Context->dbh(); > my @perms = $input->multi_param('flag'); > my %all_module_perms = (); > my %sub_perms = (); >@@ -491,7 +469,6 @@ elsif ( $step && $step == 5 ) { > ); > > my $input = CGI->new; >- my $dbh = C4::Context->dbh; > > my ( $template, $loggedinuser, $cookie ) = > C4::InstallAuth::get_template_and_user( >-- >2.1.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 17855
:
58657
|
58658
|
58659
|
58660
|
58661
|
58662
|
58663
|
58664
|
58665
|
58666
|
58667
|
58668
|
58669
|
58781
|
58782
|
58783
|
58784
|
58785
|
58792
|
58793
|
58794
|
58846
|
58860
|
58861
|
58862
|
58886
|
58892
|
58893
|
58894
|
58895
|
58896
|
58897
|
58898
|
58899
|
58900
|
58901
|
58902
|
58903
|
58904
|
58905
|
58906
|
58907
|
59037
|
59051
|
59140
|
59141
|
59174
|
59188
|
59277
|
59279
|
59280
|
59281
|
59628
|
59703
|
59705
|
59706
|
59707
|
59708
|
59709
|
59710
|
59711
|
59712
|
59742
|
59826
|
59830
|
59840
|
59841
|
59842
|
59856
|
59857
|
60092
|
61667
|
61668
|
61986
|
62186
|
62191
|
62192
|
62193
|
62220
|
62221
|
62222
|
62223
|
62231
|
62233
|
62234
|
62235
|
62236
|
62237
|
62238
|
62239
|
62240
|
62241
|
62242
|
62243
|
62251
|
62252
|
62253
|
62254
|
62255
|
62256
|
62257
|
62258
|
62259
|
62260
|
62261
|
62262
|
62263
|
62281
|
62282
|
62283
|
62284
|
62285
|
62286
|
62287
|
62288
|
62668
|
62669
|
62670
|
62671
|
62672
|
62673
|
62674
|
62675