diff options
| author | Ivan Kohler <ivan@freeside.biz> | 2012-07-02 14:24:21 -0700 |
|---|---|---|
| committer | Ivan Kohler <ivan@freeside.biz> | 2012-07-02 14:24:21 -0700 |
| commit | 85e677b86fc37c54e6de2b06340351a28f5a5916 (patch) | |
| tree | 11148e2c292bd1a43b7cf6c2f5212a6ca8b03e75 /rt/share/html/Install/Initialize.html | |
| parent | e5ab051ccdb7637d8dd2f0ed9b4fe9aaaf1d1100 (diff) | |
| parent | 92aedddd3684167abb60cd3f1d77bbc156c592e6 (diff) | |
Merge branch 'master' of git.freeside.biz:/home/git/freeside
Diffstat (limited to 'rt/share/html/Install/Initialize.html')
| -rw-r--r-- | rt/share/html/Install/Initialize.html | 13 |
1 files changed, 9 insertions, 4 deletions
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 %# <sales@bestpractical.com> %# %# (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); |
