Lines 6114-6119
if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
Link Here
|
6114 |
SetVersion($DBversion); |
6114 |
SetVersion($DBversion); |
6115 |
} |
6115 |
} |
6116 |
|
6116 |
|
|
|
6117 |
$DBversion = "3.11.00.005"; |
6118 |
if ( CheckVersion($DBversion) ) { |
6119 |
print "Upgrade to $DBversion done (Bug 9191: You shouldn't see this)\n"; |
6120 |
SetVersion($DBversion); |
6121 |
} |
6122 |
|
6123 |
$DBversion = "3.11.00.XXX"; |
6124 |
if ( CheckVersion($DBversion) ) { |
6125 |
print "Upgrade to $DBversion done (Bug 9191: You should see this)\n"; |
6126 |
SetVersion($DBversion); |
6127 |
} |
6128 |
|
6117 |
=head1 FUNCTIONS |
6129 |
=head1 FUNCTIONS |
6118 |
|
6130 |
|
6119 |
=head2 TableExists($table) |
6131 |
=head2 TableExists($table) |
Lines 6195-6198
sub SetVersion {
Link Here
|
6195 |
} |
6207 |
} |
6196 |
C4::Context::clear_syspref_cache(); # invalidate cached preferences |
6208 |
C4::Context::clear_syspref_cache(); # invalidate cached preferences |
6197 |
} |
6209 |
} |
|
|
6210 |
|
6211 |
=head2 CheckVersion |
6212 |
|
6213 |
Check whether a given update should be run when passed the proposed version |
6214 |
number. The update will always be run if the proposed version is greater |
6215 |
than the current database version and less than or equal to the version in |
6216 |
kohaversion.pl. The update is also run if the version contains XXX, though |
6217 |
this behavior will be changed following the adoption of non-linear updates |
6218 |
as implemented in bug 7167. |
6219 |
|
6220 |
=cut |
6221 |
|
6222 |
sub CheckVersion { |
6223 |
my ($proposed_version) = @_; |
6224 |
my $version_number = TransformToNum($proposed_version); |
6225 |
|
6226 |
# The following line should be deleted when bug 7167 is pushed |
6227 |
return 1 if ( $proposed_version =~ m/XXX/ ); |
6228 |
|
6229 |
if ( C4::Context->preference("Version") < $version_number |
6230 |
&& $version_number <= TransformToNum( C4::Context->KOHAVERSION ) ) |
6231 |
{ |
6232 |
return 1; |
6233 |
} |
6234 |
else { |
6235 |
return 0; |
6236 |
} |
6237 |
} |
6238 |
|
6198 |
exit; |
6239 |
exit; |
6199 |
- |
|
|