Bugzilla – Attachment 57727 Details for
Bug 17666
.perl atomic update does not work under kohadevbox
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17666 - .perl atomic update does not work under kohadevbox
Bug-17666---perl-atomic-update-does-not-work-under.patch (text/plain), 1.60 KB, created by
Kyle M Hall (khall)
on 2016-11-23 13:21:34 UTC
(
hide
)
Description:
Bug 17666 - .perl atomic update does not work under kohadevbox
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2016-11-23 13:21:34 UTC
Size:
1.60 KB
patch
obsolete
>From bfff1494eff161711c9328e416b83d0abf3a6c37 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Wed, 23 Nov 2016 13:12:09 +0000 >Subject: [PATCH] Bug 17666 - .perl atomic update does not work under > kohadevbox > >--- > installer/data/mysql/updatedatabase.pl | 17 +++++++++++++++-- > 1 file changed, 15 insertions(+), 2 deletions(-) > >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index 9b77f8d..049f96f 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -47,7 +47,6 @@ use MARC::File::XML ( BinaryEncoding => 'utf8' ); > > use File::Path qw[remove_tree]; # perl core module > use File::Spec; >-use Path::Tiny; > > # FIXME - The user might be installing a new database, so can't rely > # on /etc/koha.conf anyway. >@@ -13707,7 +13706,7 @@ foreach my $file ( sort readdir $dirh ) { > my $installer = C4::Installer->new(); > my $rv = $installer->load_sql( $update_dir . $file ) ? 0 : 1; > } elsif ( $file =~ /\.perl$/ ) { >- my $code = path( $update_dir . $file )->slurp_utf8; >+ my $code = slurp_file( $update_dir . $file ); > eval $code; > say "Atomic update generated errors: $@" if $@; > } >@@ -13715,6 +13714,20 @@ foreach my $file ( sort readdir $dirh ) { > > =head1 FUNCTIONS > >+=head2 slurp_file >+ >+=cut >+ >+sub slurp_file { >+ my ($file) = @_; >+ local $/ = undef; >+ open( FILE, '<:encoding(UTF-8)', $file ) or die "Couldn't open file: $!"; >+ binmode FILE; >+ my $string = <FILE>; >+ close FILE; >+ return $string; >+} >+ > =head2 TableExists($table) > > =cut >-- >2.1.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 17666
:
57727
|
58151
|
58193
|
58196
|
58197