Commit graph

15110 commits

Author SHA1 Message Date
Alex Arnaud
46831f8086 bug/7285 Use C4::Auth::checkpw instead of checkpw only
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2011-12-06 18:58:30 +01:00
f9763a8ec9 Bug 7280 - can't place hold without selecting on list
JavaScript was looking for clicks on links with class "hold,"
and incorrectly triggering the check for checked checkboxes.
Making the selection stricter lets the JS function as it should
while allowing people to place individual holds directly.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2011-12-06 18:54:55 +01:00
Frédérick Capovilla
478c2b139c Bug 7251 : Corrects a problem in overdue_notices.pl when delimiter is set to tabulation
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
checked that others values for the separator are OK = it is (space, semicolon,... see syspref "delimiter")
2011-12-06 17:12:37 +01:00
3be1252e1b Bug 7225 - "Delete all items" should be greyed out when a title has no items
This patch changes the catalog toolbar so that when there are no
items attached to a record the "Delete all items" menu item appears
to be disabled. Clicking it will trigger an alert, "This record
has no items."

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2011-12-06 17:07:57 +01:00
Jared Camins-Esakov
93cd5bd501 Bug 7216 - koha-restore does not correctly set home
Prior to this patch, the koha-restore Debian script did not set the home
directory properly for the system users it created, causing problems down the
line for koha-rebuild-zebra. This patch fixes that by specifying the home
directory.

http://bugs.koha-community.org/show_bug.cgi?id=7216
Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
2011-12-06 17:01:56 +01:00
Frédérick Capovilla
7534c34cdb Fix a problem when translations contain &nbsp; various XSL files
With new 3.6.1 translation files, the lake of 'nbsp' entity definition make
fail t/00-valid-xml.t test.

This patch applies to HEAD and 3.6.x.

How to test:

  - checkout 3.6.x branch
  - generate French templates:
    cd misc/translator
    ./translate install fr-FR
    cd ../..
  - run test:
    prove -v t/00-valid-xml.t
    you get failing error message
  - apply this patch
  - run test again: it passes

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>

http://bugs.koha-community.org/show_bug.cgi?id=7141
2011-12-06 12:16:04 +01:00
5a6c8b3675 Fix for Bug 7137 - fixed width table where it should be variable
Removing inline style setting the table width.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2011-12-06 12:13:58 +01:00
Liz Rea
e0cba61e31 Bug 7122 - Add a div to opac-messaging.tt to facilitate consistent styling across OPAC user pages.
To test:
verify that the div <div class="yui-g" id="usermessaging"> appears and can be styled via opacusercss.

Signed-off-by: Arslan Farooq <arslanone@gmail.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2011-12-06 12:11:28 +01:00
Paul Poulain
914d4d4352 160th developer + 2 events added (NZ tm and 3.6.1 released) 2011-12-06 12:07:48 +01:00
dc249205a2 Fix for Bug 7120 - After deleting order from order receive page redirect fails
The order modification script doesn't retrieve an order's basket
when doing a delete, so the template must explicitly pass
the basket number if we want the redirect to work.

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2011-12-06 12:02:49 +01:00
Martin Renvoize
5a86cb4ed9 Bug7108: Intranet Language Menu Display Patch
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2011-12-06 11:55:48 +01:00
ccc182f260 Bug 7108 - OPAC Translations Display Patch
If multiple similar languages (i.e: fr-FR, fr-CS or en, en-GB) are installed
and  the opaclanguagesdisplay preference is set to allow patrons to choose a
language then at each occurrence of a language with multiple options the
display is the selector splits across multiple lines breaking the display.

http://bugs.koha-community.org/show_bug.cgi?id=7108
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2011-12-06 11:55:44 +01:00
32d8abbb43 Bug 6786: Follow up fixing index names with hyphens
Adds hyphen to regex looking for index names in buildQuery.
Test by searching on Control-number=...

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2011-12-06 11:46:09 +01:00
Henri-Damien LAURENT
7655eaedc1 Bug 6132: preference were case sensitive.
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2011-12-06 11:39:37 +01:00
Paul Poulain
7267ea91ac Merge remote-tracking branch 'origin/new/bug_5211' 2011-12-06 11:36:57 +01:00
Srdjan Jankovic
1713133fdd bug_5211: LostItem() - added charge_fee param to control fee charging
Pass charge_fee = yes wherever is LostItem() called, which effectively
means tha there's no change.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2011-12-06 11:36:34 +01:00
Ian Walls
c70ff88205 Bug 2616: Remove unnecessary 'use HTML::Template' calls
Removes deprecated calls to HTML::Template or HTML::Template::Pro from:
C4/Output.pm
catalogue/export.pl
reports/issues_by_borrower_category.plugin
reports/itemtypes.plugin

Only remaining calls are in misc/cronjobs/rss/rss.pl, misc/cronjobs/smsoverdues.pl,
and t/test_template.pl.  These scripts still legitimately depend on H:T:P

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2011-12-06 11:34:05 +01:00
Christophe Croullebois
32317878c0 Bug 7105: Bad request in GetSubscriptions
If $string or $issn is passed to GetSubscriptions, the request is false.
See Bug 5864, especially the last comment from Frédérick Capovilla.

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2011-12-03 08:21:21 +01:00
92913a2f3f Bug 7041: Sort >1000 search results with sortmax parameter in zebra config file
By default, zebra does not sort more than 1000 records (search results). You
can increase this number by adding the sortmax parameter in zebra-biblios.cfg.

Putting this value in Koha's zebra config file will make this default value
visible and make it easier to increase it if one prefers that.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2011-12-03 08:15:34 +01:00
Robin Sheat
849547df68 Bug 7008 - create tmp dir for zebra
Sometimes zebra needs a tmp dir in order to work. This ensures that it
is created both by koha-create-dirs in the packages, and by
rebuild_zebra when it runs.
--

tested ok, signing off
Signed-off-by: Mason James <mtj@kohaaloha.com>
2011-12-03 07:56:44 +01:00
Jared Camins-Esakov
602c528e91 Bug 6997: Koha-remove leaves system in inconsistent state
If you accidentally delete one of the files that koha-remove is supposed to
remove, when koha-remove reaches that point in the script, it will die, leaving
later removal steps undone. This patch fixes the problem by checking for the
existence of each file prior to deleting it, so that short of an actual problem
with removing the file, the script can continue. Note that the fix for bug 6929
is also needed to prevent any problems with stopping Zebra from killing
koha-remove.

Signed-off-by: Dobrica Pavlinusic <dpavlin@rot13.org>
2011-12-03 07:53:51 +01:00
Paul Poulain
f029e9aba7 Merge remote-tracking branch 'origin/new/bug_6966' 2011-12-03 07:52:07 +01:00
Nicole C. Engard
ab90434b58 Bug 6966 Updated Patron Attribute Help File
A new patch required an additional line in this help
file.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-12-03 07:51:38 +01:00
Paul Poulain
6d8ea30401 Bug 6926 : overdue_notices don't send itemcount to notification
In advanced_notices.pl you can return the number of due items using <<count>>
flag.
If you use this flag in overdue_notices, it does not work, no number is
displayed.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2011-12-03 07:49:39 +01:00
Greg Barniskis
8b3955d067 Bug 6914 - fixes for the color option of koha_perl_deps.pl
Reset the terminal color mode after reporting (to avoid polluting the
user's shell), and use blue instead of white for the report header and
footer.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2011-12-03 07:47:38 +01:00
Paul Poulain
869f83a4ce Bug 6699 follow-up
The warn $error will issue this message if there is a message.
It's because how warn $blabla works : it does not work, you have to add ""
2011-12-03 07:43:15 +01:00
7bbc358067 6699 Add not-empty check for warnings from load_sql in Installer
Eliminates fake warnings "Something is wrong on line 530".

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2011-12-03 07:41:30 +01:00
Paul Poulain
6980d82991 Merge remote-tracking branch 'origin/new/bug_5974' 2011-12-03 07:36:44 +01:00
Katrin Fischer
9cecb7a9d3 Bug 5974: Fix broken toolbar on paton checkout tab
Fixed a couple of errors:
- [% CAN_user_staffaccess %] should be [% IF ( CAN_user_staffaccess ) %]
- added missing [% END %]
- added missing line new YAHOO.widget.Button("duplicate");

To test:
1) Open patron account
2) Go through tabs, especially 'Check out'
3) Check toolbars are correct and buttons work

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2011-12-03 07:36:04 +01:00
Paul Poulain
df80c6358c Bug 6015, new script for load testing
This benchmark_staff.pl script is based on the previous benchmark_circulation.pl script
As it does not test only circulation, the renaming was necessary.
The script has many enhancement compared to the benchmark_circulation.pl one
The benchmark_staff will run a benchmark on the following pages:
    * mainpage.pl
    * catalogue/detail.pl
    * catalogue/search.pl
    * members/member.pl (search on a name)
    * members/member.pl (search on a 1st letter)
    * circulation/circulation.pl and return.pl (check-out and check-in)
    * all those steps at the same time

    run the script without any parameter to get syntax
2011-12-02 17:39:13 +01:00
Paul Poulain
c7ef4da571 Revert "Fix for Bug 6291, Cart printing truncated in Firefox"
see
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6291, comment 7, 9 and http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7279

This reverts commit da0a5b2bd6.
2011-11-30 17:12:06 +01:00
Paul Poulain
87311ca00e Merge branch 'new/bug_6328' 2011-11-30 17:07:29 +01:00
Paul Poulain
384b9179e0 Bug 7272 setting NULL to debarred field, to avoid having 0000-00-00
0000-00-00 can come only from a problem in the 3.06.00.001 update
2011-11-30 17:07:07 +01:00
Paul Poulain
f0489763d6 Merge remote-tracking branch 'origin/new/bug_6894' 2011-11-28 12:20:58 +01:00
Paul Poulain
c95cbce4ce fixing the translatable-template.t to handle localized setups
Depending on your locale, msgmerge will return a different messages, enclosed in .... and .
The flow is not utf8 compliant, so this patch switches to testing "..... anything." instead of ".... word."

Now the test work on my (french setup)
2011-11-28 12:13:42 +01:00
Chris Cormack
66fa828846 Bug 7268: Fixing failing tests for translatable templates
To test run

perl xt/author/translatable-templates.t

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Test runs without any complaints about the fixed templates now.
Also checked detail pages without XSLT turned on display correctly.
2011-11-28 11:22:06 +01:00
Katrin Fischer
624b1562d8 Bug 6894: Order from suggestion defaulting to wrong currency
This problem turned out to be a bit different, than I initally thought.

This patch fixes the currency selections for new orders created in staff.
Before this patch, the first currency in the list was selected instead
of the active currency. So you needed to change it explicitly.

After patch it should work like this:

1) Suggestion created in OPAC - currency defaults to NULL in database
2) Editing a suggestion created in OPAC will default to active currency.
3) Creating a new suggestion in staff will default to active currency.
4) When ordering, the currency will default to the vendor currency, if no
currency is set in the suggestion. (still happens, when suggestions are accepted
in batch from the list.

I hope this is right - comments and testing appreciated.

Signed-off-by: Liz Rea <lrea@nekls.org>
Verified that in the above places, active currency was displayed or selected. Tested both suggestions entered from the OPAC and from the intranet.

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Verified the existence of the bug, and that the fix works as advertised.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2011-11-28 10:22:04 +01:00
Paul Poulain
339e9edd14 Merge branch 'new/bug_6328' 2011-11-28 10:12:23 +01:00
Chris Cormack
3e05393dd8 Bug 6328 : Previous patches broke templates, this is fixing them
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Fixes xt/tt_valid.t
Checked the member entry page, didn't find any problems.
2011-11-28 10:11:46 +01:00
Chris Cormack
8664d19567 Bug 6628 : Stopping a potential vulnerability
Signed-off-by: Frère Sébastien Marie <semarie-koha@latrappe.fr>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
- verified help pages still work
- verified /cgi-bin/koha/help.pl?url=koha/../catalogue/advsearch.pl does not
show the template file (did work on master, not after applying patch)
- verified cgi-bin/koha/help.pl?url=koha/../../../../../../etc/passwd%00.pl does not work (didn't work on master or after applying patch)

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
The potential vulnerability would allow anyone to see the content of any .tt file, and .tt only. Was much less critical than the vulnerability for 6629, but it's worth fixing !
2011-11-28 10:05:58 +01:00
Paul Poulain
2989e12288 Merge branch 'new/bug_6629' 2011-11-28 09:46:23 +01:00
Chris Cormack
af205cb50a Bug 6629 : Follow up, sanitising in a couple more places
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2011-11-28 09:45:50 +01:00
Chris Cormack
948f65344e Bug 6629 : Follow up to trap vuln in webinstaller and fixing the error
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Patch fixes problem occuring in web installer.
2011-11-28 09:44:34 +01:00
Paul Poulain
6323bb081e Merge remote-tracking branch 'origin/new/bug_7250' 2011-11-25 14:29:04 +01:00
Katrin Fischer
1b49f54b88 Bug 7250: stage_biblios_file.pl is missing options for encoding
- adds command line options for encoding, defaulting to utf8
- options match options availablen in the stage marc records form
  of the staff interface
- activates warnings
- adds copyright statement

To test:
Import records with diacritics using the stage_biblios_file.pl
Records can be imported into the catalog using the staff interface
or the commit_biblios_file.pl script.

Signed-off-by: Ulrich Kleiber <ulrich.kleiber@bsz-bw.de>

Successfully tested with default encoding utf8.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2011-11-25 14:26:32 +01:00
Colin Campbell
4f49dc5ad0 Bug 6877 - use is executed and errors at compile time
Although use is being called in an eval it will still be executed
at compile time so that an error can cause the script to abort before
the eval is executed. The eval expression syntax is not checked
so eval block should be preferred.
Use require/import which execute at runtime which is the intention
here.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
checked that, with Libravatar OK things are still OK
2011-11-25 14:17:58 +01:00
Paul Poulain
1f6ae97375 bug 6328: updatedatabase bump 2011-11-25 14:09:06 +01:00
Paul Poulain
d019b4c63a Bug 6328 Fixes for comment 35
* correctly indenting with tab the debarrcomment field
* setdebar.pl is called without status parameter, thus it is not working anymore. It's fixed & some dead code has been removed. To test : debar someone, then go to patron detail page and click "lift debarment"
* the test function had not been updated. The fix define a debarment date of 2099-12-31 (no limit)
2011-11-25 14:00:47 +01:00
Paul Poulain
41b42dbe32 Bug 6328 follow-up for QA comments
* fixed documentation in C4/Auth_with_ldap.pm
* updated ILSDI/Utility.pm to work with debarred being a date
* updated Members.pm/patronflags to work with debarred being a date (copy/paste of BibLibre code that had not been backported)
* fixed opac-reserve to check correctly for debarred status

I also have removed a duplicate line on circulation.pl when the patron was restricted = the information was displayed twice
2011-11-25 14:00:47 +01:00
Paul Poulain
1fe3514c3c Bug 6328 fine in days does not work
Some code coming from BibLibre has been lost in the process of inclusion in
3.4. The result is that fine in days does not work at all (you can setup rules,
but it does nothing)

Step to reproduce:

- Koha > Admin > circ rules > set 1 day fine every day of overdue for default
  rule
- Issue a book return date last week
- check-in the book => no debarment is set

The following patch will fix all of those problems by :

* updating borrowers.debarred to a date field (instead of tinyint). It contains
  the limit of the debarment
* changing API of DebarMember and UpdateBorrowerDebarred to pass a date
* display debarrdate where applicable. Note that a debarrdate of 31/12/9999 is
  considered as unlimited and not displayed
* added a debarrcomment, usefull to explain why a patron is debarred (this is
  independant from debarrdate changes and can be used when placing an unlimited
  debarment too)

[2011-05-12] F. Demians. It works as described. And I can confirm this
functionality is impatiently awaited by French libraries since one year. Thanks
BibLibre for the good work and for contributing this code.

Bug 6328 Followup--update DB structure

Thanks Katrin.

Bug 6328: make comment a textbox / fix debar by notice trigger

Debarring by notice triggers was broken, because the new function
expects a date as second parameter.

The comment field in patron account details was a very long text field.
Patch changes it to be a textbox instead.

Bug 6328: Lift debarment leaves patron account

'Lift debarment' redirects to an empty circulation page.

BZ6328 follow-up 3

Fixes comment 23 from Fernando L. Canizo : when the patron was debarred and debar removed
he still could not check-out.

The changes in the IsMemberBlocked (that were on biblibre/master) were lost somewhere
The sub was still checking for old_issues instead of calling CheckBorrowerDebarred
to get a debardate if applicable

Note : this bug was appearing only is you had issuing rules defined for itemtype/categorycode/branch.
Seemed to work if you had only default rules. That's probably why it hadn't been spotted before

BZ6328 follow-up 4
Comments fron Zeno Tajoli: The patch is OK and I sign-off it. Two little changes done on
installer/data/mysql/kohastructure.sql and installer/data/mysql/updatedatabase.pl

Signed-off-by: koha <koha@kohabase.localdomain>
2011-11-25 14:00:47 +01:00