use C4::Context;
-my $root_dir = C4::Context->config( 'intranetdir' ) . '/installer/data/mysql';
+my $root_dir = 'installer/data/mysql';
my $base_syspref_file = "en/mandatory/sysprefs.sql";
my @trans_syspref_files = qw(
+ de-DE/mandatory/sysprefs.sql
+ it-IT/necessari/sysprefs.sql
fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql
- uk-UA/mandatory/system_preferences_optimal.sql
- ru-RU/mandatory/system_preferences_optimal.sql
+ uk-UA/mandatory/system_preferences_full_optimal_for_install_only.sql
+ ru-RU/mandatory/system_preferences_full_optimal_for_install_only.sql
pl-PL/mandatory/sysprefs.sql
);
/\(\'([\w\-:]+)\'/;
my $variable = $1;
next unless $variable;
+ # lowercase syspref - at present, systempreference lookup is not case-sensitive
+ $variable = lc $variable;
$syspref{$variable} = 1;
}
return \%syspref;
push @to_add_sysprefs, $_ if ! $trans_syspref->{$_};
}
if ( $#to_add_sysprefs >= 0 ) {
- fail( 'No syspref to add') or diag( "Sysprefs to add in $trans_file: " . join(', ', @to_add_sysprefs ) );
+ fail("Sysprefs to add in $trans_file: " . join(', ', @to_add_sysprefs ) );
}
else {
pass( 'No syspref to add' );
push @to_delete_sysprefs, $_ if ! $ref_syspref->{$_};
}
if ( $#to_delete_sysprefs >= 0 ) {
- fail( 'No syspref to delete' );
+ fail( 'sysprefs to delete' );
diag( "Sysprefs to delete in $trans_file: " . join(', ', @to_delete_sysprefs ) );
diag( 'Warning: Some of those sysprefs may rather have to be added to English sysprefs' );
}