Lines 447-452
sub set_version_syspref {
Link Here
|
447 |
C4::Context->clear_syspref_cache(); |
447 |
C4::Context->clear_syspref_cache(); |
448 |
} |
448 |
} |
449 |
|
449 |
|
|
|
450 |
=head2 set_languages_syspref |
451 |
|
452 |
$installer->set_languages_syspref(); |
453 |
|
454 |
Add the installation language to 'language' and 'opaclanguages' system preferences |
455 |
if different from 'en' |
456 |
|
457 |
=cut |
458 |
|
459 |
sub set_languages_syspref { |
460 |
my $self = shift; |
461 |
my $language = shift; |
462 |
|
463 |
return if ( not $language or $language eq 'en' ); |
464 |
|
465 |
warn "UPDATE Languages"; |
466 |
# intranet |
467 |
my $pref = $self->{'dbh'}->prepare("UPDATE systempreferences SET value=? WHERE variable='language'"); |
468 |
$pref->execute("en,$language"); |
469 |
# opac |
470 |
$pref = $self->{'dbh'}->prepare("UPDATE systempreferences SET value=? WHERE variable='opaclanguages'"); |
471 |
$pref->execute("en,$language"); |
472 |
|
473 |
C4::Context->clear_syspref_cache(); |
474 |
} |
475 |
|
450 |
=head2 load_sql |
476 |
=head2 load_sql |
451 |
|
477 |
|
452 |
my $error = $installer->load_sql($filename); |
478 |
my $error = $installer->load_sql($filename); |