View | Details | Raw Unified | Return to bug 24973
Collapse All | Expand All

(-)a/C4/Installer.pm (-2 / +4 lines)
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 330-335 sub load_sql_in_order { Link Here
330
    my $global_mandatory_dir = C4::Context->config('intranetdir') . "/installer/data/$self->{dbms}/mandatory";
331
    my $global_mandatory_dir = C4::Context->config('intranetdir') . "/installer/data/$self->{dbms}/mandatory";
331
332
332
    # Make sure some stuffs are loaded first
333
    # Make sure some stuffs are loaded first
334
    unshift(@fnames, C4::Context->config('intranetdir') . "/installer/data/$self->{dbms}/$langchoice/locale_sysprefs.yml");
333
    unshift(@fnames, C4::Context->config('intranetdir') . "/installer/data/$self->{dbms}/sysprefs.sql");
335
    unshift(@fnames, C4::Context->config('intranetdir') . "/installer/data/$self->{dbms}/sysprefs.sql");
334
    unshift(@fnames,
336
    unshift(@fnames,
335
        "$global_mandatory_dir/subtag_registry.sql",
337
        "$global_mandatory_dir/subtag_registry.sql",
Lines 465-474 sub set_languages_syspref { Link Here
465
    warn "UPDATE Languages";
467
    warn "UPDATE Languages";
466
    # intranet
468
    # intranet
467
    my $pref = $self->{'dbh'}->prepare("UPDATE systempreferences SET value=? WHERE variable='language'");
469
    my $pref = $self->{'dbh'}->prepare("UPDATE systempreferences SET value=? WHERE variable='language'");
468
    $pref->execute("en,$language");
470
    $pref->execute("$language,en");
469
    # opac
471
    # opac
470
    $pref = $self->{'dbh'}->prepare("UPDATE systempreferences SET value=? WHERE variable='opaclanguages'");
472
    $pref = $self->{'dbh'}->prepare("UPDATE systempreferences SET value=? WHERE variable='opaclanguages'");
471
    $pref->execute("en,$language");
473
    $pref->execute("$language,en");
472
474
473
    C4::Context->clear_syspref_cache();
475
    C4::Context->clear_syspref_cache();
474
}
476
}
(-)a/installer/install.pl (-2 / +4 lines)
Lines 245-253 elsif ( $step && $step == 3 ) { Link Here
245
    elsif ( $op && $op eq 'addframeworks' ) {
245
    elsif ( $op && $op eq 'addframeworks' ) {
246
246
247
        # 1ST install, 3rd sub-step : insert the SQL files the user has selected
247
        # 1ST install, 3rd sub-step : insert the SQL files the user has selected
248
        my $langchoice = $query->param('fwklanguage');
249
        $langchoice = $query->cookie('KohaOpacLanguage') unless ($langchoice);
250
        $langchoice =~ s/[^a-zA-Z_-]*//g;
248
251
249
        my ( $fwk_language, $list ) =
252
        my ( $fwk_language, $list ) =
250
          $installer->load_sql_in_order( $all_languages,
253
          $installer->load_sql_in_order( $langchoice, $all_languages,
251
            $query->multi_param('framework') );
254
            $query->multi_param('framework') );
252
        $template->param(
255
        $template->param(
253
            "fwklanguage" => $fwk_language,
256
            "fwklanguage" => $fwk_language,
254
- 

Return to bug 24973