Lines 50-55
use constant ATOMICUPD_PREF => '_LocalAtomicUpdates';
Link Here
|
50 |
my $debug = 0; |
50 |
my $debug = 0; |
51 |
my $aupd = { #hash for atomic updates |
51 |
my $aupd = { #hash for atomic updates |
52 |
location => C4::Context->config('intranetdir')."/installer/data/mysql/atomicupdate", |
52 |
location => C4::Context->config('intranetdir')."/installer/data/mysql/atomicupdate", |
|
|
53 |
mode => C4::Context->preference('DevUpdateControl') || 'PROD', |
53 |
remember => C4::Context->preference(ATOMICUPD_PREF)//'', |
54 |
remember => C4::Context->preference(ATOMICUPD_PREF)//'', |
54 |
skipfiles => { |
55 |
skipfiles => { |
55 |
'Bug-4246-Talking-Tech-itiva-phone-notifications.pl' => 1, |
56 |
'Bug-4246-Talking-Tech-itiva-phone-notifications.pl' => 1, |
Lines 8898-8904
sub RunRemainingAtomicUpdates {
Link Here
|
8898 |
if( exists $atomicupd->{skipfiles}->{$upd} ) { |
8899 |
if( exists $atomicupd->{skipfiles}->{$upd} ) { |
8899 |
next; # Skip official db revision |
8900 |
next; # Skip official db revision |
8900 |
} |
8901 |
} |
8901 |
if( $atomicupd->{remember} =~ /(^|;)$upd;/ ) { |
8902 |
if( $atomicupd->{mode} ne 'ALWAYS' && |
|
|
8903 |
$atomicupd->{remember} =~ /(^|;)$upd;/ ) { |
8902 |
#Skip files that have recently been applied |
8904 |
#Skip files that have recently been applied |
8903 |
#Note that an official db rev erases this list |
8905 |
#Note that an official db rev erases this list |
8904 |
print "Skipping $upd as recently applied dev update\n"; |
8906 |
print "Skipping $upd as recently applied dev update\n"; |
Lines 8956-8962
sub ExecDBRev {
Link Here
|
8956 |
print "Dev upgrade $file done\n"; |
8958 |
print "Dev upgrade $file done\n"; |
8957 |
_atomic_memory( $atomicupd, $file ) if $rv; |
8959 |
_atomic_memory( $atomicupd, $file ) if $rv; |
8958 |
} else { |
8960 |
} else { |
8959 |
_atomic_memory( $atomicupd ); #Official db rev clears the atomic pref |
8961 |
_atomic_memory( $atomicupd ); #Official dbrev may clear atomic pref |
8960 |
SetVersion($version); |
8962 |
SetVersion($version); |
8961 |
print "Upgrade to $version done (Bug $bugno - $descr)\n"; |
8963 |
print "Upgrade to $version done (Bug $bugno - $descr)\n"; |
8962 |
} |
8964 |
} |
Lines 8964-8969
sub ExecDBRev {
Link Here
|
8964 |
|
8966 |
|
8965 |
sub _atomic_memory { |
8967 |
sub _atomic_memory { |
8966 |
my ( $atomicupd, $upd ) = @_; |
8968 |
my ( $atomicupd, $upd ) = @_; |
|
|
8969 |
|
8970 |
return if $atomicupd->{mode} eq 'ALWAYS'; # ignores the pref |
8971 |
return if !$upd && $atomicupd->{mode} eq 'TRACK'; # no reset |
8972 |
|
8967 |
$atomicupd->{remember}= $upd? $atomicupd->{remember}."$upd;": ''; |
8973 |
$atomicupd->{remember}= $upd? $atomicupd->{remember}."$upd;": ''; |
8968 |
C4::Context->set_preference( ATOMICUPD_PREF, $atomicupd->{remember} ); |
8974 |
C4::Context->set_preference( ATOMICUPD_PREF, $atomicupd->{remember} ); |
8969 |
} |
8975 |
} |
Lines 9077-9081
sub CheckVersion {
Link Here
|
9077 |
} |
9083 |
} |
9078 |
} |
9084 |
} |
9079 |
|
9085 |
|
9080 |
RunRemainingAtomicUpdates( $aupd ); |
9086 |
RunRemainingAtomicUpdates( $aupd ) if $aupd->{mode} ne 'PROD'; |
9081 |
exit; |
9087 |
exit; |
9082 |
- |
|
|