Commit graph

2021 commits

Author SHA1 Message Date
Paul POULAIN
7ff55f6c40 BUGFIX issuingrules : total for all itemtype was not properly calculated
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-30 14:01:11 -05:00
Paul POULAIN
c01d0d65a1 small (UNIMARC) fix, error in regexp writing
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-30 11:49:37 -05:00
Mason James
90c25f0498 bug-2149, var fix - changing borr.cardnumber to borr.userid.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-30 11:13:02 -05:00
Mason James
b461a041d0 bug-2149, added new block to C4::Letters::SendAlerts() to email 'account creation' notice, and new block in memberentry.pl to call SendAlerts().
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-30 11:11:22 -05:00
Joe Atzberger
a5f90c7d68 Repair Labels code to accomodate patroncards. Purged EXPR.
Major FIXME's still remain, like the use of GET instead of POST.
The code is also a bit too INCLUDE-happy to net good performance.
The entire mechanism of adding to a batch should probably be proper
AJAX instead of the GET-centric opener.location approach.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-30 10:01:08 -05:00
c4072c8fe9 Fixing some typos, including, I believe, Bug 2174 ("spelling error in web installer")
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-30 10:01:07 -05:00
Joe Atzberger
fddba9685c minor cleanup, remove $sth->finish's. No documentation impact.
For details: see http://search.cpan.org/~timb/DBI-1.14/DBI.pm
"There's no need to call finish if you're about to destroy or re-execute the statement handle."
In all these cases the sth is falling out of scope, about to be destroyed.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-30 10:01:06 -05:00
Joe Atzberger
6d3a490c04 is_ajax function added. pagination_bar now intelligent: it has
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-30 08:52:02 -05:00
Joe Atzberger
a101cd2d82 Tags AJAX integration on OPAC details page, so it behaves like results.
Also, prevent duplicate tags (same user, biblio and term).  Strip
leading/trailing whitespace from term.  Block whitespace terms.
The CSS for details could be enhanced to emphasize tagstatus more.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-29 07:04:54 -05:00
Joe Atzberger
2ba8763bb4 Fines repair. Make fines2.pl work, give feedback, improve comments and perldoc.
Remove $dbh->disconnect statements as counterproductive.
Prevent description field from begining with whitespace.
Added robust debug elements.  Test script behavior with:
    perl misc/cronjobs/fines2.pl -v
and:
	mysql> select * from accountlines;

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-29 07:04:42 -05:00
Joe Atzberger
e0c1b0031b Adding basic get_filters to Tags, centralizing "counts" code for Terms Summary.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-29 07:04:41 -05:00
Joe Atzberger
a99164a3a1 Single FIXME comment inserted.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-29 07:04:39 -05:00
Joe Atzberger
f36b8fd59a Commented out fixaccounts (not used anywhere). Also improved getnextacctno.
You can test getnextacctno like:
	perl -e 'use C4::Accounts; print getnextacctno(33), "\n";'
where 33 is a borrowernumber out of the accountlines table.  Get that number like:
	mysql> select borrowernumber,accountno from accountlines LIMIT 100;

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-29 07:04:37 -05:00
Joe Atzberger
dca0e73aed Correct number of args to getnextacctno.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-29 07:04:35 -05:00
Joe Atzberger
1ebc373d18 Unescape Comment, now that we trust Scrubber to block bad markup.
Obviously if we are going to allow good markup, we can't then escape it.
Documentation reference: allowed tags for comments are:
	br b i em big small strong

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-29 06:30:51 -05:00
Joe Atzberger
bbb3f00955 Initial commit for Tags back-end moderation. Requires AJAX functions from Output.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-29 06:22:44 -05:00
Joe Atzberger
cbabfaaa5f New subs for moderation, fixed bug to allow multiple sort fields, added POD.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-29 06:22:43 -05:00
Joe Atzberger
ec5c3d0ee2 Add AJAX output sub, EXPORT_TAGS and enable loop_context_vars for HTML::Template::Pro.
The loop_context_vars will be very useful in display.  They are:
__first__, __last__, __inner__, __odd__, __counter__.
Note: apparently __even__ does not exist, so instead use something like:
<!-- TMPL_UNLESS NAME="__odd__" -->

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-29 06:22:41 -05:00
Paul POULAIN
c07939757f BUGFIXING authority link in detail.pl
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-27 07:37:20 -05:00
Ryan Higgins
302da68ce5 Fill statistics table properly for renewals; and issue->checkout, return->checkin
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-27 07:33:30 -05:00
Ryan Higgins
f924ff5fe7 add URLLinkText syspref to opac detail, and add some extra handling for MARC 21 urls.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-27 07:33:21 -05:00
1bf93a36db Facets (current) translatable via template
This patch allows to translate facets label with standart
templates / PO files. Facets are still hard coded in Koha.pm.
Template wait those hard coded facets: Topics, Places, Titles,
Autors and Libraries.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-27 07:26:31 -05:00
Andrew Moore
5838b70b06 removing warnings from C4::Members::GetMember
C4::Members::GetMember emitted a few unnecessary warnings when no $type was passed in. This patch prevents that.

No functional or documentation changes.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-27 06:52:17 -05:00
Galen Charlton
35ff682f6f minor POD improvement
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-19 16:07:07 -05:00
Joshua Ferraro
2a092b710b Fixing isbn regex to not match unless isbn is valid
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-19 13:12:18 -05:00
Joshua Ferraro
13bddb5818 Fixing Amazon.com Similar Items and Editions features
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-17 20:37:18 -05:00
Henri-Damien LAURENT
89fa713124 Bug Fixing : ModMember and memberentrygen.tmpl
Problem with ModMember : parameters were not passed safely
memberentrygen.tmpl deleted guarantorid for a children if step2 or step3 used fore edition.
Changeing TMPL_IF EXPR into TMPL_IF Name

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-16 08:21:09 -05:00
Galen Charlton
496b6c8ef4 bugfix - fix 'not' operator in NoZebra
Corrected bug that prevented the 'not' operator
from working consistently - i.e., a search of
'mice not men' would not always work.

Also added test cases for NoZebra, so far focusing on
NZanalyse and adding and deleting bibs.  A couple of
the test cases are currently known to fail and
therefore are marked TODO.  The tests in question
are to verify that rows in nozebra are removed if
no bib is linked to the relevant word.  However, it
looks like such rows are retained, just with
nozebra.biblionubmers set to ''.  Is there any
reason to keep these rows?

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-16 08:18:25 -05:00
Galen Charlton
c6d507f8a9 kohabug 2020 - fix infinite loop in NoZebra on Perl 5.10
When running Koha in NoZebra mode under Perl 5.10, a search
containing a operator (e.g., "mice and men") could cause
a bib search to enter into an infinite loop in NZanalyse.

This possibility arises from the fact that NZanalyse used
to use capture variables from regular expressions without
verifying whether the regular expressions actually matched.
It was compounded by the fact that NZanalyse is recursive;
however, because $1, $2, etc. are dynamically scoped,
*they are not automatically cleared when NZanalyse calls
itself*.

Consequently, if the search string contains a boolean
operator, it would be split into

left = mice
operator = and
right = men

Then NZanalyse would be called recursively on the search
string 'mice'.  However, because $1, $2, and $3 are not
automatically cleared when the function is called again,
and because they are not cleared if a match fails, the code
would fail to recognize that 'mice' is leaf, and would
call NZanalyse('mice') repeatedly, to the promotion of
warm server rooms.

The wrinkle in this is that because of a bug in Perl 5.8, a
failing matches can sometimes alter the capture variables, thus
avoiding the infinite recursion.  However,  this bug was fixed in
Perl 5.10, leading to the NZanalyse bug becoming evident.

The Perl bug is described at http://rt.perl.org/rt3/Public/Bug/Display.html?id=19049
and the fix http://public.activestate.com/cgi-bin/perlbrowse/p/29279.

The fix to the Koha code is to check whether each regexp
that uses capture variables matches or fails, then act
accordingly.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-16 08:18:24 -05:00
Andrew Moore
5d2fde5d58 Bug 1953: removing potential SQL injections from C4::Calendar::_init
This patch changes the 4 select statements in C4::Calendar::_init.
tests for this method were included in a previous patch.

There are more potential problems in C4::Calendar::delete_holiday, but that
method seems to have deeper bugs than just these. I'll open another bug for
them if I can figure out how it's supposed to work.

No documentation changes necessary.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-13 17:41:21 -05:00
Andrew Moore
c6d5b75d6d Bug 1953: adding tests and 2 corrections for C4::Calendar
In the course of writing tests for C4::Calendar, I found two bugs and am fixing them here.
One is a documentation bug.
The other prevented C4::Calendar::insert_exception_holiday from working. I was unable
to find anywhere else in the code that depended on the broken behaviour.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-13 17:41:20 -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
Galen Charlton
c1ae207d54 kohabug 1621 - add subtitle to main results and details pages
Including the subtitle in search results and OPAC and staff
details templates.  The subtitle is expected to be in the
MARC subfield that is mapped to the (now nonexistant) column
bibliosubtitle.subtitle.

This is a fairly hackish patch that is meant to be minimally
disruptive while allowing subtitles to be displayed for those
not using the experimental XSLT bib display feature.  It
does *not* cover all cases where you have a MARC
record and want to display its subtitle.

UNIMARC notes: at the moment, none of the fr-FR UNIMARC
frameworks appear to be map any subfields to bibliosubtitle.subtitle.
This could be changed, but caveat programmer: the UNIMARC 200$e
is repeatable (meaning that get_koha_field_from_marc will put in ' | '
between multiple subtitles) and one may want to also include the
200$d (parallel title).  A GetMarcSubtitle routine may be in order
if absolutely necessary.

This points to a long-term need to make display of MARC (and later, hopefully,
non-MARC) bib records more flexible - the XSLT feature is one approach;
there may be others.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-13 17:40:34 -05:00
Galen Charlton
472d77353e patron cleaning - do not delete staff borrowers
Adjusted C4::Members::GetBorrowersWhoHaveNotBorrowedSince so
that staff member records are not selected for deletion.

This functionality change is motivated by the consideration
that a staff member who is authorized to operate Koha is
not necessarily a prolific user of the library's services.
If a batch purge job for inactive staff records is really need,
it should be a separate tool.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-13 17:40:33 -05:00
Galen Charlton
b42b8da0d6 kohabug 1573 - properly count patrons to delete
When both the patron delete and patron anonymize checkboxes
were selected, the patron cleaning tool would not
properly register the number of patrons to delete.  Fixed
by correcting form input handling.

Also, count of patrons to delete or anonymous now correct
when running with IndependentBranches = ON.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-13 17:40:32 -05:00
Henri-Damien LAURENT
20b72f1253 Adding Optionnal suggestion creation when renewing subscription.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-13 16:45:07 -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
Andrew Moore
56b9f5b882 bug 1953: fixing potential SQL injection problems in C4::Branch::GetBranches
I moved C4::Branch::GetBranches to use bind parameters and wrote some tests to demonstrate functionality.

No functional or documentation changes here.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-12 15:07:17 -05:00
Paul POULAIN
dfcdc73be6 bugfix : ship utf-8 encoding in mail header
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-12 10:07:55 -05:00
Henri-Damien LAURENT
9fb4a72122 Bug Fixing 1782 patch
Adding a new routine GetBorrowercategoryList in C4/Member
Displaying categoryname when listing categories in memberentrygen.pl
using categorytype returned with GetMember wherever it is possible.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-12 09:42:25 -05:00
Ryan Higgins
a9b7e08077 fix error on lastincrement.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-12 09:29:15 -05:00
Ryan Higgins
b54401ac66 C4::Circulation::FixOverduesOnReturn now handles dropbox mode.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-12 09:29:14 -05:00
Ryan Higgins
97f8b3abff Make dropbox mode obey Calendar module according to CircControl branch.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-12 09:29:13 -05:00
Ryan Higgins
a315de5281 Alter Overdues::CalcFine to use Dates objects.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-12 09:29:12 -05:00
Ryan Higgins
f230264b24 C4::Calendar::addDate now handles negative offsets properly.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-12 09:29:09 -05:00
Ryan Higgins
0b92b75ff8 Alter C4::Calendar::daysBetween() to take C4::Dates objects.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-12 09:29:07 -05:00
Galen Charlton
5c1d14d822 C4::Members::SearchMember - support attributes
Modified SearchMember() so that if the patron attributes
feature is on (i.e., ExtendedPatronAttributes is ON), it
is possible to search for patrons on any attributes whose
type is set as staff searchable.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-12 09:03:04 -05:00
Galen Charlton
7e8ff3f4b8 C4::Koha - added GetAuthorisedValueCategories
New convenience function to get list of authorised
value categories.

No user-visible changes.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-12 09:03:02 -05:00
Galen Charlton
d75cc041f6 new C4 modules for patron attributes
Two new modules to support patron attributes:

- C4::Members::AttributeTypes

  OO-module for managing patron attribute types.

- C4::Members::Attributes

  Procedural module for retrieving and setting
  extended attributes belonging to a patron.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-12 09:03:00 -05:00
Ryan Higgins
bd30b60a8a Alter itemBarcodeInputFilter T-Prefix.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-11 07:03:53 -05:00