Override ObjectDriver for TheSchwartz
TheSchwartz now uses Bugzilla database handle directly, this fixes double utf-8 issues in TheSchwartz tables.hinted-selects
parent
f6185e24e9
commit
037d79fcfc
|
@ -27,6 +27,7 @@ use strict;
|
||||||
use Bugzilla::Constants;
|
use Bugzilla::Constants;
|
||||||
use Bugzilla::Error;
|
use Bugzilla::Error;
|
||||||
use Bugzilla::Install::Util qw(install_string);
|
use Bugzilla::Install::Util qw(install_string);
|
||||||
|
use Bugzilla::JobQueue::ObjectDriver;
|
||||||
use base qw(TheSchwartz);
|
use base qw(TheSchwartz);
|
||||||
|
|
||||||
sub new {
|
sub new {
|
||||||
|
@ -41,10 +42,12 @@ sub new {
|
||||||
# to write to it.
|
# to write to it.
|
||||||
my $self = $class->SUPER::new(
|
my $self = $class->SUPER::new(
|
||||||
databases => [{
|
databases => [{
|
||||||
dsn => Bugzilla->dbh_main->{private_bz_dsn},
|
|
||||||
user => $lc->{db_user},
|
|
||||||
pass => $lc->{db_pass},
|
|
||||||
prefix => 'ts_',
|
prefix => 'ts_',
|
||||||
|
driver => Bugzilla::JobQueue::ObjectDriver->new(
|
||||||
|
dsn => Bugzilla->dbh_main->{private_bz_dsn},
|
||||||
|
username => $lc->{db_user},
|
||||||
|
password => $lc->{db_pass},
|
||||||
|
),
|
||||||
}],
|
}],
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
#!/usr/bin/perl
|
||||||
|
|
||||||
|
package Bugzilla::JobQueue::ObjectDriver;
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use Bugzilla;
|
||||||
|
use base qw(Data::ObjectDriver::Driver::DBI);
|
||||||
|
|
||||||
|
sub init_db
|
||||||
|
{
|
||||||
|
return Bugzilla->dbh_main;
|
||||||
|
}
|
||||||
|
*dbh = *init_db;
|
||||||
|
|
||||||
|
1;
|
||||||
|
__END__
|
Loading…
Reference in New Issue