From 9b75109625b5acc00c7f6b5ae5944c4e21878fb0 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Thu, 19 Jun 2014 08:21:43 -0400 Subject: [PATCH] [SIGNED OFF] Bug 11431 [2] - Rename soundon to AudioAlerts, move to it's own preference section Signed-off-by: Nick Clemens --- circ/circulation.pl | 2 +- circ/returns.pl | 2 +- installer/data/mysql/sysprefs.sql | 2 +- installer/data/mysql/updatedatabase.pl | 8 ++++++++ .../intranet-tmpl/prog/en/includes/doc-head-close.inc | 2 +- .../prog/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 c766e88..97e0ef3 100755 --- a/circ/circulation.pl +++ b/circ/circulation.pl @@ -542,7 +542,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 d99f58c..0d67b46 100755 --- a/circ/returns.pl +++ b/circ/returns.pl @@ -596,7 +596,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 7eb08a8..8026818 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -363,7 +363,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 de77bf3..24e6cff 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -8613,6 +8613,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 d9f9171..9a0b9f5 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 %]