Lines 8781-8786
if ( CheckVersion($DBversion) ) {
Link Here
|
8781 |
SetVersion($DBversion); |
8781 |
SetVersion($DBversion); |
8782 |
} |
8782 |
} |
8783 |
|
8783 |
|
|
|
8784 |
# DEVELOPER PROCESS, search for anything to execute in the db_update directory |
8785 |
# SEE bug 13068 |
8786 |
# if there is anything in the db_update, read and execute it. |
8787 |
|
8788 |
opendir( my $dirh, C4::Context->config('intranetdir') . '/installer/data/mysql/db_update' ); |
8789 |
my $old_delimiter = $/; |
8790 |
$/ = ';'; |
8791 |
while (readdir $dirh) { |
8792 |
next unless $_ =~ /\.sql$/; # skip non SQL files |
8793 |
# open and read file; |
8794 |
open FILE, "<", C4::Context->config('intranetdir') . '/installer/data/mysql/db_update/'.$_ or die "ERROR, impossible to open $_"; |
8795 |
my $sql_to_execute; |
8796 |
while ( <FILE> ) { |
8797 |
my $line = $_; |
8798 |
$line =~ s/\n//g; |
8799 |
$dbh->do($line) if $line; |
8800 |
$sql_to_execute .= $line; |
8801 |
} |
8802 |
} |
8803 |
|
8804 |
|
8784 |
=head1 FUNCTIONS |
8805 |
=head1 FUNCTIONS |
8785 |
|
8806 |
|
8786 |
=head2 TableExists($table) |
8807 |
=head2 TableExists($table) |
8787 |
- |
|
|