|
Lines 312-317
moved to a different method.
Link Here
|
| 312 |
|
312 |
|
| 313 |
sub load_sql_in_order { |
313 |
sub load_sql_in_order { |
| 314 |
my $self = shift; |
314 |
my $self = shift; |
|
|
315 |
my $langchoice = shift; |
| 315 |
my $all_languages = shift; |
316 |
my $all_languages = shift; |
| 316 |
my @sql_list = @_; |
317 |
my @sql_list = @_; |
| 317 |
|
318 |
|
|
Lines 346-358
sub load_sql_in_order {
Link Here
|
| 346 |
push @fnames, C4::Context->config('intranetdir') . "/installer/data/mysql/account_offset_types.sql"; |
347 |
push @fnames, C4::Context->config('intranetdir') . "/installer/data/mysql/account_offset_types.sql"; |
| 347 |
push @fnames, C4::Context->config('intranetdir') . "/installer/data/mysql/account_credit_types.sql"; |
348 |
push @fnames, C4::Context->config('intranetdir') . "/installer/data/mysql/account_credit_types.sql"; |
| 348 |
push @fnames, C4::Context->config('intranetdir') . "/installer/data/mysql/account_debit_types.sql"; |
349 |
push @fnames, C4::Context->config('intranetdir') . "/installer/data/mysql/account_debit_types.sql"; |
|
|
350 |
my $localization_file = C4::Context->config('intranetdir') . |
| 351 |
"/installer/data/$self->{dbms}/localization/$langchoice/custom.sql"; |
| 352 |
if ( $langchoice ne 'en' and -f $localization_file ) { |
| 353 |
push @fnames, $localization_file; |
| 354 |
} |
| 349 |
foreach my $file (@fnames) { |
355 |
foreach my $file (@fnames) { |
| 350 |
# warn $file; |
356 |
# warn $file; |
| 351 |
undef $/; |
357 |
undef $/; |
| 352 |
my $error = $self->load_sql($file); |
358 |
my $error = $self->load_sql($file); |
| 353 |
my @file = split qr(\/|\\), $file; |
359 |
my @file = split qr(\/|\\), $file; |
| 354 |
$lang = $file[ scalar(@file) - 3 ] unless ($lang); |
360 |
$lang = $file[ scalar(@file) - 3 ] unless ($lang); |
| 355 |
my $level = $file[ scalar(@file) - 2 ]; |
361 |
my $level = ( $file =~ /(localization)/ ) ? $1 : $file[ scalar(@file) - 2 ]; |
| 356 |
unless ($error) { |
362 |
unless ($error) { |
| 357 |
$systempreference .= "$file[scalar(@file)-1]|" |
363 |
$systempreference .= "$file[scalar(@file)-1]|" |
| 358 |
unless ( index( $systempreference, $file[ scalar(@file) - 1 ] ) >= 0 ); |
364 |
unless ( index( $systempreference, $file[ scalar(@file) - 1 ] ) >= 0 ); |