Lines 4441-4446
sub TransformToNum {
Link Here
|
4441 |
my $version = shift; |
4441 |
my $version = shift; |
4442 |
# remove the 3 last . to have a Perl number |
4442 |
# remove the 3 last . to have a Perl number |
4443 |
$version =~ s/(.*\..*)\.(.*)\.(.*)/$1$2$3/; |
4443 |
$version =~ s/(.*\..*)\.(.*)\.(.*)/$1$2$3/; |
|
|
4444 |
# three X's at the end indicate that you are testing patch with dbrev |
4445 |
# change it into 999 |
4446 |
# prevents error on a < comparison between strings (should be: lt) |
4447 |
$version =~ s/XXX$/999/; |
4444 |
return $version; |
4448 |
return $version; |
4445 |
} |
4449 |
} |
4446 |
|
4450 |
|
Lines 4451-4457
set the DBversion in the systempreferences
Link Here
|
4451 |
=cut |
4455 |
=cut |
4452 |
|
4456 |
|
4453 |
sub SetVersion { |
4457 |
sub SetVersion { |
4454 |
my $kohaversion = TransformToNum(shift); |
4458 |
return if $_[0]=~ /XXX$/; |
|
|
4459 |
#you are testing a patch with a db revision; do not change version |
4460 |
my $kohaversion = TransformToNum($_[0]); |
4455 |
if (C4::Context->preference('Version')) { |
4461 |
if (C4::Context->preference('Version')) { |
4456 |
my $finish=$dbh->prepare("UPDATE systempreferences SET value=? WHERE variable='Version'"); |
4462 |
my $finish=$dbh->prepare("UPDATE systempreferences SET value=? WHERE variable='Version'"); |
4457 |
$finish->execute($kohaversion); |
4463 |
$finish->execute($kohaversion); |
4458 |
- |
|
|