From 9c29f0d7a053f38308a61e0bb5e73ce6daba1d83 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Thu, 19 Jun 2014 08:21:43 -0400 Subject: [PATCH] Bug 11431 [2] - Rename soundon to AudioAlerts, move to it's own preference section --- circ/circulation.pl | 2 +- circ/returns.pl | 2 +- installer/data/mysql/sysprefs.sql | 2 +- installer/data/mysql/updatedatabase.pl | 8 ++++++++ .../prog/en/includes/doc-head-close.inc | 2 +- .../en/modules/admin/preferences/circulation.pref | 13 +++++++------ 6 files changed, 19 insertions(+), 10 deletions(-) diff --git a/circ/circulation.pl b/circ/circulation.pl index 91851d2..cc59e00 100755 --- a/circ/circulation.pl +++ b/circ/circulation.pl @@ -741,7 +741,7 @@ $template->param( inprocess => $inprocess, is_child => ($borrowernumber && $borrower->{'category_type'} eq 'C'), circview => 1, - soundon => C4::Context->preference("SoundOn"), + AudioAlerts => C4::Context->preference("AudioAlerts"), fast_cataloging => $fast_cataloging, CircAutoPrintQuickSlip => C4::Context->preference("CircAutoPrintQuickSlip"), activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''), diff --git a/circ/returns.pl b/circ/returns.pl index a95a17c..1e274ff 100755 --- a/circ/returns.pl +++ b/circ/returns.pl @@ -594,7 +594,7 @@ $template->param( dropboxmode => $dropboxmode, dropboxdate => output_pref($dropboxdate), overduecharges => $overduecharges, - soundon => C4::Context->preference("SoundOn"), + AudioAlerts => C4::Context->preference("AudioAlerts"), BlockReturnOfWithdrawnItems => C4::Context->preference("BlockReturnOfWithdrawnItems"), ); diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index 5e4ce7c..41ff2d2 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -364,7 +364,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('SlipCSS','',NULL,'Slips CSS url.','free'), ('SMSSendDriver','','','Sets which SMS::Send driver is used to send SMS messages.','free'), ('SocialNetworks','0','','Enable/Disable social networks links in opac detail pages','YesNo'), -('soundon','0','','Enable circulation sounds during checkin and checkout in the staff interface. Not supported by all web browsers yet.','YesNo'), +('AudioAlerts','0','','Enable circulation sounds during checkin and checkout in the staff interface. Not supported by all web browsers yet.','YesNo'), ('SpecifyDueDate','1','','Define whether to display \"Specify Due Date\" form in Circulation','YesNo'), ('SpecifyReturnDate',1,'','Define whether to display \"Specify Return Date\" form in Circulation','YesNo'), ('SpineLabelAutoPrint','0','','If this setting is turned on, a print dialog will automatically pop up for the quick spine label printer.','YesNo'), diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index c68ba51..d8ea64b 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -8560,6 +8560,14 @@ if ( CheckVersion($DBversion) ) { SetVersion($DBversion); } +$DBversion = "3.17.00.XXX"; +if ( CheckVersion($DBversion) ) { + $dbh->do(q{UPDATE systempreferences SET variable = 'AudioAlerts' WHERE variable = 'soundon'}); + + print "Upgrade to $DBversion done (Bug 11169 - Add OPACAcquisitionDetails syspref)\n"; + SetVersion($DBversion); +} + =head1 FUNCTIONS =head2 TableExists($table) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc index 25d14e2..2d375bd 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc @@ -62,7 +62,7 @@ [% END %] -[% IF soundon %] +[% IF AudioAlerts %]