Bug 7392: Add system preference to define export options in OPAC
[koha_gimpoz] / installer / data / mysql / updatedatabase.pl
index 0982282..7f850f8 100755 (executable)
@@ -4651,9 +4651,34 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
     $dbh->do(
         q|INSERT INTO permissions (module_bit, code, description) VALUES (13, 'upload_local_cover_images', 'Upload local cover images')|
     );
-    print "Upgrade done (Added support for local cover images)\n";
+    print "Upgrade to $DBversion done (Added support for local cover images)\n";
     SetVersion($DBversion);
 }
+
+$DBversion = "3.07.00.011";
+if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
+    $dbh->do(<<ENDOFRENEWAL);
+    INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('BorrowerRenewalPeriodBase', 'now', 'Set whether the borrower renewal date should be counted from the dateexpiry or from the current date ','dateexpiry|now','Choice');
+ENDOFRENEWAL
+    print "Upgrade to $DBversion done (Added a system preference to allow renewal of Patron account either from todays date or from existing expiry date in the patrons account.)\n";
+    SetVersion($DBversion);
+}
+
+$DBversion = "3.07.00.012";
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+    $dbh->do("INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES ('AllowItemsOnHoldCheckout',0,'Do not generate RESERVE_WAITING and RESERVED warning when checking out items reserved to someone else. This allows self checkouts for those items.','','YesNo')");
+    print "Upgrade to $DBversion add 'AllowItemsOnHoldCheckout' syspref \n";
+    SetVersion ($DBversion);
+}
+
+$DBversion = "3.07.99.XXX"; #FIXME
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+    $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacExportOptions','bibtex|dc|marcxml|marc8|utf8|marcstd|mods|ris','Define available export options on OPAC detail page.','','free');");
+    print "Upgrade to $DBversion done (Bug 7345: Add system preference OpacExportOptions.)\n";
+    SetVersion($DBversion);
+}
+
+
 =head1 FUNCTIONS
 
 =head2 DropAllForeignKeys($table)