Bug 13068 [QA Followup] - Fix reading of sql files list
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This commit is contained in:
parent
deab5ca89b
commit
1e2a74dcda
1 changed files with 6 additions and 7 deletions
|
@ -9949,14 +9949,13 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
|
||||||
# SEE bug 13068
|
# SEE bug 13068
|
||||||
# if there is anything in the atomicupdate, read and execute it.
|
# if there is anything in the atomicupdate, read and execute it.
|
||||||
|
|
||||||
opendir( my $dirh, C4::Context->config('intranetdir') . '/installer/data/mysql/atomicupdate' );
|
my $update_dir = C4::Context->config('intranetdir') . '/installer/data/mysql/atomicupdate/';
|
||||||
my $old_delimiter = $/;
|
opendir( my $dirh, $update_dir );
|
||||||
$/ = ';';
|
while ( my $file = readdir $dirh ) {
|
||||||
while (readdir $dirh) {
|
next unless $file =~ /\.sql$/; # skip non SQL files
|
||||||
next unless $_ =~ /\.sql$/; # skip non SQL files
|
print "DEV atomic update : $file \n";
|
||||||
print "DEV atomic update : $_ \n";
|
|
||||||
my $installer = C4::Installer->new();
|
my $installer = C4::Installer->new();
|
||||||
my $rv = $installer->load_sql( C4::Context->config('intranetdir') . '/installer/data/mysql/atomicupdate/' . $_ )? 0: 1;
|
my $rv = $installer->load_sql( $update_dir . $file ) ? 0 : 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue