From 33beebf4cb42eba3e1dd868ad5e0af102de961da Mon Sep 17 00:00:00 2001 From: Mark Wells Date: Sat, 29 Sep 2012 16:36:46 -0700 Subject: update address standardization for cust_location changes --- rt/share/html/Install/Initialize.html | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'rt/share/html/Install/Initialize.html') diff --git a/rt/share/html/Install/Initialize.html b/rt/share/html/Install/Initialize.html index 0b9ed6d39..0cc39aff6 100644 --- a/rt/share/html/Install/Initialize.html +++ b/rt/share/html/Install/Initialize.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -73,6 +73,11 @@ if ( $Run ) { my @actions = split /,/, $RT::Installer->{DatabaseAction}; + # RT::Handle's ISA is dynamical, so we need to unshift the right one. + my $class = 'DBIx::SearchBuilder::Handle::' . RT->Config->Get('DatabaseType'); + $class->require or die $UNIVERSAL::require::ERROR; + unshift @RT::Handle::ISA, $class; + my $sysdbh = DBI->connect( RT::Handle->SystemDSN, $RT::Installer->{InstallConfig}{DatabaseAdmin}, @@ -110,17 +115,17 @@ if ( $Run ) { ($status, $msg) = RT::Handle->InsertACL( $dbh ); } elsif ( $action eq 'coredata' ) { - $RT::Handle = new RT::Handle; + $RT::Handle = RT::Handle->new; $RT::Handle->dbh( undef ); RT::ConnectToDatabase(); RT::InitLogging(); ($status, $msg) = $RT::Handle->InsertInitialData; } elsif ( $action eq 'insert' ) { - $RT::Handle = new RT::Handle; + $RT::Handle = RT::Handle->new; RT::Init(); my $file = $RT::EtcPath . "/initialdata"; - ($status, $msg) = $RT::Handle->InsertData( $file ); + ($status, $msg) = $RT::Handle->InsertData( $file, undef, disconnect_after => 0 ); } unless ( $status ) { push @errors, loc('ERROR: [_1]', $msg); -- cgit v1.2.1