Bug 24221: DBRev 21.12.00.020

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
Fridolin Somers 2022-03-25 10:37:37 -10:00
parent 7adebc4a81
commit 4aedda8197
2 changed files with 7 additions and 5 deletions

View file

@ -29,7 +29,7 @@ use vars qw{ $VERSION };
# - #4 : the developer version. The 4th number is the database subversion.
# used by developers when the database changes. updatedatabase take care of the changes itself
# and is automatically called by Auth.pm when needed.
$VERSION = "21.12.00.019";
$VERSION = "21.12.00.020";
sub version {
return $VERSION;

View file

@ -7,9 +7,9 @@ return {
my ($args) = @_;
my ($dbh, $out) = @$args{qw(dbh out)};
# Get any existing value from the OpacMySummaryNote system preference
my ( $opacmysummarynote ) = $dbh->selectrow_array( q|
my ( $opacmysummarynote ) = $dbh->selectrow_array(q{
SELECT value FROM systempreferences WHERE variable='OPACMySummaryNote';
|);
});
if( $opacmysummarynote ){
$dbh->do(q{
INSERT INTO additional_contents ( category, code, location, branchcode, title, content, lang, published_on )
@ -19,6 +19,8 @@ return {
$dbh->do(q{
DELETE FROM systempreferences WHERE variable='OPACMySummaryNote'
});
} else {
say $out "No OpacMySummaryNote preference found. Value was empty or update has already been run.";
}
}
}
},
};