[Koha-patches] [PATCH] Bug 10553 - Public lists not available from OPAC login page

Owen Leonard oleonard at myacpl.org
Mon Jul 8 20:52:28 CEST 2013


If you are not logged in to the OPAC, looking at the login page, and you
click the Lists button to see public lists it says there are none. This
patch corrects Auth.pm so that it loads the list of public lists in this
situation.

To test you must have at least one public list. Make sure you are logged
out of the OPAC and visit the login page (/cgi-bin/koha/opac-user.pl).
Clicking the "Lists" button should show you a list of public shelves.
---
 C4/Auth.pm |    8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/C4/Auth.pm b/C4/Auth.pm
index 3c0b804..e3fda83 100644
--- a/C4/Auth.pm
+++ b/C4/Auth.pm
@@ -1030,6 +1030,14 @@ sub checkauth {
     $template->param( OpacPublic => C4::Context->preference("OpacPublic"));
     $template->param( loginprompt => 1 ) unless $info{'nopermission'};
 
+    if($type eq 'opac'){
+        my ($total, $pubshelves) = C4::VirtualShelves::GetSomeShelfNames(undef, 'MASTHEAD');
+        $template->param(
+            pubshelves     => $total->{pubtotal},
+            pubshelvesloop => $pubshelves,
+        );
+    }
+
     if ($cas) {
 
     # Is authentication against multiple CAS servers enabled?
-- 
1.7.9.5


More information about the Koha-patches mailing list