From 0a930ea4bdaab26dc8bd9d4fcf86efc456e7d661 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Mon, 28 Sep 2020 13:45:23 +0000 Subject: [PATCH] Bug 24223: (follow-up) Add date to OpacNav additional content entries This follow-up modifies the atomic update so that it inserts today's date as the "Published on" date. Without that information the system considers the item unpublished and will not display the content. Signed-off-by: David Nind --- .../data/mysql/atomicupdate/bug_24223-move-opacnav-to-news.perl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/installer/data/mysql/atomicupdate/bug_24223-move-opacnav-to-news.perl b/installer/data/mysql/atomicupdate/bug_24223-move-opacnav-to-news.perl index 29a24a8747..72802aed77 100644 --- a/installer/data/mysql/atomicupdate/bug_24223-move-opacnav-to-news.perl +++ b/installer/data/mysql/atomicupdate/bug_24223-move-opacnav-to-news.perl @@ -20,7 +20,7 @@ if( CheckVersion( $DBversion ) ) { foreach my $lang ( @langs ) { print "Inserting OpacNav contents into $lang news item...\n"; # If there is a value in the OpacNav preference, insert it into opac_news - $dbh->do("INSERT INTO opac_news (branchcode, lang, title, content ) VALUES (NULL, ?, '', ?)", undef, "OpacNav_$lang", $opacnav); + $dbh->do("INSERT INTO opac_news (branchcode, lang, title, content, published_on ) VALUES (NULL, ?, '', ?, CAST(NOW() AS date))", undef, "OpacNav_$lang", $opacnav); } } # Remove the OpacNav system preference -- 2.20.1