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