Bug 27634: Update PatronSelfRegistrationBorrowerUnwantedField's value
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
6ea09bbe0a
commit
6c176f323b
1 changed files with 20 additions and 0 deletions
20
installer/data/mysql/atomicupdate/bug_27634.perl
Normal file
20
installer/data/mysql/atomicupdate/bug_27634.perl
Normal file
|
@ -0,0 +1,20 @@
|
|||
$DBversion = 'XXX'; # will be replaced by the RM
|
||||
if( CheckVersion( $DBversion ) ) {
|
||||
|
||||
for my $f ( qw( categorycode dateexpiry ) ) {
|
||||
my ( $exists ) = $dbh->selectrow_array(qq{
|
||||
SELECT value from systempreferences
|
||||
WHERE variable="PatronSelfRegistrationBorrowerUnwantedField"
|
||||
AND value LIKE "%$f%"
|
||||
});
|
||||
unless ( $exists ) {
|
||||
$dbh->do(q{
|
||||
UPDATE systempreferences
|
||||
SET value = CONCAT(value, IF(value<>'','|',''), ?)
|
||||
WHERE variable="PatronSelfRegistrationBorrowerUnwantedField"
|
||||
}, undef, $f);
|
||||
}
|
||||
}
|
||||
|
||||
NewVersion( $DBversion, 27634, "Add categorycode and dateexpiry to PatronSelfRegistrationBorrowerUnwantedField");
|
||||
}
|
Loading…
Reference in a new issue