Bug 27487: Rename system preference reviewson to OPACComments

This patch renames the reviewson system pref to OPACComments

Test Plan:
1. In Koha Administration, search for the reviewson system preferance
2. Note the presence of the reviewson system preferance
3. Apply the patch and run updatedatabase.pl
4. Repeat steps 1 and 2. The reviewson preferenace should be gone
5. Seach for and note the OPACComments system preferance
6. Ensure that the OPACComments system preferance operates correctly, as
if it were reviewson

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

https://bugs.koha-community.org/show_bug.cgi?id=27484

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
James O'Keeffe 2021-01-21 05:23:31 +00:00 committed by Jonathan Druart
parent ede297cfab
commit dc1eeab6bd
8 changed files with 14 additions and 9 deletions

View File

@ -261,7 +261,7 @@ sub BuildReport {
opacuserlogin
QuoteOfTheDay
RequestOnOpac
reviewson
OPACComments
ShowReviewer
ShowReviewerPhoto
SocialNetworks

View File

@ -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");
}

View File

@ -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'),

View File

@ -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"

View File

@ -310,7 +310,7 @@
<a href="/cgi-bin/koha/opac-authorities-home.pl">Authority search</a>
</li>
[% 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 ) ) %]
<li class="nav-item">
<a href="/cgi-bin/koha/opac-showreviews.pl">Recent comments</a>
</li>

View File

@ -561,7 +561,7 @@
</li>
[% END %]
[% IF Koha.Preference( 'reviewson' ) == 1 %]
[% IF Koha.Preference( 'OPACComments' ) == 1 %]
<li id="tab_comments"><a href="#comments">Comments[% ' ( ' _ (reviews.size || 0) _ ' )' | html %]</a></li>
[% END %]
@ -881,7 +881,7 @@
</div>
[% END # / IF LibraryThingForLibrariesID && LibraryThingForLibrariesTabbedView %]
[% IF Koha.Preference( 'reviewson' ) == 1 %]
[% IF Koha.Preference( 'OPACComments' ) == 1 %]
<div id="comments">
<div id="newcomment"></div>
[% IF ( reviews ) %]
@ -954,7 +954,7 @@
</div>
[% END # / IF loggedinusername %]
</div> <!-- / #comments -->
[% END # / IF reviewson %]
[% END # / IF OPACComments %]
[% IF ( OPACFRBRizeEditions && XISBNS ) %]
<div id="editions">

View File

@ -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,

View File

@ -522,7 +522,7 @@ sub mocking_systempreferences_to_a_set_value {
opacuserlogin
QuoteOfTheDay
RequestOnOpac
reviewson
OPACComments
ShowReviewer
ShowReviewerPhoto
SocialNetworks