Bugzilla – Attachment 37998 Details for
Bug 13893
Add ability to execute perl scripts in atomicupdates
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13893: [QA Follow-up] Move print statement, sort files in loop
Bug-13893-QA-Follow-up-Move-print-statement-sort-f.patch (text/plain), 1.51 KB, created by
Marcel de Rooy
on 2015-04-17 06:52:02 UTC
(
hide
)
Description:
Bug 13893: [QA Follow-up] Move print statement, sort files in loop
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2015-04-17 06:52:02 UTC
Size:
1.51 KB
patch
obsolete
>From 50d7baa783251c47e55a3d7f5bfb7525384011ad Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Thu, 16 Apr 2015 15:34:25 +0200 >Subject: [PATCH] Bug 13893: [QA Follow-up] Move print statement, sort files > in loop >Content-Type: text/plain; charset=utf-8 > >Just moving the print statement for DEV updates to show them too for >the new perl format. >In the loop opendir..readdir is used; this might not be always in the >expected order. I added a sort to force the order. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > installer/data/mysql/updatedatabase.pl | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index 4f4558b..d78e4f6 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -10031,9 +10031,10 @@ if ( CheckVersion($DBversion) ) { > > my $update_dir = C4::Context->config('intranetdir') . '/installer/data/mysql/atomicupdate/'; > opendir( my $dirh, $update_dir ); >-while ( my $file = readdir $dirh ) { >- if ( $file =~ /\.sql$/ ) { # skip non SQL files >- print "DEV atomic update : $file \n"; >+foreach my $file ( sort readdir $dirh ) { >+ next if $file !~ /\.(sql|perl)$/; #skip other files >+ print "DEV atomic update: $file\n"; >+ if ( $file =~ /\.sql$/ ) { > my $installer = C4::Installer->new(); > my $rv = $installer->load_sql( $update_dir . $file ) ? 0 : 1; > } elsif ( $file =~ /\.perl$/ ) { >-- >1.7.10.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 13893
:
37120
|
37121
|
37122
|
37123
|
37389
|
37997
| 37998