Bug 22880: Use placeholders
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 11 Jun 2019 14:31:07 +0000 (09:31 -0500)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Mon, 24 Feb 2020 13:24:37 +0000 (13:24 +0000)
Always.

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Signed-off-by: Lisette Scheer <lisettes@latahlibrary.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
installer/data/mysql/atomicupdate/bug_22880-move-opacheader-to-news.perl

index bddef51..046f018 100644 (file)
@@ -11,7 +11,7 @@ if( CheckVersion( $DBversion ) ) {
         foreach my $lang ( @langs ) {
             print "Inserting opacheader contents into $lang news item...\n";
             # If there is a value in the opacheader preference, insert it into opac_news
-            $dbh->do("INSERT INTO opac_news (branchcode, lang, title, content ) VALUES (NULL, ?, 'opacheader $lang', ?)", undef, "opacheader_$lang", $opacheader);
+            $dbh->do("INSERT INTO opac_news (branchcode, lang, title, content ) VALUES (NULL, ?, '', ?)", undef, "opacheader_$langs[0]", $opacheader);
         }
     }
     # Remove the opacheader system preference