From 1e2a74dcdabe77daf23e74068e707384b3b78b5b Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Fri, 20 Mar 2015 13:24:38 -0400 Subject: [PATCH] Bug 13068 [QA Followup] - Fix reading of sql files list Signed-off-by: Tomas Cohen Arazi --- installer/data/mysql/updatedatabase.pl | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 9bfce6b1f3..6e4b093a10 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -9949,14 +9949,13 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { # SEE bug 13068 # if there is anything in the atomicupdate, read and execute it. -opendir( my $dirh, C4::Context->config('intranetdir') . '/installer/data/mysql/atomicupdate' ); -my $old_delimiter = $/; -$/ = ';'; -while (readdir $dirh) { - next unless $_ =~ /\.sql$/; # skip non SQL files - print "DEV atomic update : $_ \n"; +my $update_dir = C4::Context->config('intranetdir') . '/installer/data/mysql/atomicupdate/'; +opendir( my $dirh, $update_dir ); +while ( my $file = readdir $dirh ) { + next unless $file =~ /\.sql$/; # skip non SQL files + print "DEV atomic update : $file \n"; 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; } -- 2.39.5