Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 0b6cb3b8

Von Moritz Bunkus vor mehr als 14 Jahren hinzugefügt

  • ID 0b6cb3b882036db18ce9c283bfaebe3bc483507e
  • Vorgänger 35636cc2
  • Nachfolger d0fb3d4d

new bekommt Hash-Params, nicht positionsbezogene

Unterschiede anzeigen:

SL/DBUpgrade2.pm
use strict;
sub new {
my ($package, $form, $dbdriver) = @_;
my $self = { form => $form, dbdriver => $dbdriver };
return bless($self, $package);
my $package = shift;
return bless({}, $package)->init(@_);
}
sub set_dbcharset {
my $self = shift;
$self->{dbcharset} = shift;
sub init {
my ($self, %params) = @_;
map { $self->{$_} = $params{$_} } keys %params;
return $self;
}
SL/User.pm
$rc = 0;
my $dbupdater = SL::DBUpgrade2->new($form, $myconfig{"dbdriver"});
my $dbupdater = SL::DBUpgrade2->new(form => $form, dbdriver => $myconfig{dbdriver});
my $controls = $dbupdater->parse_dbupdate_controls;
map({ $form->{$_} = $myconfig{$_} }
......
my $db_charset = $Common::db_encoding_to_charset{$form->{encoding}};
$db_charset ||= Common::DEFAULT_CHARSET;
my $dbupdater = SL::DBUpgrade2->new($form, $form->{dbdriver});
my $dbupdater = SL::DBUpgrade2->new(form => $form, dbdriver => $form->{dbdriver});
# create the tables
$dbupdater->process_query($dbh, "sql/lx-office.sql", undef, $db_charset);
......
my ($self, $form) = @_;
my %members = $main::auth->read_all_users();
my $controls = SL::DBUpgrade2->new($form, $form->{dbdriver})->parse_dbupdate_controls;
my $controls = SL::DBUpgrade2->new(form => $form, dbdriver => $form->{dbdriver})->parse_dbupdate_controls;
my ($query, $sth, %dbs_needing_updates);
......
my $db_charset = $main::dbcharset;
$db_charset ||= Common::DEFAULT_CHARSET;
my $dbupdater = SL::DBUpgrade2->new($form, $form->{dbdriver});
my $dbupdater = SL::DBUpgrade2->new(form => $form, dbdriver => $form->{dbdriver});
foreach my $db (split(/ /, $form->{dbupdate})) {

Auch abrufbar als: Unified diff