From 0ded44769a641771f02602fa6a75a005ab2765b9 Mon Sep 17 00:00:00 2001 From: Nicole Engard Date: Fri, 5 Feb 2010 05:23:42 -0500 Subject: [PATCH] bug 3923 followup - change orderpdfformat value if set wrong due to upgrade Signed-off-by: Galen Charlton --- installer/data/mysql/updatedatabase.pl | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 2406a41631..a63a162388 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -3429,6 +3429,15 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { SetVersion ($DBversion); } +$DBversion = 'XXX'; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + if (C4::Context->preference('OrderPdfFormat') eq 'pdfformat::example'){ + $dbh->do("UPDATE `systempreferences` set value='pdfformat::layout2pages' WHERE variable='OrderPdfFormat'"); + } + print "Upgrade done ( corrected default OrderPdfFormat value is still set wrong )\n"; + SetVersion ($DBversion); +} + =item DropAllForeignKeys($table) Drop all foreign keys of the table $table -- 2.39.5