Mark Tompsett [Tue, 17 Jul 2012 12:53:57 +0000 (20:53 +0800)]
Bug 8458 - $stemmed_operand in C4::Search _build_stemmed_operand is not initialized. Added =q{} to initialize it to the empty string at declaration time.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
David Cook [Thu, 12 Jul 2012 01:26:56 +0000 (11:26 +1000)]
Bug 8422 - Fix impossible warning in circulation.pl when OverduesBlockCirc set to Block
Previously, the message Patron has x overdue item(s). Checkout anyway? was shown when syspref OverduesBlockCirc was set to Ask for confirmation or Block.
This patch changes the message for Block to: Checkouts are BLOCKED because patron has overdues.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Bug 6720 follow-up: use authtypetext instead of summary
Although auth_types.summary contains a string describing the type of
authority in MARC21, it does not in UNIMARC. auth_types.authtypetext
contains the proper label in both marcflavours.
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Due to a peculiarity in the way SearchAuthorities worked, the authority
search results on the OPAC always listed the authority type that the
user searched for, rather than the authority type of the results.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works nicely, result list for OPAC search now shows the authority type
for each record.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Rebased 20 June 2012.
Signed-off-by: Mirko Tietgen <5p4m@gmx.de>
Works as expected.
Bug 8386: Error in duplicate detection message for authorities
If you create a new authority record and the name already exists in
your database, you get a duplicate warning. This is good, but there is
a small error in the message:
Duplicate record suspected
Is this a duplicate of HASH(0x47fa670)?
This patch corrects the error message to show the title.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Error message correctly shows the name after applying this patch.
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Owen Leonard [Mon, 9 Jul 2012 19:48:23 +0000 (15:48 -0400)]
Bug 8398 - Missing image file in staff global css
This patch fixes a regression introduced by the fix for
Bug 6855 (bullet point showing in wrong place on error message)
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6855
The patch removes the re-introduced reference to a
background image which has since been removed. Testers should
check that this patch does not re-introduce Bug 6855.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
I checked the styling of the error messages in Chromium and Firefox.
The logs are no longer complaining about the missing image.
Looks good to me.
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Katrin Fischer [Sat, 14 Jul 2012 09:37:42 +0000 (11:37 +0200)]
Bug 8381: Fix adding limits to search history for logged in users
Due to renaming of some variables the limits were only working for 'anonymous'
users. This patch fixes some variables, so limits are also added to history
when the user is logged in.
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com> Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Alex Arnaud [Fri, 13 Jul 2012 09:13:47 +0000 (11:13 +0200)]
Bug 8381 - Paging broken in OPAC search results
Fix also freezing for some browser when performing a search query.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Checked paging (previous, next and navigating to page numbers) works.
Browser performance is fixed too.
Kyle M Hall [Wed, 6 Jun 2012 13:41:02 +0000 (09:41 -0400)]
Bug 8063 - Followup - Bug fix
$OUTPUT being used but not being declared.
When trying to run this script I gat a nasty:
15:42 ~/koha.dev/koha-community (new/bug_8063 $%)$ ./misc/cronjobs/gather_print_notices.pl
Global symbol "$OUTPUT" requires explicit package name at ./misc/cronjobs/gather_print_notices.pl line 81.
Global symbol "$OUTPUT" requires explicit package name at ./misc/cronjobs/gather_print_notices.pl line 95.
Global symbol "$OUTPUT" requires explicit package name at ./misc/cronjobs/gather_print_notices.pl line 102.
Global symbol "$OUTPUT" requires explicit package name at ./misc/cronjobs/gather_print_notices.pl line 106.
Global symbol "$OUTPUT" requires explicit package name at ./misc/cronjobs/gather_print_notices.pl line 120.
Global symbol "$OUTPUT" requires explicit package name at ./misc/cronjobs/gather_print_notices.pl line 127.
Execution of ./misc/cronjobs/gather_print_notices.pl aborted due to compilation errors.
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Before the patch:
$perl -wc ./misc/cronjobs/gather_print_notices.pl
Global symbol "$OUTPUT" requires explicit package name at
[...]./misc/cronjobs/gather_print_notices.pl line 81.
./misc/cronjobs/gather_print_notices.pl had compilation errors.
With this patch:
$perl -wc ./misc/cronjobs/gather_print_notices.pl
./misc/cronjobs/gather_print_notices.pl syntax OK
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Kyle M Hall [Tue, 22 May 2012 12:05:05 +0000 (08:05 -0400)]
Bug 8063 - Followup - Make C4/Letters.pm conform to PBP
Perlcritic reported the following errors:
Subroutine prototypes used at line 96, column 1. See page 194 of PBP. (Severity: 5)
Subroutine prototypes used at line 120, column 1. See page 194 of PBP. (Severity: 5)
Subroutine prototypes used at line 152, column 1. See page 194 of PBP. (Severity: 5)
Subroutine prototypes used at line 173, column 1. See page 194 of PBP. (Severity: 5)
Subroutine prototypes used at line 190, column 1. See page 194 of PBP. (Severity: 5)
Subroutine prototypes used at line 227, column 1. See page 194 of PBP. (Severity: 5)
"return" statement with explicit "undef" at line 228, column 31. See page 199 of PBP. (Severity: 5)
"return" statement with explicit "undef" at line 229, column 31. See page 199 of PBP. (Severity: 5)
"return" statement with explicit "undef" at line 236, column 9. See page 199 of PBP. (Severity: 5)
Subroutine prototypes used at line 668, column 1. See page 194 of PBP. (Severity: 5)
"return" statement with explicit "undef" at line 669, column 27. See page 199 of PBP. (Severity: 5)
Subroutine prototypes used at line 719, column 1. See page 194 of PBP. (Severity: 5)
Subroutine prototypes used at line 865, column 1. See page 194 of PBP. (Severity: 5)
Subroutine prototypes used at line 899, column 1. See page 194 of PBP. (Severity: 5)
Subroutine prototypes used at line 981, column 1. See page 194 of PBP. (Severity: 5)
"return" statement with explicit "undef" at line 982, column 28. See page 199 of PBP. (Severity: 5)
Subroutine prototypes used at line 1000, column 1. See page 194 of PBP. (Severity: 5)
"return" statement with explicit "undef" at line 1001, column 27. See page 199 of PBP. (Severity: 5)
"return" statement with explicit "undef" at line 1004, column 9. See page 199 of PBP. (Severity: 5)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Bug 8251 - Follow up, use 'day' instead of 'days' for Datetime::truncate
As noted in comment #4 by Jonathan Druart, this should be fixed in every call
to DateTie::truncate function. This patch does exactly that.
julian_m tested that truncate( to => 'days' ) didn't actually do anything, so
it is understandable that this 'fix' might introduce new bugs as we might have
'fixed' at a higher libs level this issue.
'minutes' is used in truncate function too, so fixing.
Signed-off-by: Dobrica Pavlinusic <dpavlin@rot13.org> Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Bug 8353: Adds a test to check for missing sysprefs in the database
Adds a non-test mode (--showsql option) that displays the missing
sysprefs as sql inserts. Some sysprefs were missed from the syspref
file due to extra spaces in the insert : fixed. The test now checks if
there are at least as many sysprefs in the database as in the syspref
file (instead of checking for the exact number)
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Cherrypicked from BibLibre master, rebased onto current master, and
corrected typos, 2012-07-03
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Katrin Fischer [Mon, 9 Jul 2012 20:23:27 +0000 (22:23 +0200)]
Bug 6394: purchase order has French strings hard coded in
On the purchase order it said 'publié par' - instead of 'published by'.
The layout files for PDF generation in basket groups contain lots of English
strings, this change makes the template more consistent.
Currently the files are not translatable. The only way is to add translated
files to your installation.
To test:
Print a basket group as PDF. Verify string is ok for both possible settings
of system preference OrderPdfFormat:
- pdfformat::layout3pages
- pdfformat::layout2pages
Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com> Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
This patch touches a lot of code, but basically it removes version
information from use C4::* in our code.
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
All script still compiles after the patch (confirmed by pre-applypatch hook)
Owen Leonard [Fri, 22 Jun 2012 18:12:49 +0000 (14:12 -0400)]
Bug 8283 - Replace usage of YUI Cookie utility with jQuery Cookie plugin
Switching from YUI Cookie utility to jQuery Cookie plugin. The
jQuery Cookie plugin is already used elsewhere in Koha, so no new
dependencies are added. The YUI Cookie files are removed.
To test, go to batch item deletion and/or batch item modification
and submit a set of barcodes. On the confirmation screen select
or deselect columns to show. Start over and submit your barcodes
again. The confirmation screen should remember which columns you
previously selected.
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Fixes the following things:
1. Sanitizes log output to prevent an attacker from using a specially
crafted POST to add extra lines to the log
2. Simplify a regular expression since "..file" cannot be used to
escape the current directory
3. Makes sure directories are consistent
4. Correct logic issues in misc/cronjobs/backup.sh
Thanks to Frere Sebastien Marie for catching these issues.
Signed-off-by: Robin Sheat <robin@catalyst.net.nz> Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
This patch builds on work by Lars Wirzenius for the Koha packages.
To date, the only way for a Koha librarian to obtain a complete backup
of their system has been to log into the system via SSH (or FTP) to
download the mysqldump file. This patch makes it possible for
superlibrarians in properly configured systems to download night backups
via the staff client's Export tool.
Recognizing that this is functionality with potentially very grave
security implications, system administrators must manually enable these
features in the koha-conf.xml configuration file.
The following configuration settings have been added to the koha-conf.xml
file:
* backupdir => directory where backups should be stored.
* backup_db_via_tools => whether to allow superlibrarians to download
database backups via the Export tool. The default is disabled, and
there is no way -- by design -- to enable this option without manually
editing koha-conf.xml.
* backup_conf_via_tools => whether to allow superlibrarians to download
configuration backups via the Export tool (this may be applicable to
packages only). The default is disabled, and there is no way -- by
design -- to enable this option without manually editing koha-conf.xml.
This commit modifies the following scripts to make use of the new
backupdir configuration option:
* koha-dump and koha-run-backups in the Debian packages
* The sample backup script misc/cronjobs/backup.sh
Note that for security reasons, superlibrarians will not be allowed
to download files that are not owned by the web server's effective user.
This imposes a de facto dependency on ITK (for Apache) or running the
web server as the Koha user (as is done with Plack).
To test:
1. Apply patch.
2. Go to export page as a superlibrarian. Notice that no additional
export options appear because they have not been enabled.
3. Add <backupdir>$KOHADEV/var/spool</backup> to the <config> section
of your koha-conf.xml (note that you will need to adjust that so that
it is pointing at a logical directory).
4. Create the aforementioned directory.
5. Go to export page as a superlibrarian. Notice that no additional
export options appear because they have not been enabled.
6. Add <backup_db_via_tools>1</backup_db_via_tools> to the <config>
section of your koha-conf.xml
7. Go to the export page as a superlibrarian. Notice the new tab.
8. Go to the export page as a non-superlibrarian. Notice there is no
new tab.
9. Run: mysqldump -u koha -p koha | gzip > $BACKUPDIR/backup.sql.gz
(substituting appropriate user, password, and database name)
10. Go to the export page as a superlibrarian, and look at the "Export
database" tab. If you are running the web server as your Koha user,
and ran the above command as your Koha user, you should now see the
file listed as an option for download.
11. If you *did* see the file listed, change the ownership to something
else: sudo chown root:root $BACKUPDIR/backup.sql.gz
11a. Confirm that you no longer see the file listed when you look at the
"Export database" tab.
12. Change the ownership on the file to your web server (or Koha) user:
sudo chown www-data:www-data backup.sql.gz
13. Go to the export page as a superlibrarian, and look at the "Export
database" tab. You should now see backup.sql.gz listed.
14. Choose to download backup.sql.gz
15. Confirm that the downloaded file is what you were expecting.
If you are interested, you can repeat the above steps but replace
<backup_db_via_tools> with <backup_conf_via_tools>, and instead of
creating an sql file, create a tar file.
To test packaging: run koha-dump, confirm that it still creates a
usable backup.
------
This signoff contains two changes:
10-1. If no backup/conf files were present, then the message telling you
so doesn't appear and the download button does. Made them behave
correctly.
10-2. The test for a file existing required it to be owned by the
webserver UID. This change makes it so it only has to be readable.
Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Fixes the Save button functionality when YUI is set to be pulled
from Yahoo!'s servers, and adds a copyright statement to the
MARC21slim2MADS.xsl file.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Works now for both yuipaths.
Bug 8203: Add ability to save individual authorities
Adds the ability to save individual authority records in MADS, MARCXML, or
binary MARC format to the staff client.
To test:
1. Apply patch
2. View authority record in staff client
3. Try saving record as MADS, MARCXML, and MARC, and confirm that the
resulting files are what you expect
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works nicely, tested different export options on different records.
Kyle M Hall [Tue, 6 Mar 2012 15:53:30 +0000 (10:53 -0500)]
Bug 7065 - reserves table needs a primary key
Adds the primary key reserve_id to reserves and old_reserves.
Thanks to gmcharlt and jcamins for contributions.
Signed-off-by: MJ Ray <mjr@phonecoop.coop> Signed-off-by: Ian Walls <koha.sekjal@gmail.com>
Updated DBrev to start with 3.09... instead of 3.08... Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Bug 8256: Teach webservice to select reports by name
Adds the ability to pass a hash to C4::Reports::Guided::get_saved_report
which specifies a name or id to select the report.
Test plan:
1. Create a report (or choose an existing one), and mark it public
2. Run the report using the web service: [IntranetBaseURL]/cgi-bin/koha/svc/report?id=whatever
3. Confirm you get the expected results
4. Run the report by name using the web service: [IntranetBaseURL]/cgi-bin/koha/svc/report?name=[Report name] (keep spaces in the name)
5. Confirm you get the same results
6. Run the report using the public web service: [OPACBaseURL]/cgi-bin/koha/svc/report?id=whatever
7. Confirm you get the same results
8. Run the report by name using the public web service: [OPACBaseURL]/cgi-bin/koha/svc/report?name=[Report name] (keep spaces in the name)
9. Confirm you get the same results
10. Sign off
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
- Adding, editing and deleting reports works
- id parameter works
- new name parameter works
- public and non-public works
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Marc Veron [Sun, 24 Jun 2012 19:29:12 +0000 (21:29 +0200)]
Bug 8301 - Display additional system information (preferences) on About page to minimize support cases
To minimize support questions regarding common mistakes, the About
page should have an additional tab that displays warnings if depractated
and/or mutual excluding system preferences are used.
To test patch use values as displayed on screenshot attached.
New: Shows error message in Tab Server Information if Zebra server is not started
(...and changes added...)
Suggestions for other values to add are welcome.
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Bug 8383: Add test to check that Perl scripts compile
This patch adds t/db_dependent/00-strict.pl which tests that all Perl
scripts compile. I chose to use Test::Strict so that in the future we
can also have the test check that "use strict" and "use warnings" are
enabled.
To test:
1. Run t/db_dependent/00-strict.pl.
2. Run around waving your arms in the air that we have a couple of
scripts that don't compile.
3. Actually, that's about it. You could test my patch for bug 8384 next.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Moved test to t/db_dependent
Signed-off-by: Frédéric Demians <f.demians@tamil.fr> Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Fix syntax errors preventing the scripts misc/translator/text-extract2.pl
and misc/cronjobs/thirdparty/TalkingTech_itiva_inbound.pl from compiling.
Remove misc/migration_tools/build6xx.pl entirely since it refers to
columns that no longer exist in the Koha database, and has seemingly
had broken encoding since Koha switched from CVS to git (or before!).
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Colin Campbell [Tue, 19 Jun 2012 10:24:01 +0000 (11:24 +0100)]
Bug 8271 teach SIPServer.pm to set its own lib path
SIPServer.pm requires that C4/SIP is added to its lib
path This has been done by passing this directory
to it via -I. By using FindBin it can set the path
for itself correctly. This will also work if the C4/SIP
directory tree is moved to a non-standard location
Removed the now redundant -I. from sip_run.sh
Added a variable to sip_run.sh for the koha tree to
highlight a problem with the script if you have multiple
directories in the PERL5LIB environment variable
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Chris Hall [Thu, 21 Jun 2012 22:36:45 +0000 (10:36 +1200)]
bug 8323 fixing year sorting of a list
Signed-off-by: Marc Veron <veron@veron.ch>
Works as expected.
Caveat: If you edit the list in Opac, change the sort and then klick 'Save',
the List always is displayed in title order. This is du to the fact that
save calls opac-shelves.pl?viewshelf=4 without the sort parameter (defaults
to 'title').
If you go back to lists, choose the list from List name, the param is
correct and the list displays in expected order.
It took quite a time to track that down, I first thought that opac-shelves.pl
was broken.
However, current bug 8323 is not affected, signing off.
Marc
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Marc Balmer [Wed, 21 Mar 2012 17:18:45 +0000 (18:18 +0100)]
Bug 7787: Make the SIP server much more robust.
Be liberal in what we accept, but strict in what we send:
Never exit the server process, but send a SC_RESEND message (96)
to the client if we received anything we don't understand.
This is consistent with SIP server implementations of other ILSs.
Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com> Signed-off-by: Ian Walls <koha.sekjal@gmail.com> Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Julian Maurice [Mon, 2 Jul 2012 11:57:31 +0000 (13:57 +0200)]
Bug 7286: rebuild_zebra_sliced for biblios and authorities
Complete rewrite of rebuild_zebra_sliced.zsh (renamed to .sh). Main
improvements are:
- both biblio and authority records are handled
- records are exported only once
It also add an option --skip-index to rebuild_zebra.pl that permit to
use rebuild_zebra.pl as an 'export only' script.
Description:
Index Koha records by chunks. It is useful when some record causes
errors and stop the indexation process. With this script, if indexation
of one chunk fails, chunk is splitted in 2 (or 3) chunks, and
indexation continue on these chunks.
rebuild_zebra.pl is called only once to export records.
Splitting and indexing is handled by this script (using yaz-marcdump and
zebraidx).
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Mason James [Fri, 6 Jul 2012 04:19:51 +0000 (16:19 +1200)]
added date and ISBN tests to Koha.t
modified: Koha.t
$ prove -v ./Koha.t
1..5
ok 1 - use C4::Koha;
ok 2 - use C4::Members;
1..6
ok 1 - Insert data in database
ok 2 - GetAuthorisedValueByCode
ok 3 - GetKohaImageurlFromAuthorisedValues
ok 4 - lost and paid works
ok 5 - Child area works
ok 6 - Withdrawn works
ok 3 - Authorized Values Tests
1..4
ok 1 - C4::Koha->can('GetDailyQuote')
ok 2 - Got a quote based on id.
ok 3 - Got a random quote.
ok 4 - Got a quote based on today's date.
ok 4 - Daily Quotes Test
1..7
ok 1 - slashifyDate
ok 2 - xml_escape() returns empty string on undef input
ok 3 - xml_escape() works as expected
ok 4 - ... and does not change input in place
ok 5 - _isbn_cleanup removes hyphens
ok 6 - _isbn_cleanup removes parenthetical
ok 7 - _isbn_cleanup converts ISBN-13 to ISBN-10
ok 5 - Date and ISBN tests
ok
All tests successful.
Files=1, Tests=5, 1 wallclock secs ( 0.02 usr 0.01 sys + 0.48 cusr 0.06 csys = 0.57 CPU)
Result: PASS
Colin Campbell [Sat, 9 Jun 2012 14:17:14 +0000 (15:17 +0100)]
Bug 7619 Use CRLF as default terminator
Most units require or tolerate CRLF as the terminator
Using only \r causes many including 3M units to signal errors
due to delay this resets CRLF to be default but adds a single
constant variable and explanation so that if you have a
"strictly conforming" unit (the 'Baby' is the only I have encountered
you know where to make the change
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Lyon3 Team [Thu, 7 Jun 2012 09:39:57 +0000 (11:39 +0200)]
Permission for change password button in members toolbar should be borrowers instead of staffaccess
http://bugs.koha-community.org/show_bug.cgi?id=8242 Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Adds a separate tab on tools/export.pl for exporting authority records.
To test:
1. Try exporting authority records from the "Export data" tool
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tried different exports and everything worked nicely:
- removing fields from export (example: 942)
- limiting to one authority type
- changing the given file name
- exporting as MARC or XML
Owen Leonard [Thu, 21 Jun 2012 13:42:56 +0000 (09:42 -0400)]
Bug 8281 - Remove unused YUI files
This patch removes assets from the YUI library in the OPAC and
staff client which are unused by Koha
To test, visit pages which still use YUI components: buttons
and menus on circulation, for example. Drag-and-drop on
the basketgroups page, JSON parsing when filtering orders
on the Acquisitions Receive page (acqui/parcel.pl). All
of these pages should work without errors.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
In order to prevent spamming using sendbasket.pl, some counter-measure are done:
- permit send basket only for authenticated user
- permit send basket only if basket contains items
- use username & email for 'Reply-To' field (with fallback to KohaAdminEmailAddress)
- add field X-Orig-IP with IP of sender
- add field X-Abuse-Report with KohaAdminEmailAddress
Note: we don't use forged 'To' address with patron email in order to
prevent be marked as spam (by SPF for example).
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
There is a mis-scoped function call in C4::Auth, on line 154, where
GetMembers is called without explicit scoping and before
'require C4::Members;'. This does not actually have any functional
ramifications as far as I can tell, but it would be a good idea to fix
it.
This patch also corrects a bit of indenting in that area, because it was
an unnecessary challenge to understand the code with the mis-indenting.
Signed-off-by: Marc Veron <veron@veron.ch> Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Because updating the total issues count associated with a bibliographic
record on issue could cause a significant load on the server, this
commit adds the syspref UpdateTotalIssuesOnCirc (which defaults to OFF
to match existing behavior). The syspref has the following description:
Do/Do not update a bibliographic record's total issues count whenever
an item is issued (WARNING! This increases server load significantly;
if performance is a concern, use the update_totalissues.pl cron job
to update the total issues count).
Bug 6557: automatically increment totalissues
Adds the ability to automatically increment biblioitems.totalissues
whenever an item is issued.
To test:
1) Choose a record with at least one item that can circulate
2) Check the value of 942$0 (you may need to look at the plain MARC view
on the OPAC). Most likely there won't be any 942$0 at all
3) Enable UpdateTotalIssuesOnCirc
4) Check out the item you selected
5) Check the value of 942$0 (you may need to look at the plain MARC view
on the OPAC). That value should now be one greater than before
6) Discharge the item
7) Disable UpdateTotalIssuesOnCirc
8) Check out the item you selected again
9) Check the value of 942$0 (you may need to look at the plain MARC view
on the OPAC). That value should not have changed
Bug 6557: add script to update totalissues from stats
DESCRIPTION
This batch job populates bibliographic records' total issues count
based on historical issue statistics.
--help Prints this help
-v|--verbose
Provide verbose log information (list every bib modified).
--use-stats
Use the data in the statistics table for populating total
issues.
--use-items
Use items.issues data for populating total issues. Note that
issues data from the items table does not respect the --since
or --interval options, by definition. Also note that if both
--use-stats and --use-items are specified, the count of biblios
processed will be misleading.
-s|--since=DATE
Only process issues recorded in the statistics table since
DATE.
-i|--interval=S
Only process issues recorded in the statistics table in the
last N units of time. The interval should consist of a number
with a one-letter unit suffix. The valid suffixes are h
(hours), d (days), w (weeks), m (months), and y (years). The
default unit is days.
--incremental
Add the number of issues found in the statistics table to the
existing total issues count. Intended so that this script can
be used as a cron job to update popularity information during
low-usage periods. If neither --since or --interval are
specified, incremental mode will default to processing the
last twenty-four hours.
--commit=N
Commit the results to the database after every N records are
processed.
--test Only test the popularity population script.
WARNING
If the time on your database server does not match the time on your Koha
server you will need to take that into account, and probably use the
--since argument instead of the --interval argument for incremental
updating.
=== TESTING PLAN ===
NOTE: in order to test this script, you will need to have some sort of
circulation data already existing in your Koha installation.
1) Disable UpdateTotalIssuesOnCirc
2) Run: misc/cronjobs/update_totalissues.pl --use-items -t -v
3) If you have total checkout data in your item records (i.e. anything
in 952$l), you should see messages like "Processing bib 43 (1 issues)"
4) Choose one of the lines that shows more than 0 issues, and view the
record with that biblionumber in the staff client, choosing the "Items"
tab (moredetail.pl). Add up the "Total checkouts" listed for each item,
and confirm it matches what the script reported
5) Run: misc/cronjobs/update_totalissues.pl --use-stats -t -v
6) If you have any circulation statistics in your database (i.e. any
'issue' entries in your statistics table), you should see messages
like "Processing bib 43 (1 issues)";
7) Choose one of the lines and view the record with that biblionumber in
the staff client, choosing the "Items" tab (moredetail.pl). If you
count the number of checkouts listed in each item's checkout history,
the total should match what the script reported.
8) Check out an item
9) Run: misc/cronjobs/update_totalissues.pl --use-stats
--incremental --interval=1h -t -v
10) You should see one line reporting a single circ for the bib record
associated with the item you just checked out (there may be more if
you checked out any books in the hour prior to running these tests
11) If the results in steps 4, 7, and 10 match the predictions, the
script worked
This patch to Koha was sponsored by the Arcadia Public Library and the
Arcadia Public Library Foundation in honor of Jackie Faust-Moreno, late
director of the Arcadia Public Library.
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Tested this with my test data - numbers are correct and updated appropriately.
More importantly - if I do a popularity search, the most popular items *come up first*. Amazing.