Commit graph

297 commits

Author SHA1 Message Date
Ian Walls
a0dc124a95 Bug 3881: OPAC Privacy reimplementation
Reimplements Paul Poulain's original OPAC Privacy patch, with some minor improvements and changes to wording

If the library enables the OPACPrivacy system preference along with the opacreadinghistory preference, and sets
an AnonymousPatron (must be a valid patron number in the database), the user will see a new tab upon login to
the OPAC, My Privacy.  From there, the user can:

- Set their OPAC Privacy to one of three values
  0 - Forever.  This keeps their reading history unless they explicitly delete it; the bulk anonymiser won't touch it
  1 - Default.  Keep reading history until either they delete it or the library does
  2 - Never.    Instantly anonymises reading history upon item return

- Instantly delete their reading history
  There is a warning and a popup to confirm.  I've removed Paul's extra confirm checkbox, which seemed redundant

A note of which preference the patron has selected is added to the Patorn Details page in the staff client.  This is read-only.

This patch also consolidates Privacy system preferences into the Privacy section of the OPAC tab.

Thank you to BibLibre for the original implmentation of this patch, and Los Gatos Public Library for funding and
testing the reimplementation.

Signed-off-by: Nicole Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-01-31 22:23:50 +13:00
Mason James
f46b03cf2d Bug 4289: 'OpacPublic' feature
applied to git tag 'v3.02.00-rc'

Frédéric Demians:

  - Rebased this patch to HEAD
  - Solved a merge conflict
  - The patch works as described here:
    http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=4289

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Jared Camins-Esakov <jcamins@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-01-19 14:30:34 +13:00
Katrin Fischer
c6a9141413 Bug 3381 - Add an IntranetUserCSS system preference
Add an IntranetUserCSS sys pref that works like OPACUserCSS in OPAC only for intranet.
2010-12-13 08:01:41 +01:00
1bd67e28e5 Bug 5066 (Log timestamp consistently in _session_log)
Small fix with thanks to Galen.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2010-11-18 09:00:10 +13:00
d4f02c469b Fix for Bug 4359, noItemTypeImages not active in OPAC
- Auth.pm put the noItemTypeImages preference under "intranet only."
  Moved it to "OPAC or intranet."
- Added check for the preference on the OPAC advanced search page.
- Improved logic for displaying images on the reading history page.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2010-11-13 20:19:12 +13:00
Chris Cormack
f9299b1a76 Merge remote branch 'kc/master' 2010-11-01 10:56:05 +13:00
2b8470ddf8 bug 3756: start removing references to disused sysprefs
holdCancelLength
PINESISBN
sortbynonfiling
TemplateEncoding

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-10-21 20:35:35 -04:00
Chris Cormack
f245998ac9 Merge commit 'kc/master'
Conflicts:
	docs/history.txt
2010-06-25 10:43:18 +12:00
0700a8b732 bug 4896: granular permissions now always on (DB rev 138)
Per the following koha-devel thread, the use of
staff user subpermissions, AKA granular permissions, is
now the default behavior in Koha.  This patch removes
the GranularPermissions system preference.

[1] http://lists.koha-community.org/pipermail/koha-devel/2010-February/033670.html

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-06-19 07:56:03 -04:00
Chris Cormack
4c14cd317e Merge commit 'kc/master' 2010-06-14 09:15:00 +12:00
Andrew Elwell
8480f56370 Another batch of POD cleanups
Signed-off-by: Andrew Elwell <Andrew.Elwell@gmail.com>
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-06-09 08:38:56 -04:00
Jane Wagner
fde1abd82e Bug 4394 REVISED Allow opaccolorstylesheet syspref to use an external URL
Previous code would only allow for an auxiliary stylesheet on the same server.  This checks for
http in the opaccolorstylesheet syspref.  If it's found, sets a different variable pointing to the
remote server location.  If not found, retains the previous css directory path.

Also modifies the description of opaccolorstylesheet in the installer files to reflect current
usage as an auxiliary stylesheet.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2010-05-17 12:32:46 +12:00
46737a702c fixed Syndetics breakage
Reverts part of commit 7b12e07 that removed references
to the Syndetics sysprefs in C4::Auth for no apparent reason.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-05-05 12:11:30 -04:00
86c82d0aaa Fix to enable Amazon cover images in the staff client.
Since this fix enables the previously-missing variable
'AmazonEnabled' in Auth.pm, this will also enable other
Amazon content in the staff client like Product
Descriptions and Amazon Similar Items (See Bug 3863)

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-04-29 21:03:58 -04:00
Donovan Jones
593a7d8e6a Bug 2505 - Add commented use warnings where missing in *.pm 2010-04-21 20:28:51 +12:00
Lars Wirzenius
4523a2df0d Fix file permissions: if it is not a script, it should not be executable.
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-04-16 00:40:34 -04:00
777e5d53cd fix typo in variable name
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-03-17 09:15:45 -04:00
Srdjan Jankovic
863938f16c Escape input that goes in HTML; Reworked search history insert SQL
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-03-17 09:12:01 -04:00
b340fb834c bug 4314: add using_https environment variable
Added new HTML template variable, using_https, for use
of OPAC or staff-side templates that may need to know
whether to use http:// or https:// links to off-site
content.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-03-16 20:23:35 -04:00
Lars Wirzenius
7279f55b60 Fix FSF address in directory C4/
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-03-16 20:17:56 -04:00
79b8fca2b1 Additional changes to fix Bug 3920, XSLTdetailDisplay syspref controls both OPAC and Intranet
This patch adds XSLTDetailsDisplay and XSLTResultsDisplay variables
for the staff client, OPACXSLTDetailsDisplay and OPACXSLTResultsDisplay
variables to the OPAC. Note that the XSLTResultsDisplay doesn't actually
do anything because no one has added an XSLT version of search results
to the staff client.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-02-10 22:36:25 -05:00
ff4d456072 Bug 3920 - Add 2 syspref to activate XSLT use in OPAC/Intranet
- Add two syspref:
  - OPACXSLTResultsDisplay
  - OPACXSLDetailsDispay
- Add them to .pref files and dispatch them beetween OPAC and Search
  tab.
- Upgrade DB version to 3.2 .113
- Fix something wrong in UNIMARCslim2intranetDetail.xsl
- Display OPAC result and detail pages using those syspref.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-02-08 08:08:44 -05:00
1f54d10475 Fix for Bug 4073, Add globally template variable for dateformat setting
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-02-02 18:37:37 -05:00
Nahuel ANGELINETTI
800494a5ef (bug #4004) disallow access for non-logged in users in opac
This doesn't define borrowernumber = 0 if a borrower is NOT logged.
We know borrowernumber 0 is mysqluser... So in virtualshelves, a non logged user have all permissions.
2010-01-28 15:11:52 +01:00
Kyle M Hall
2d1d4cd6e7 OpacAddMastheadLibraryPulldown
In the current OPAC, there is no easy way to search a particular library.
By default, a user searches all libraries, or with SearcMyLibraryFirst turn on,
the user's home library. In dev_week, a library pulldown menu existed in the search masthead.

This commit adds the option to bring that pulldown menu back
by turning on the system preference OpacAddMastheadLibraryPulldown
2010-01-20 22:38:23 +01:00
9cdf370f67 Fix for Bug 3589, OpacHighlightedWords sys pref does nothing 2010-01-15 10:12:28 +01:00
ec48133f71 Bug 3863 - Amazon Content Not Working
Sysprefs were not sent to templates.
2009-12-20 14:27:03 +01:00
Henri-Damien LAURENT
5b9ed679c5 haspermission signature had changed 2009-11-23 17:05:55 +01:00
Matthias Meusburger
54b6b9bd1d Remove ticket parameter from auto added hidden fields.
(Normal login directly after a failed CAS login didn't work previously to this removal)
2009-11-23 16:37:54 +01:00
Matthias Meusburger
c92bc8d73b Added debug mode for CAS warn messages 2009-11-23 16:34:31 +01:00
Matthias Meusburger
26d85c3cd6 Add missing return when CAS user is invalid 2009-11-23 16:32:40 +01:00
Henri-Damien LAURENT
36a01ea347 Second CAS version : CAS and non-CAS login can coexist
Conflicts solved :

	C4/Auth.pm
	opac/opac-main.pl
2009-11-23 16:26:35 +01:00
Matthias Meusburger
77ab8970f1 Add a syspref for CAS logout 2009-11-23 16:23:27 +01:00
Matthias Meusburger
acdd090246 Moved CAS configuration from config file to sysprefs 2009-11-23 16:23:20 +01:00
Henri-Damien LAURENT
7126496210 First CAS version : when CAS is enabled, login through CAS is mandatory
Conflicts solved C4/Auth.pm
2009-11-23 16:21:37 +01:00
Nahuel ANGELINETTI
2bf19bc97a (bug #3674) allow users creation with disabled password 2009-11-19 10:40:28 +01:00
Paul Poulain
ed047fead8 adding XSLT for intranet (UNIMARC only, MARC21 will be done by kf)
- the XSLTParse4Display sub now has a new parameter : the interface (intranet or opac)
- the XSLTdisplay sysprefs is common to staff & opac (Auth.pm)
- added UNIMARC xslt in intranet templates (modified to deal with staff/opac differences)
2009-11-10 22:23:50 +01:00
Matthias Meusburger
38b3a375b4 MT 1110, Follow-up : Balance cart and lists : cart is now in the intranet 2009-10-14 15:27:40 +02:00
Paul Poulain
7b12e07d3b adding acquisition as sub-perm managed module
+ some reindenting
2009-09-30 11:30:14 +02:00
Henri-Damien LAURENT
feeafa8168 Adding Opac-SearchHistory feature
Enables ppl to store their search history and delete the whole history

Adding Storable required by Opac-Search-History

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-09-30 11:22:21 +02:00
Michael Hafen
5de6ec3c15 Avoid potentially unnecessary database call in Auth
Auth, after verifying the session/logging in the user, calls to the database
to get the users borrowernumber.  This call is probably unnecessary because
borrowernumber is part of userenv.  Check userenv before going to the database.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-09-14 20:29:39 -04:00
Nicole Engard
6dd6af59c2 Bug 2576: Added OPACFinesTab Syspref
This preference allows library staff to decide whether to show
the fines tab in the OPAC for logged in patrons.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-09-06 13:47:35 -04:00
Nicole Engard
e71c8a4343 Bug 1172: Added OPACPatronDetails system preference
This patch allows library staff to disable the patron details
tab on the OPAC.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-09-06 13:47:34 -04:00
de66ef5c49 bug 3564 follow: ensure NoZebra is passed to templates
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-08-30 22:07:09 -04:00
Joe Atzberger
41d3e534d2 Fix Maintenance page.
Without this, the mainenance page would not display because of:
Cannot use undefined value as a HASH reference in C4/Auth.pm

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-08-09 13:08:43 -04:00
MJ Ray
d3c734c750 Use strftime to format sessionlog times
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-15 12:43:28 -05:00
Joe Atzberger
f35b144668 Pull the last OPAC-specific tmpl vars out of gettemplate.
These don't belong every template, only on OPAC:
~ opacstylesheet
~ opaccolorstylesheet
~ opacsmallimage

The latter 2 were already being populated in C4::Auth anyway.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-05 17:03:13 -05:00
Ryan Higgins
ca5e412c1b bug 3244: Support for multiple PAC interfaces.
Adds three env vars allowing url-specific search limits, and defining
how the limit interacts with 'SearchMyLibraryFirst'.
See http://wiki.koha.org/doku.php?id=en:development:rfcs3.2:rfc32_multiple_opac

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-27 10:52:23 -05:00
Joe Atzberger
ccb64c18ee Bug 3177 - haspermission offers bogus option
$intflags was never used or returned if hashref instead of userid was passed.
Also cleaned up needless passing of $dbh.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-01 07:16:20 -05:00
Joshua Ferraro
65ddce02f2 Serials Display Enhancement
Allows specification of how many issues of a subscription to display
at a global and subscription-specific level. Also adds a link to the
detail page to a specific subscription.

Signed-off-by: Daniel Sweeney <daniel.sweeney@liblime.com>
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-03 16:41:38 -05:00
Joshua Ferraro
3d65e44d5c Syndetics and Amazon bugfix enhancements
This patch resolves a number of problems related to Enhanced Content:

1. Previously, there was no syspref for controlling whether or not to display
Amazon.com cover images apart from other content. This had the side effect
of preventing use of amazon.com content alongside use of another provider's
images. This patch introduces AmazonCoverImages and OPACAmazonCoverImages,
and changes the name of AmazonContent to AmazonEnabled.

So, for instance, you can now enable OPACAmazonSimilarItems yet utilize
SyndeticsCoverImages for displaying those similar items.

NOTE TO DOCUMENTATION TEAM: please update references to AmazonContent
and OPACAmazonContent to comply with the above.

2. Fixes some semantically incorrect uses of AmazonContent (now OPACAmazonEnabled)
on the OPAC side.

3. Resolves once and for all, the normalization of ISBN,UPC,EAN and OCLC numbers
for all enhanced content elements; These elements can be normalized using the
new functions in C4::Koha; I've replaced use of the various previously used
variables $xisbn,$norm_isbn,$clean_isbn, etc with $isbn, and the template
variable normalized_isbn.

We finally have a single, consistant place to retrieve normalize values for
these fields given a particular record.

4. Adds Syndetics attribution statements to display of all Syndetics content
'enhanced content provide by Syndetics' or 'Enhanced Description from Syndetics'

5. Adds an option to view the large cover image on the detail page on the OPAC
when using SyndeticsCoverImages; this option is controlled by a new system
preference: SyndeticsCoverImageSize which has two values: MC (medium) LC (large)

6. Adds UPC and OCLC numbers for Syndetics enhanced content queries especially
helpful for finding enhanced content for DVD and Music materials

7. Adds capability to display Syndetics images to opac-user for checkouts and overdues

8. Updates to systempreferences.sql, and updatedatabase.pl database revision 015

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-27 17:23:51 -05:00
Joshua Ferraro
9abcd844f5 Add Syndetics AuthorNotes, Awards, Series
This patch also includes a new function to retrieve the index
page from Syndetics and parse it for available content prior to
retrieving content; this is done to speed up syndetics content
by not retrieving content that doesn't exist for an item. However,
Syndetics continues to be a very slow service compared to Amazon.com
and other enhanced content services

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-27 17:23:50 -05:00
Joshua Ferraro
11bd4a7660 Adds Syndetics Reviews
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-27 17:23:50 -05:00
Joshua Ferraro
9806abf865 Adds support for Syndetics Excerpts and Editions
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-27 17:23:50 -05:00
Joshua Ferraro
3d46ed59ee Add System Prefs for Syndetics to Auth
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-27 17:23:49 -05:00
Galen Charlton
638482cf1a fix permissions error 2009-03-06 13:18:00 -06:00
Nahuel Angelinetti
3213ffc859 fix the sql request to work in all mysqls
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-06 13:18:00 -06:00
Mason James
f295d4d223 fixes missing 'STDERR', causing 500 error below..
malformed header from script. Bad header=## checkpw - checking LDAP: mainpage.pl,

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-04 08:07:29 -06:00
Andrew Elwell
b49d937e2c more Minor documentation fixes
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-02-26 14:45:58 -06:00
Joe Atzberger
07d1eae7cc Remove hardcoded "Freelist" line from Auth.
Apparently a leftover debugging snippet.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-10-01 12:21:49 -05:00
Galen Charlton
a670f1817e bug 2509: fix file permissions
Following suggestion by Vincent Danjean for Debian
packaging, 0755 -> 0644 for non-executable
files.

Also removed shebang from a few modules in C4.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-08-21 18:55:02 -05:00
Jesse Weaver
c77969022b fix for bug 2477: Improve Speed of the Shelf Browser
This patch updates the queries for the shelf browser in opac-detail.pl for a
slight performance gain. It also adds a param for dateformat to C4::Auth to
fix a warning.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-08-21 16:49:49 -05:00
Galen Charlton
0bf4cdba9a bug 2459: fix module depedency error blocking SIP2
Ror a poorly understood (by me) reason, use of 'use
UNIVERSAL' and 'use C4::Auth' in the SIP2 code is resulting
in a compilation error, thus blocking SIP2 from working.

The error (prior to this patch) could be reproduced as follows:

cd C4/SIP
perl -I. -wc Sip/MsgType.pm
"get_session" is not exported by the C4::Auth module
Can't continue after import errors at /home/gmc/koha/dev/C4/VirtualShelves.pm
line 51
BEGIN failed--compilation aborted at /home/gmc/koha/dev/C4/VirtualShelves.pm
line 51.
Compilation failed in require at /home/gmc/koha/dev/C4/Auth.pm line 34.
BEGIN failed--compilation aborted at /home/gmc/koha/dev/C4/Auth.pm line 34.
Compilation failed in require at Sip/MsgType.pm line 21.
BEGIN failed--compilation aborted at Sip/MsgType.pm line 21.

or more minimally

perl -ce 'use UNIVERSAL; use C4::Auth;'

This patch works around the problem by making C4::Auth
and C4::VirtualShelves not import any symbols
from each other.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-08-04 15:26:54 -05:00
Chris Nighswonger
8bbef6380a kohabug 2456 Moving certain C4::VirtualShelves.pm subs from EXPORT
to EXPORT_OK and correcting associated syntax

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-08-04 15:26:52 -05:00
Chris Nighswonger
542c54e067 kohabug 2392 Changing array dereferencing syntax
It appears that Perl 5.10 does not like ${@$foo}[0] but rather wants $foo->[0]
The latter is also much more readable. This patch makes the change.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-07-24 11:26:16 -05:00
Chris Nighswonger
ed762eb989 Correcting bad session var that caused Lists link not to be displayed in anonymous sessions
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-07-23 06:49:51 -05:00
Chris Nighswonger
9971756a24 kohabug 2159 Improving "Lists" button list refreshes after adding/changing lists/shelves
Adding code to refresh "Lists" button lists display in OPAC masthead.inc

Adding javascript to force refresh of parent window to update "Lists" button menu

Adding query limits and ability to specify row count and offset in queries related to Virtualshelves.
Also added the ability to return total record counts for specified virtualshelves.

Adding C4::VirtualShelves::GetRecentShelves which returns a list of the most recently modified shelves for
a given set of parameters. This allows the user to be offered active private and open lists to add books
to in drop down menus while also allowing drop down menus to be limited to a reasonable length.
This also limits the shelves stored in the user's session to a fixed number. A further enhancement might
be to add a syspref to enable a staff member to define the limit. Currently it is hardcoded at 10 per
list type (private/public-open).

Adding pagination to list/shelf related screens

Moving refresh shelves code into C4::VirtualShelves::RefreshShelvesSummary and tidying up a bit

Correcting several inconsistancies in the shelves templates as well as handling shelf management on
the intranet side correctly.

Correcting "Add To:" drop-down list to show only lists the patron has permission to add to

Correcting a few C4::VirtualShelves::GetShelvesSummary API calls

Modifications for template consistancy

Breaking up a 1367 char line of javascript in opac-results.tmpl

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-07-22 15:48:13 -05:00
Joshua Ferraro
52145c1589 Fix for bug 2115: OpacMaintenance wasn't working 2008-07-14 11:01:44 -05:00
60d585aed6 Hide User Tags link when TagsEnabled preference is turned off. Change to Auth.pm allows TagsEnabled preference to work on login screens.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-07-12 08:59:39 -05:00
Galen Charlton
c80b328aae clean up old-style calls to GetMemberDetails
GetMemberDetails() returns only one hashref now,
not two.  In all cases where the caller was
expecting two output values, the $flags return
was ignored anyway.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-25 11:39:22 -05:00
Joshua Ferraro
66b2a15f13 fix for 1913: Remove opaclargeimage system preference 2008-06-20 18:38:10 -05:00
Chris Nighswonger
14e2e4d540 bugfix for bug introduced by anonymous session code
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-20 16:48:51 -05:00
Andrew Moore
401c84cc09 Bug 2176 (2/5): adding patron interface to update messaging preferences
This patch allows patrons to update their messaging preferences. This
includes methods in C4::Members to manage patron messaging preferences.

added cgi script to allow patron to edit their messaging preferences

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-20 13:04:50 -05:00
Andrew Moore
3c547de448 refactor C4::Auth::get_template_and_user for readability
I'd like to add another template parameter to geta_template_and user, but found it diffiult due to unreadability.

I stanadardized the whitespace in a portion of get_template_and_user,
alphabetized the parameters, finding a duplicate in one spot,
and then extracted the common template parameters that are set the same
regardless of template type.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-20 13:04:48 -05:00
Chris Nighswonger
3cb7a9ac28 kohabug 2238 This patch allows patrons to add books to public open/free lists whether they are logged in or not.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-20 12:48:11 -05:00
Chris Nighswonger
3d377cd7c1 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>
2008-06-20 12:44:27 -05:00
Joshua Ferraro
7304a2e89b Revert "Bug fixing : get_user_permissions SQL Fixing"
From Galen: because code is part of the join, there is in fact no ambiguity

This reverts commit 3a05ae40f6.
2008-06-09 09:53:23 -05:00
Henri-Damien LAURENT
3a05ae40f6 Bug fixing : get_user_permissions SQL Fixing
user_sub_permissions join introduced ambivalence for permissions field

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-09 06:51:05 -05:00
Henri-Damien LAURENT
00adf3d9af Bugfix : generating session id on some systems was not defined
Explicitly naming the method to generate id is required on some systems
(SUN 4)

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-09 06:51:02 -05:00
Galen Charlton
fe65447e5b OPACBaseURL - do not tack on :443 if using SSL
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-03 05:59:47 -05:00
Galen Charlton
5e5ce6b7f9 calculate OPACBaseURL instead of using syspref
Calculate OPACBaseURL from the
CGI environment variables instead of using the
system preference.  As a result of this patch,
it should be possible to change the hostname,
protocol, or port of the OPAC without having to
reset a system preference.

Also added a FIXME to opac/unapi - the URL of
the SRU/W server has no necessary relationship
to the URL of the OPAC.

Once this patch is confirmed, the syspref can
be removed.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-02 00:51:08 -05:00
Galen Charlton
a7ba1bb941 kohabug 2105: prevent crash on IE7
Three scripts were incorrect setting the HTTP type
header to 'utf-8' instead of something appropriate
like 'text/html' - Firefox evidentally can ignore that
mistake, but IE7 does not.

Fixed by replacing an invalid print of the HTTP header
and template output with a call to
C4::Output::output_html_with_http_headers.

Also corrected POD in C4::Auth and InstallAuth to
reflect correct use of output_html_with_http_headers.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-13 17:40:36 -05:00
Henri-Damien LAURENT
f59c9706a4 change in yuipath management 1/2 Noupdatedatabase.pl
now yuipath is added in C4::Output and uses themelang
In my opinion, all the general variables that are used in output should get in C4::Output (since there is theme lang computed.)
rather than in C4::Auth

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-12 15:46:35 -05:00
Joshua Ferraro
f093a84974 Fixing bug 1629: RSS Feeds of Search Results in OPAC 2008-05-01 18:55:13 -05:00
Joshua Ferraro
d83a055504 Adding authorised value icons display in the search results
pages.
2008-04-30 21:07:29 -05:00
cfc2b0e184 Adding a couple missing variables for opac login screen (opacheader,OpacUserCSS); Minor tweak to OPAC tags on opac-detail
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-28 05:55:57 -05:00
Joshua Ferraro
ad0d08ef33 Improvements to the results display in the OPAC, merging style
between the XSL and non-XSL stuff. Refining style of tags display,
adding back links to place hold, add to list, and add to cart on
results page
2008-04-23 16:00:46 -05:00
Joshua Ferraro
dfe310868f Adding TagsEnabled to list of known sysprefs, adding 'my tabs'
to the OPAC user portal
2008-04-22 21:00:56 -05:00
Galen Charlton
83f8e22aec renamed CheckSpecificUserPermissions to GranularPermissions
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-10 15:53:45 -05:00
Galen Charlton
7a2a241fa3 fix crash when attempting login as user w/o 'catalogue' permission
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-10 15:53:38 -05:00
Galen Charlton
70d33a82bb granular permissions - C4::Auth
Enhanced the permission-checking functions in C4::Auth
(e.g., get_template_and_user, checkauth, check_api_auth, etc.).

If the CheckSpecificUserPermissions syspref is OFF, the behavior
of those APIs is unchanged.

If CheckSpecificUserPermissions is ON, then the value of each
key in the flagsrequired hash is considered during
the permissions check:

  1. if the value is 1, the staff user must have
     all privileges for the userflags flag (or module)
     referred to by the hash key, e.g.,

     { flaqsrequired => { tools => 1 } }

     In terms of the database, this means that the
     corresponding bit must be set in borrowers.flags.

  2. If the value is '*', the staff user must
     have at least one of the permissions for the
     userflag/module, but it doesn't matter which one.

     In terms of the database, this means ether that the
     corresponding bit must be set in borrowers.flags or
     that there at least is one row in user_permissions
     for the staff user and bit/module combination.

  3. If the value is any other string, it must be
     a permissions code defined in the permissions table.
     The staff user must have that specific permission
     or have access to all functions of the module

     In terms of the database, this means ether that the
     corresponding bit must be set in borrowers.flags or
     that there is a matching row in user_permissions
     for the staff user, bit/module, subpermission
     code combination.

In addition, get_template_and_user is modified so that the
CAN_user_XXX variables that it sets also includes the
subpermissions available (CAN_user_XXX_YYY, e.g.,
CAN_user_tools_import_patrons).  The template variables
for the specific permissions are set regardless of whether
CheckSpecificUserPermissions is ON or OFF so that the templates
don't have to test for that syspref explicitly.

In addition, the meaning of CAN_user_XXX has changed slightly -
CAN_user_tools, for example, is set to 1 in the template if the
user has access to *any* of the tools functions.  This was done
to simply the logic for deciding whether to display a menu
item in the staff interface are not.  This does mean that
when specific subpermissions are added to (say) the circulate
module, each use of CAN_user_circulate will need to be examined
to see if the intent is to allow the user to get at a circ
menu or page or if the user really should be required to have
all circulate functions.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-10 15:53:13 -05:00
c51316a594 Correction to prevent js error when table has no data.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-01 06:41:11 -05:00
Joshua Ferraro
556721e86a Experimental XSLT-based display of results and details pages To enable, create two new YesNo sysprefs: XSLTDetailsDisplay and XSLTResultsDisplay, and set them to ON. Feature to be expanded in a future version, this experimental code is for proof of concept only and doesn't introduce any changes if sysprefs are not created.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-03-21 21:49:04 -05:00
7ec49e693a Fix to enable OPACUserCSS preference (allows user to add CSS globally in the OPAC via an embedded style block)
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-03-19 15:46:21 -05:00
a4e22029cc Updates to tweak the way suggestions and suggestions links display when various suggestions-related prefs are on or off.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-03-19 15:46:16 -05:00
Chris Nighswonger
73dde7a03a Correcting warn concerning kohaversion.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-03-19 15:44:44 -05:00
80de0e0692 Fix for Bug 1951, OPACURLOpenInNewWindow doesn't do anything.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-03-18 15:18:45 -05:00
Joshua Ferraro
9b1d024b4c adding a <meta> field to make Koha's OPAC discoverable
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-03-18 10:40:17 -05:00
Andrew Moore
a59c28db3e fixing bug 1801
adding some parameters to the call to opac-auth.tmpl in C4::Auth::checkauth
This displays the additional navigational links in the masthead on the login page to unauthenticated users.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-03-18 09:44:43 -05:00
Joshua Ferraro
db101d35d0 fix for bug 1781 for NOZebra=OFF
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-03-17 22:35:19 -05:00