Bugzilla – Attachment 115496 Details for
Bug 27503
Rename system preference virtualshelves to OpacLists
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27503: Rename system preference virtualshelves to AllowLists
Bug-27503-Rename-system-preference-virtualshelves-.patch (text/plain), 9.46 KB, created by
James O'Keeffe
on 2021-01-21 03:21:05 UTC
(
hide
)
Description:
Bug 27503: Rename system preference virtualshelves to AllowLists
Filename:
MIME Type:
Creator:
James O'Keeffe
Created:
2021-01-21 03:21:05 UTC
Size:
9.46 KB
patch
obsolete
>From 13bf1dc07a2565de45f2c78904b9b3c4dde8c902 Mon Sep 17 00:00:00 2001 >From: James O'Keeffe <jamespfk@gmail.com> >Date: Thu, 21 Jan 2021 03:12:51 +0000 >Subject: [PATCH] Bug 27503: Rename system preference virtualshelves to > AllowLists > >This patch renames virtualshelves to AllowLists > >Test plan: >1. In Koha Administration, search System preferences for virtualshelves >2. Note the virtualshelves preference >3. Apply the patch and run updatedatabase.pl >4. Search system preferances for virtualshelves, there should be no >results >5. Search system preferances for AllowLists >6. ensure that the preferance runs correctly, as if it were >virtualshelves. >--- > .../data/mysql/atomicupdate/bug_27503-add_AllowLists_syspref.perl | 5 +++++ > installer/data/mysql/mandatory/sysprefs.sql | 2 +- > koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc | 2 +- > koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref | 2 +- > koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt | 2 +- > koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc | 2 +- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt | 4 ++-- > opac/opac-serial-issues.pl | 2 +- > opac/opac-shareshelf.pl | 4 ++-- > opac/opac-shelves.pl | 4 ++-- > serials/serials-collection.pl | 2 +- > 11 files changed, 18 insertions(+), 13 deletions(-) > create mode 100644 installer/data/mysql/atomicupdate/bug_27503-add_AllowLists_syspref.perl > >diff --git a/installer/data/mysql/atomicupdate/bug_27503-add_AllowLists_syspref.perl b/installer/data/mysql/atomicupdate/bug_27503-add_AllowLists_syspref.perl >new file mode 100644 >index 0000000000..fcd3f402a4 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_27503-add_AllowLists_syspref.perl >@@ -0,0 +1,5 @@ >+$DBversion = 'XXX'; >+if( CheckVersion( $DBversion ) ) { >+ $dbh->do(q{UPDATE systempreferences SET variable="AllowLists" WHERE variable="virtualshelves" }); >+ NewVersion( $DBversion, 27503, "Renaming virtualshelves to AllowLists"); >+} >diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql >index 7f0afaa594..93e6b64a8c 100644 >--- a/installer/data/mysql/mandatory/sysprefs.sql >+++ b/installer/data/mysql/mandatory/sysprefs.sql >@@ -713,7 +713,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('viewISBD','1','','Allow display of ISBD view of bibiographic records','YesNo'), > ('viewLabeledMARC','0','','Allow display of labeled MARC view of bibiographic records','YesNo'), > ('viewMARC','1','','Allow display of MARC view of bibiographic records','YesNo'), >-('virtualshelves','1','','If ON, enables Lists management','YesNo'), >+('AllowLists','1','','If ON, enables Lists management','YesNo'), > ('WaitingNotifyAtCheckin','0',NULL,'If ON, notify librarians of waiting holds for the patron whose items they are checking in.','YesNo'), > ('WebBasedSelfCheck','0',NULL,'If ON, enables the web-based self-check system','YesNo'), > ('WhenLostChargeReplacementFee','1',NULL,'If ON, Charge the replacement price when a patron loses an item.','YesNo'), >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc >index 15c075591b..e72f9eecaf 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc >@@ -161,7 +161,7 @@ CAN_user_serials_create_subscription ) %] > </li> > </ul> > </div> >- [% END # /IF virtualshelves %] >+ [% END # /IF AllowLists %] > > <div class="btn-group"><a id="printbiblio" class="btn btn-default"><i class="fa fa-print"></i> Print</a></div> > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref >index c5532ca5e4..54e4da446f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref >@@ -54,7 +54,7 @@ Administration: > '#': "#'s" > - > - "Allow staff and patrons to create and view saved lists of books: " >- - pref: virtualshelves >+ - pref: AllowLists > choices: > yes: "Yes" > no: "No" >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt >index 80ef59b67e..94f05c0f20 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt >@@ -125,7 +125,7 @@ > </li> > </ul> > </div> >- [% END # /IF virtualshelves %] >+ [% END # /IF AllowLists %] > > [% IF ( CAN_user_reserveforothers_place_holds && DisplayMultiPlaceHold ) %] > [% IF ( holdfor or holdforclub ) %] >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc >index 885a487a36..025b123dbc 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc >@@ -78,7 +78,7 @@ > [% END # / IF opacuserlogin %] > </div> <!-- / .dropdown-menu --> > </li> <!-- / .nav-item.dropdown --> >- [% END # / IF virtualshelves %] >+ [% END # / IF AllowLists %] > </ul> <!-- / .navbar-nav --> > > [% IF Koha.Preference( 'opacuserlogin' ) == 1 || Koha.Preference( 'EnableOpacSearchHistory') || Koha.Preference( 'opaclanguagesdisplay' ) %] >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt >index becfbf99bb..95072df5f8 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt >@@ -266,7 +266,7 @@ > [% END %] > [% END %] > [% END # IF RequestOnOpac %] >- [% END # IF virtualshelves %] >+ [% END # IF AllowLists %] > [% END # IF opacbookbag%] > </td> > >@@ -811,7 +811,7 @@ > param1 += "<option value=\"morelists\">[ "+_("More lists")+" ]<\/option>"; > [% END %] > param1 +="<option value=\"newlist\">"+_("[ New list ]")+"<\/option>" >- [% END # /IF virtualshelves %] >+ [% END # /IF AllowLists %] > param1 += "<\/select> <input type=\"submit\" class=\"btn btn-sm btn-primary\" value=\""+_("Save")+"\" />"; > [% END # /IF opacbookbag || virtualshelves %] > >diff --git a/opac/opac-serial-issues.pl b/opac/opac-serial-issues.pl >index 74e5abbc55..7b47c15dfc 100755 >--- a/opac/opac-serial-issues.pl >+++ b/opac/opac-serial-issues.pl >@@ -76,7 +76,7 @@ if ( $selectview eq "full" ) { > yearmax => $yearmax, > bibliotitle => $title, > suggestion => C4::Context->preference("suggestion"), >- virtualshelves => C4::Context->preference("virtualshelves"), >+ virtualshelves => C4::Context->preference("AllowLists"), > ); > > } >diff --git a/opac/opac-shareshelf.pl b/opac/opac-shareshelf.pl >index 7eecf6c45f..cb44e8fa7a 100755 >--- a/opac/opac-shareshelf.pl >+++ b/opac/opac-shareshelf.pl >@@ -38,8 +38,8 @@ use Koha::Virtualshelves; > use Koha::Virtualshelfshares; > > >-# if virtualshelves is disabled, leave immediately >-if ( ! C4::Context->preference('virtualshelves') ) { >+# if AllowLists is disabled, leave immediately >+if ( ! C4::Context->preference('AllowLists') ) { > my $query = CGI->new; > print $query->redirect("/cgi-bin/koha/errors/404.pl"); > exit; >diff --git a/opac/opac-shelves.pl b/opac/opac-shelves.pl >index b94b4126ea..d2e3366efb 100755 >--- a/opac/opac-shelves.pl >+++ b/opac/opac-shelves.pl >@@ -46,8 +46,8 @@ my $query = CGI->new; > > my $template_name = $query->param('rss') ? "opac-shelves-rss.tt" : "opac-shelves.tt"; > >-# if virtualshelves is disabled, leave immediately >-if ( ! C4::Context->preference('virtualshelves') ) { >+# if AllowLists is disabled, leave immediately >+if ( ! C4::Context->preference('AllowLists') ) { > print $query->redirect("/cgi-bin/koha/errors/404.pl"); > exit; > } >diff --git a/serials/serials-collection.pl b/serials/serials-collection.pl >index 14c5a44ff7..0995dd4a4b 100755 >--- a/serials/serials-collection.pl >+++ b/serials/serials-collection.pl >@@ -200,7 +200,7 @@ $template->param( > yearmax =>$yearmax, > bibliotitle => $title, > suggestion => C4::Context->preference("suggestion"), >- virtualshelves => C4::Context->preference("virtualshelves"), >+ virtualshelves => C4::Context->preference("AllowLists"), > routing => C4::Context->preference("RoutingSerials"), > subscr=>scalar $query->param('subscriptionid'), > subscriptioncount => $subscriptioncount, >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 27503
:
115487
|
115496
|
115499
|
115647