kohabug 1875 Public lists/virtualshelves are displayed and viewable whether a patron...
authorChris Nighswonger <chris.nighswonger@liblime.com>
Wed, 11 Jun 2008 12:10:02 +0000 (07:10 -0500)
committerJoshua Ferraro <jmf@liblime.com>
Fri, 20 Jun 2008 17:44:27 +0000 (12:44 -0500)
commit3d377cd7c1858bb865f8da7126961f888ca15692
treea4923d104036153da17e91c9e41d9a308367870b
parent7ac682c85918eb94d6f74c4bd02c92d493d69536
kohabug 1875 Public lists/virtualshelves are displayed and viewable whether a patron is logged in or not.

NOTE: This patch introduces code which generates an anonymous session when a patron first browses to OPAC.
This anonymous session contains a minimal amount of information including the results of a query to discover
all public lists/shevles. When the user logs in, the anonymous session is cleared and a new session created
for that user.

kohabug 1875 - fix error when editing a patron record

C4::Auth::checkauth was not distinguishing between a
'userid' input from an OPAC or staff login form and
a 'userid' input from (e.g.,) the patron editor.
Consequently, adding or editing a patron record would
result in Koha trying to log in as the new patron.

To resolve this, added a hidden input to all login
forms, 'koha_login_context', to explicitly signal
when a login is occurring.  The value of this input
can be 'opac', 'intranet', or 'sco' - the value is
not used at present, but may be of use later.

C4::Auth - added debug flag to two warns

kohabug 1875 - create anonymous sessions only for OPAC

No need to create an anonymous session for the intranet.

set yuipath correct for login pages

When preparing the template parameters for a login form,
C4::Auth was overriding the value of yuipath set
by C4::Output::gettemplate(), thus causing 404 errors
if the 'yuipath' syspref was set to 'local'.

kohabug 1875 - avoid warns viewing lists anonymously

During an anonymous OPAC session, the $loggedinuser variable
is not set.  As the undefined value causes warns in
C4::VirtualShelves::Page::shelfpage, for the purpose of the
shelfpage call the loggedinuser is set to -1, which should
not correspond to any real borrower number.

This is admittedly a hack to avoid digging through all
of C4::VirtualShelves to deal with lists viewed anonymously.

kohabug 1875 Refactoring of &ModShelf to avoid overwriting list owner needlessly

kohabug 1875 Avoid warning if can't find owner of shelf

Since virtualshelves.owner is not a true FK of borrowersnumber.number,
set ownername to '' if can't find the patron

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
C4/Auth.pm
C4/VirtualShelves.pm
C4/VirtualShelves/Page.pm
koha-tmpl/intranet-tmpl/prog/en/modules/auth.tmpl
koha-tmpl/opac-tmpl/prog/en/modules/opac-auth.tmpl
koha-tmpl/opac-tmpl/prog/en/modules/opac-main.tmpl
koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tmpl
koha-tmpl/opac-tmpl/prog/en/modules/sco/sco-main.tmpl
opac/opac-shelves.pl