@@ -, +, @@ --- C4/UsageStats.pm | 2 +- installer/data/mysql/atomicupdate/bug_27487-add_syspref.perl | 5 +++++ installer/data/mysql/mandatory/sysprefs.sql | 2 +- koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref | 2 +- koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc | 2 +- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt | 6 +++--- opac/opac-detail.pl | 2 +- t/db_dependent/UsageStats.t | 2 +- 8 files changed, 14 insertions(+), 9 deletions(-) create mode 100644 installer/data/mysql/atomicupdate/bug_27487-add_syspref.perl --- a/C4/UsageStats.pm +++ a/C4/UsageStats.pm @@ -261,7 +261,7 @@ sub BuildReport { opacuserlogin QuoteOfTheDay RequestOnOpac - reviewson + OPACComments ShowReviewer ShowReviewerPhoto SocialNetworks --- a/installer/data/mysql/atomicupdate/bug_27487-add_syspref.perl +++ a/installer/data/mysql/atomicupdate/bug_27487-add_syspref.perl @@ -0,0 +1,5 @@ +$DBversion = 'XXX'; +if( CheckVersion( $DBversion ) ) { + $dbh->do(q{UPDATE systempreferences SET variable="OPACComments" WHERE variable="reviewson" }); + NewVersion( $DBversion, 27847, "Rename 'reviewson' to 'OPACComments"); +} --- a/installer/data/mysql/mandatory/sysprefs.sql +++ a/installer/data/mysql/mandatory/sysprefs.sql @@ -570,7 +570,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('ReturnBeforeExpiry','0',NULL,'If ON, checkout will be prevented if returndate is after patron card expiry','YesNo'), ('ReturnLog','1',NULL,'If ON, enables the circulation (returns) log','YesNo'), ('ReturnpathDefault','',NULL,'Use this email address as return path or bounce address for undeliverable emails','Free'), -('reviewson','1','','If ON, enables patron reviews of bibliographic records in the OPAC','YesNo'), +('OPACComments','1','','If ON, enables patron reviews of bibliographic records in the OPAC','YesNo'), ('RisExportAdditionalFields', '', NULL , 'Define additional RIS tags to export from MARC records in YAML format as an associative array with either a marc tag/subfield combination as the value, or a list of tag/subfield combinations.', 'textarea'), ('RoundFinesAtPayment','0', NULL,'If enabled any fines with fractions of a cent will be rounded to the nearest cent when payments are coll ected. e.g. 1.004 will be paid off by a 1.00 payment','YesNo'), ('RoutingListAddReserves','0','','If ON the patrons on routing lists are automatically added to holds on the issue.','YesNo'), --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref @@ -445,7 +445,7 @@ OPAC: no: "Don't allow" - patrons to make purchase suggestions on the OPAC. - - - pref: reviewson + - pref: OPACComments choices: yes: Allow no: "Don't allow" --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc +++ a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc @@ -310,7 +310,7 @@ Authority search [% END %] - [% IF ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'reviewson' ) == 1 ) && ( Koha.Preference( 'OpacShowRecentComments' ) == 1 ) ) %] + [% IF ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'OPACComments' ) == 1 ) && ( Koha.Preference( 'OpacShowRecentComments' ) == 1 ) ) %] --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt +++ a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt @@ -561,7 +561,7 @@ [% END %] - [% IF Koha.Preference( 'reviewson' ) == 1 %] + [% IF Koha.Preference( 'OPACComments' ) == 1 %]
  • Comments[% ' ( ' _ (reviews.size || 0) _ ' )' | html %]
  • [% END %] @@ -881,7 +881,7 @@ [% END # / IF LibraryThingForLibrariesID && LibraryThingForLibrariesTabbedView %] - [% IF Koha.Preference( 'reviewson' ) == 1 %] + [% IF Koha.Preference( 'OPACComments' ) == 1 %]
    [% IF ( reviews ) %] @@ -954,7 +954,7 @@
    [% END # / IF loggedinusername %] - [% END # / IF reviewson %] + [% END # / IF OPACComments %] [% IF ( OPACFRBRizeEditions && XISBNS ) %]
    --- a/opac/opac-detail.pl +++ a/opac/opac-detail.pl @@ -900,7 +900,7 @@ my $coins = eval { $biblio->get_coins }; $template->param( ocoins => $coins ); my ( $loggedincommenter, $reviews ); -if ( C4::Context->preference('reviewson') ) { +if ( C4::Context->preference('OPACComments') ) { $reviews = Koha::Reviews->search( { biblionumber => $biblionumber, --- a/t/db_dependent/UsageStats.t +++ a/t/db_dependent/UsageStats.t @@ -522,7 +522,7 @@ sub mocking_systempreferences_to_a_set_value { opacuserlogin QuoteOfTheDay RequestOnOpac - reviewson + OPACComments ShowReviewer ShowReviewerPhoto SocialNetworks --