From 8ab71ea66d80f50bdc0e8a29de6f7fef0613f493 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 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 ++++++++ .../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 6e9f449..219e917 100755 --- a/circ/circulation.pl +++ b/circ/circulation.pl @@ -597,7 +597,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 adc2f1e..f3045a1 100755 --- a/circ/returns.pl +++ b/circ/returns.pl @@ -591,7 +591,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 db9fd84..7fd1f29 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -383,7 +383,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 b06142c..353b5bd 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -9608,6 +9608,14 @@ if ( CheckVersion($DBversion) ) { SetVersion ($DBversion); } +$DBversion = "3.19.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 %]