Commit graph

176 commits

Author SHA1 Message Date
6b8be20497 Bug 6755 Problems with switching languages
This patch solves the situation that news is in another language than
the Koha interface AND makes that themelanguage routine is always called
the same way in order to prevent mixed display.

It fixes also a bug related to language preselection based on web
browser prefered language.

September 9: Adjusted with input of Frederic Demians.

Septembre 10: Avoid circular dependency, as pointed by Chris Cormack.
Templates related functions are moved from C4::Output to C4::Templates

Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-09-23 09:47:09 +12:00
Julian Maurice
a3e5547355 Bug 5098: Add csv headers in overdues
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-08-17 10:29:02 +12:00
Chris Nighswonger
57155db213 Bug 5263 - Add support for including fields from the ISSUES table in advanced due notices
Adding support for including fields from the Issues table in advanced due notices.
This is primarily to allow the inclusion of the due date for each item in the
advanced due notice, but will allow the inclusion of any field from the ISSUES
table.

This also adds code to exclude timestamp fields as these are irrelevant to the
end user in this context.

Note: Documentation should be updated to reflect the availability of the additional
fields in all circulation notices.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-08-02 12:44:42 +12:00
Liz Rea
1a17c0d6bd Bug 6478 -- add purge_suggestions.pl to the crontab.example
To test:
Verify that there is a listed job for purge_suggestions.pl in the crontab.example

Bug 6478 - adding --days support and help verbiage to the cronjob.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-07-16 20:23:20 +12:00
Ian Walls
358a3b364a Bug 5197: add <<today>> token to notices
implements for Overdue notices
Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-07-12 19:52:59 +12:00
Ian Walls
5ae3a3aa4f Bug 5929: use branch admin email for advance_notice.pl emails
This squash commit takes the two patches from Srdjan and adds a minor fix to work with
template toolkit variable renames.

Squashed commit of the following:

commit 2cab669d1fd072600942e1e6fbf3378944255a68
Author: Ian Walls <ian.walls@bywatersolutions.com>
Date:   Thu Jun 2 14:08:40 2011 -0400

    Bug 5929: Fix advanced_notices to use new template-toolkit compatible message names

    Uses 'item_due' and 'advance_notice' for advance notices names; letters do not send otherwise

commit caded04702d5eebd0f63a3b93cdddce28257f092
Author: Srdjan Jankovic <srdjan@catalyst.net.nz>
Date:   Tue Mar 29 12:38:49 2011 +1300

    wr77490 (bug 5929): removed debugging leftover

commit 1944de0de40f937b1d8748500f24a119390db3f0
Author: Srdjan Jankovic <srdjan@catalyst.net.nz>
Date:   Tue Mar 22 19:05:23 2011 +1300

    wr77490 (bug 5929): use branch email in preference for due notices

Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-06-04 19:41:26 +12:00
Alex Arnaud
4468aea43c Bug #6119 - Add biblioitems.itemtype in columns for items.content
Signed-off-by: Christophe Croullebois <christophe.croullebois@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-09 11:27:52 +12:00
Chris Nighswonger
d31c1603cc Bug 5251 : Enhancement: [3.2] (Resubmission) Adding code to support using gmail as an SMTP server
This patch adds support for using a gmail account as an SMTP server.
It includes a basic HOWTO.

Signed-off-by: Magnus Enger <magnus@enger.priv.no>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-08 14:01:15 +12:00
0f7411ceee Partial fix for Bug 4870, Damaged status does not prevent items from being selected for reserves
This patch changes the holds queue build process in order to
require that items not be damaged in order to appear in the
holds queue report.

Revision adds a check for the AllowHoldsOnDamagedItems preference to
determine whether a damaged item should be included in the holds
queue report.

Signed-off-by: Christophe Croullebois <christophe.croullebois@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-06 20:21:07 +12:00
ruth@bywatersolutions.com
61e87362c4 Bug 5857: longoverdue.pl needs a quiet mode for batch runs
This patch creates a --quiet flag for longoverdue that will squelch
the summary at the end of the run.  It also silences an unnecessary
warn in C4/Acounts.pm

Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-01 21:13:04 +13:00
Jared Camins-Esakov
412966eff0 Bug 5253: Add options to runreport.pl
This makes sending reports via e-mail with runreport.pl work properly. It also
adds a --format option to allow the user to select between text, html, csv, and
tsv. At the moment text is not implemented, and falls back to tsv, but that is
still more readable than the HTML that used to be produced.

Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-03-29 22:53:06 +13:00
Henri-Damien LAURENT
f7190f48aa Bug 5944 : (MT #3000) new cronjob script to delete old suggestions
This patch is a new script that delete suggestion that have be processed by librarians.
It take on argument, it's a number of days to keep suggestions. Suggestions olders than TODAY - $days will be deleted.
This script should be used to purge suggestions and clean the table in intranet.

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-03-24 22:10:20 +13:00
Paul Poulain
ddbedbfc2f Bug 4330 : Adding some copyright BibLibre statements 2011-03-21 10:57:20 +13:00
Colin Campbell
cf28bf4785 Bug 3810: Ensure all calls to Mail::Sendmail handled consistently
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-03-16 20:57:12 +13:00
Katrin Fischer
224d2dee90 Bug 3009 - Change items.content field so it prints due date by default
<items.content> in overdue notices prints issuedate instead of duedate by default.
This patch changes default to issues.date_due.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-02-09 15:25:55 +13:00
Magnus Enger
af60ade73b Bug 5055 Use standard file paths in crontab.example
This is a revised patch, removing the lines pertaining to logrotate.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-01-12 12:34:17 +13:00
Ian Walls
31622bc6b3 Bug 5457: gather_print_notices.pl requires explicit stylesheet
Adds a conditional around the opening and closing of STYLESHEET, testing on whether the $stylesheet variable is set
or not.

Signed-off-by: Nicole Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2010-12-07 08:57:28 +13:00
Chris Nighswonger
c1463e7255 Bug 5381 - Fines in notices prints always 0.00
This was due to passing off the biblionumber to GetFines rather than the itemnumber.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2010-11-14 22:25:03 +13:00
Andrew Elwell
efa66f1f55 Bug 5385: POD Cleanups (part 2)
More podchecker cleanups to eliminate warnings / errors

Signed-off-by: Andrew Elwell <Andrew.Elwell@gmail.com>
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2010-11-12 10:06:56 +13:00
Andrew Elwell
9fa574f609 Bug 5385: POD Cleanups (part 1)
working through the master branch to eliminate all
podchecker warnings/errors

Actual improvement to the quality of the POD will
come later (hopefully with assistance of others)

Signed-off-by: Andrew Elwell <Andrew.Elwell@gmail.com>
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2010-11-12 10:06:55 +13:00
072896d66b bug 5219: tidy cleanup_database.pl
Includes a bit of cleanup of the enhancement patch
for bug 5074 - adding comments about old and new
behavior isn't necessary for such small changes.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2010-11-08 15:14:15 +13:00
Katrin Fischer
9f688ad92b Bug 5370: Fix all references to koha.org
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2010-11-08 09:41:47 +13:00
Katrin Fischer
35cf30ef15 Bug 5370: Fix references to koha.org and other old websites
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2010-11-07 19:50:52 +13:00
5c4f27bd0d Enhancement 5074 (Adding possibility to cleanup_database.pl to purge only older sessions) [UPDATED for master]
Currently, the misc/cronjobs script cleanup_database truncates the session table (deleting all records, including active sessions).
With an additional parameter sessdays, this behavior could be changed or (perhaps better) extended. If the parameter sessdays is passed along with a number of days, the script only deletes older session records. This is accomplished by examining the values of lasttime, atime or ctime in the record.
So, calling the script like:
  ./cleanup_database.pl -v -sessions -sessdays 7
will only delete sessions records older than 7 days. The "old style" call
  ./cleanup_database.pl -v -sessions
still works too and truncates the table as before.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2010-11-02 11:02:15 +13:00
Robin Sheat
18a1c3db11 Bug 5139 - packages now do email and other cron jobs
By default the packages now set up the cron jobs to handle things like
overdues and email etc. By default, email is off, 'koha-email-enable'
and 'koha-email-disable' can manage this.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-10-06 08:12:14 -04:00
Colin Campbell
a5bdd61c73 Bug 5047 html option not in -help output
Add -html option to list in pod so that it shows up
in output of help

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-10-06 07:54:28 -04:00
c4601faf13 Bug: 4904: Problem with printing fines in overdue notices
my $formatted_fine = currency_format("$1", "$fine", FMT_SYMBOL);
is already utf-8.

Resend with additional change, removing 2 lines (no strict, use strict) from the code.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-10-06 06:21:34 -04:00
cbc9858323 another FSF address fix
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-05-06 20:31:26 -04:00
Henri-Damien LAURENT
6af71eb13a MT3346 : overdue_notices
-csv was not working as advertised.
This feature is now working as it is forecast

Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-05-01 09:11:54 -04:00
J. David Bavousett
55492a640f Bug 4257: Make advance notices actually go out by avoiding null selects
The wrong variable was used to select the number of days-until-due; this fixes it to use
the borrower's preference setting.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-04-29 22:36:38 -04:00
Donovan Jones
5e0b850d49 Bug 2505 - Add commented use warnings where missing in the misc/ directory 2010-04-21 20:26:44 +12:00
Lars Wirzenius
ce0a89c89e Change #! line for cronjob to refer to sh using canonical path.
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-04-16 00:50:58 -04:00
Donovan Jones
cf7926889b Bug 2505 - remove unnecessary -w and replace with use warnings;
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-04-07 13:27:07 -04:00
Lars Wirzenius
160e01daa3 Update copyright license to GPL version 2 or later for two cronjobs.
See http://lists.koha.org/pipermail/koha-devel/2010-March/011067.html
for confirmation that this is OK.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-04-07 08:43:31 -04:00
Lars Wirzenius
87d845969e Fix FSF address in directory misc/
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-03-16 20:17:54 -04:00
J. David Bavousett
f34da84ed6 Bug 3482 changed name of notices file 2010-02-22 10:52:32 -05:00
Jesse Weaver
63e871dd40 Bug 3482 Allow hold notices to be sent in print form
This is done by saving the notices in the message_queue table with
type 'print'. The notices are generated from a notice named
HOLD_PRINT. At the end of the day, they are dumped to an HTML file and
marked as sent by a new cronjob.

This setup is intended to be temporary; modules/batch/ shouldn't be around
forever.

Mandatory SQL:
INSERT INTO message_transport_types (message_transport_type) values ('print');
2010-02-22 10:52:04 -05:00
J. David Bavousett
68bbe0d596 Modified to use dirspec only
This commit modifies overdue_notices so that the -html parameter
only requires a directory specification.
2010-02-22 10:51:36 -05:00
Kyle M Hall
af5ad339f7 Bug 3482 Print Notices via HTML
Modified overdue_notices.pl to support output of html for printing.
The -html option will e-mail notices to those with e-mail, and output
html to print for borrowers without e-mail.

When system preference PrintNoticesMaxLines is set to a positive
integer, it will limit the number of items on the notice to that
number, and append a message to the end telling the borrower to
check his or her account for the full listing of items.  This only
affects print notices, not emailed ones.

Mandatory SQL:

INSERT INTO `systempreferences`
  ( `variable` , `value` , `options` , `explanation` , `type` ) i
  VALUES ( 'PrintNoticesMaxLines', '0', '', i
  'If greater than 0, sets the maximum number of lines an overdue notice will print. If the number of items is greater than this number, the notice will end with a warning asking the borrower to check their online account for a full list of overdue items.',
  'Integer' );

Conflicts:

	installer/data/mysql/en/mandatory/sysprefs.sql
	installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql
	misc/cronjobs/overdue_notices.pl
2010-02-22 10:51:26 -05:00
21c7f786bf bug 1532: various code cleanup
* export C4::Reserves::CancelExpiredReserves
* rename  misc/cronjobs/cancel_expired_reserves.pl
  to misc/cronjobs/holds/cancel_expired_holds.pl
* added cancel_expired_holds.pl to example crontab
* fix staff crash if AllowHoldDateInFuture is on
* expirationdate is now nullable instead of relying
  on 0000-00-00

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-02-18 22:49:48 -05:00
Kyle M Hall
3502810346 (bug 1532) Reserves Updates Ported From Dev_Week
This is a much improved re-implementation of the reserves updates from dev_week.
Less new code has been added, and more existing functions are used instead of adding new ones.

The 'Lock Hold' function has been removed due to it not working as intended.

[RM note for documentation: this adds the following features:

* ability to specify an expiration date for a hold request
  when placing it via the staff interface or OPAC
* daily batch job to cancel expired holds
* nice interface to change the priority of hold
  requests for a bib in the staff interface]

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-02-18 22:49:47 -05:00
Chris Nighswonger
599887a185 Bugfix: [1/3] overdue_notices.pl does not process all advertised fields
Note: overdue_notices.pl really needs to be completely re-written.

The script does not process all fields advertised in tools/letter.pl
This patch adds code to process all fields advertised as well as any
from the items table.

It also adds two additional tags for use in the letter templates:

<item></item> which should enclose all fields from the biblio, biblioitems,
and items tables.

<fine></fine> which should be enclosed by the item tag and should
enclose a currency identifier per ISO 4217. If this tag is present with
a proper identifier, the fine for that item will be displayed in the
proper currency format. Note: ISO 4217 changes from time to time therefore
all currencies may not be supported. If you find one that is not
supported, please file a bug with the Locale::Currency::Format author
Tan D Nguyen <tnguyen at cpan doe org>.

An example of the implimentation of these two tags in a notice template
might be like:

The following item(s) is/are currently overdue:

<item>"<<biblio.title>>" by <<biblio.author>>, <<items.itemcallnumber>>, Barcode: <<items.barcode>> Fine: <fine>GBP</fine></item>

Which, assuming two items were overdue, would result in a notice like:

The following item(s) is/are currently overdue:

"A Short History of Western Civilization" by Harrison, John B, 909.09821 H2451, Barcode: 08030003 Fine: £3.50
"History of Western Civilization" by Hayes, Carlton Joseph Huntley, 909.09821 H3261 v.1, Barcode: 08030004 Fine: £3.50

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-02-17 06:36:01 -05:00
84b3c05c0d Bug 2959 - Add a timeout parameter to the URL checker
Could improve performances for DB containing URLs which can't be fetched
(good or bad) quickly.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-02-16 06:48:01 -05:00
9dee98a0c9 Bug 2959 - Cache already failed URLs to speedup check-url.pl
Based on David Schuster improvement patch.

For David:

- To send the output into an HTML file, there is no need to add a
  paramater to this script, just redirect to a file:

  check-url --html --host-prot=http://koha-pro.mylib.org \\
    > /usr/local/koha/koha-tmpl/badurls.html

- If you want as a result a table with alternate rows, use CSS and
  JavaScript. For example, with jQuery (found with google):

  <style type="text/css">
  table {width:400px; border:1px solid blue;}
  .oddrow {background-color:#E5E5E5;}
  </style>
  <script type="text/javascript"
   src="http://code.jquery.com/jquery-latest.min.js"></script>
  <script type="text/javascript">
  $(function(){
    $("table.tiger-stripe tr:even").addClass("oddrow");
  });

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-02-14 19:45:54 -05:00
Henri-Damien LAURENT
ea3277d98d monthly_circulation_statistics.pl :Hard Coded date inside
Fixing that point
2010-01-28 15:11:56 +01:00
Henri-Damien LAURENT
ac7cea8dba MT2268 Printing html notices on pdf printers
This adds a shell script which is able to turn html files
into pdf and print them on a printer
It takes a directory where pdf files is laid, a css filename,
a host for printer and a Printername

printoverdues : generates PDF files from html files in directorys and prints them
  usage :
  printoverdues.sh directory [css [printer_host [printername]]]
   - directory      directory to use to apply html2pdf transform
   - css            css file to apply to html
   - printer_host   Network Name or IP of the printer (port possibly included)
   - printer_name   printername
  Note that css printerhost and printername are optional parameters
  Note that this script uses xhtml2pdf command
      xhtml2pdf command comes with pisa (a python library)
               To install you need setuptools library for python
               then type easy_install pisa
2010-01-28 15:11:56 +01:00
Kyle M Hall
bac8e37c83 Updated create_koc_db.pl
A new Koha Offline Circulation client has been written by Kyle M Hall in C++/Qt4.
Unfortunately, it requires an SQLite3 databse, where the PHP/Gtk client needs an SQLite2 database.

This update adds the switches --sqlite2 and --sqlite3 to the script to output either format.
2010-01-15 10:00:36 +01:00
afcfb0e8bd overdue_notices.pl send no email directly to patron
Something prevents overdue_notices.pl to send message directly to patron
email.
2010-01-15 09:59:32 +01:00
f1bc7f4094 overdue_notices.pl various bugs in HEAD 3.2
Those bugs must have been introduced by merge?

- Overdue to all libraries with overdue rules doesn't work
- Overdue to a specific library doesn't work also
2010-01-15 09:59:19 +01:00
Nahuel ANGELINETTI
6473368d90 (bug #3925) fix build_holds_queue.pl
This fix sql query when item-level_itype is set to "off".
2009-12-20 14:31:39 +01:00