Commit graph

15110 commits

Author SHA1 Message Date
Paul Poulain
ed9e0bf41e Merge remote-tracking branch 'origin/new/bug_5974' 2011-11-25 13:59:25 +01:00
Paul Poulain
eefa6147a2 follow-up: trailing " that makes T::T fail 2011-11-25 13:58:48 +01:00
Paul Poulain
c0e1984981 Merge remote-tracking branch 'origin/new/bug_3388' 2011-11-25 11:43:04 +01:00
Katrin Fischer
573b9275a6 Bug 3388: Restore account number on vendor page
This patch makes it possible to add the account number to the
vendor information. The used field aqbookseller.accountnumber was
already existent in the database.

To test:
1) Add a new vendor with accountnumber
> Verify form has a field for accountnumber
> Verify accountnumber does show up on vendor summary page
2) Edit this vendor, change accountnumber
> Verify change was correctly saved and new number is displayed on
vendor summary page
3) Delete accountnumber

Signed-off-by: Liz Rea <lrea@nekls.org>
Tested 1-3, no troubles found.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2011-11-25 11:07:11 +01:00
Chris Cormack
9a4e9e54f2 Bug 6629 : Sanitizing input from language cookie
I dont think we can use only 2 digits, some languages is much longer
zh-hans-TW for example

But the regex should stop it bening able handle nasty chars,
whitelisting safe ones instead

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
I checked the patch doesn't break language switching and language selection.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
I confirm the bug security issue was not here for master, but this fix improve the behaviour, so pushing it
2011-11-25 10:56:04 +01:00
fd949453e8 Bug 7254 Show pending orders from baskets with closedate > 180 days
Current code for selecting pending orders does not select orders from baskets
with a closedate > 180 days.
The code in Acquisition.pm already includes a FIXME for that.
IMHO this part of the where clause should just be removed; an order is pending
until it is filled. If you do not want to fill it, delete it.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2011-11-24 15:15:18 +01:00
Chris Cormack
40bd14e0ea Bug 4330: Missing License Statement
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
2011-11-24 14:15:57 +01:00
Chris Cormack
93d4c90a68 Bug 4330: Wrong address for Free Software Foundation
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
2011-11-24 14:15:55 +01:00
f1d46529f9 Fix for Bug 5974 - Bogus auth check for "StaffMember" role
Also removing some YAHOO.widget.Button declarations which
are redundant.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2011-11-24 14:10:13 +01:00
Colin Campbell
862b6ee90d Bug 7191 Remove GetBorrowerIssues from @EXPORT
No subroutine GetBorrowerIssues exists in C4::Circulation
So don't export it into users' namespace

Signed-off-by: Albert Oller <ago@bywatersolutions.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2011-11-24 13:45:13 +01:00
Robin Sheat
0fd451060e Bug 7091 - [MASTER/3.6.x/3.4.x] - update the changelogs for the 3.4 series
This brings all the changelog entries for releases up to what has been
included in the packages

Signed-off-by: Mason James <mtj@kohaaloha.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2011-11-24 11:47:45 +01:00
Robin Sheat
03dffd8374 Bug 7091 - [MASTER] - update the build version for packages from master
This updates the default version number that packages are build with to
be 3.7. This should be applied to master only.

Signed-off-by: Mason James <mtj@kohaaloha.com>
2011-11-24 11:47:04 +01:00
Ian Walls
f56e6c0a58 Bug 7073: GetCOinSBiblio should take $record object, not biblionumber
This patch changes the GetCOinsBiblio subroutine to take a MARC record object
(as returned from GetMarcBiblio) instead of a biblionumber.  The first thing the subroutine
did was GetMarcBiblio, and the $biblionumber passed was never used again.

This subroutine was only used 3 places: opac/opac-search.pl, opac/opac-detail.pl,
and C4/VirtualShelves/Page.pm.  In the first and last cases, it was used in a loop.
In the last two cases, a call to GetMarcBiblio had already been done.  This is expensive, and
we were doing it twice per record.

For opac/opac-search.pl, the call to GetMarcBiblio was moved to just outside GetCOinSBiblio;
this will not change the performance at all.  But for opac/opac-detail.pl and C4/VirtualShelves/Page.pm,
a redudant call to GetMarcBiblio is now avoided.

To Test:
1. Enable COinSinOPACResults in system preferences.  Perform a search in the OPAC.
   Verify that the COinS spans are showing up
2. View the detail record of one of the returned items.  Confirm that the COinS span exists on the detail page.
3. View a list in the OPAC.  Confirm that COinS spans are still showing up

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2011-11-24 11:44:02 +01:00
Srdjan Jankovic
2b2e544f05 Bug 6303: Display Organisation and Parent Organisation names when viewing a borrower of type organisation
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as advertised, doesn't affect display for non-organisational patrons.

Note: Display change in OPAC only affects the summary tab.
It would be a little bit more consistent to make the name show the
same on all tabs in OPAC patron account.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
I repeated Katrin's signoff here (with permission). The patch only changed for some minor rebasing and cosmetic QA requests. Passed QA now.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2011-11-24 11:30:08 +01:00
Paul Poulain
5c2def5158 Merge branch 'new/enh/bug_4877' 2011-11-24 10:48:14 +01:00
Magnus Enger
fab2d8b0ab Bug 4877 - Add DocBook for missing manual pages
Add DocBook manual pages for commands that do not have a manual page yet. Also
add a page for koha-common itself, listing all the available commands.

Signed-off-by: Robin Sheat <robin@catalyst.net.nz>

Minor change: I fixed a typo I spotted
2011-11-24 10:47:33 +01:00
Chris Cormack
fda4af9a3e Bug 7242 : Fixing typo in a div
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2011-11-24 10:28:45 +01:00
4ce57a102b Bug 6799 rebuild_zebra.pl -x produces invalid XML records
This patch allow to handle properly items containing extended characters and
send valid XML records to zebraidx

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2011-11-18 23:29:08 +01:00
Paul Poulain
9c5d3ea3aa Joy nelson was already in history.txt, removing the entry 2011-11-18 23:28:38 +01:00
bfe06ef399 Incremental fix for Bug 2847, Use HTML escape in templates where appropriate
Fixes for output in a couple of acquisitions templates where
user-generated data should be escaped. This instances were found
by creating a vendor name like "Baker & Taylor" and finding
that the ampersand was not escaped, causing validation errors.

This patch also consolidates multiple <script> blocks which
do not need to be separate and corrects a couple of unclosed
<input> tags.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2011-11-18 23:12:26 +01:00
Ian Walls
440c0f21ee Bug 7134: patron records getting corrupted birthdates
If no date of birth is provided in a new member form, the borrower gets the birthdate of "00/02/0", which
is obviously incorrect (the result of passing 0 to the database directly)

The fix is to remove a conditional check buried deep in C4::SQLHelper.  This is in a helper subroutine that was changed
for the Unified Member Search dev (bug 6253).  Reverting this small change to the conditional does not seem to break
search, but testing will be required.

To test:
1. apply patch, and create a new patron with blank birthdate.  The new patron should now have a blank birthdate instead of '00/02/0'
2. search for a borrower by 1 part surname, confirm search works
3. search for a borrower by 2 part surname, confirm search works
4. search for a borrower across firstname AND surname; confirm
5. search for a borrower and include categorycode/branchcode filters

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
I confirm all working tests 1-5
1. Created patron with blank birthdate - birthdate was blank
2. Searched for patron "henry james acevedo III" by using "acevedo" - result was correct
3. Searched for mr. acevedo using "Acevedo III" - result was correct
4. Searched for Henry James Acevedo III, Henry Acevedo and James Acevedo - results were correct
5. Searched for Mr Acevedo with the branch he was not in, with the branch he is in, with a category he was not, and a category he was. All results were correct.

also noted: inner searching seems to be working now? Example: Henry James (firstname) Acevedo III (surname) - searching James Acevedo brings back the correct patron.
Not complaining, just noting. :)

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2011-11-18 22:59:11 +01:00
Chris Nighswonger
a340ded2ca Bug 7095: Fixing cut and paste error and removing the use of diag() as this does not produce output when the test is run in a harness
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2011-11-18 22:51:28 +01:00
Frédérick Capovilla
6dac7273fb Bug 6977: Follow-up patch : catch CloneSubfield errors
A javascript error could occur if the CloneSubfield function failed for
any reason. This would prevent the popup from disappearing.

Example : Importing informations of a UNIF_TITLE authority with multiple
$x subfields in the biblio's 440 field. 440$x isn't repeatable, so an
error occurs when trying to clone it.

http://bugs.koha-community.org/show_bug.cgi?id=6977
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2011-11-18 22:45:45 +01:00
Salvador Zaragoza Rubio
042f89e939 Bug 6475 - Edit it's not possible in subfield "0" in MARC framework
When trying to modify the subfield "0" on a field in the
MARC subfield structure admin -> Tag xxx Subfield Constraints,
the boolean condition on liblibrarian fails for the initial "0" value.
Modified condition to allow the value "0"

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2011-11-18 22:32:35 +01:00
Liz Rea
1d42be9e76 Bug 7084 - Re-arranging results_summary for tags so that it applies where it is supposed to
To test:
Verify that New Tag text is the same size as all of the other surrounding text.
Verify that it is consistent in size with results that have existing tags.

See screenshot for what it looked like before:
http://screencast.com/t/hnt15kpS7SH9
Notice that the Add button and New tag text were slightly larger than the
similar constructions for results with existing tags. This patch should fix
that.

Signed-off-by: Magnus Enger <magnus@enger.priv.no>
I made sure I had a results list with on record with tags and one without.
Before applying the patch the "New tag" text and "Add" button were
inconsistent for the two records, after applying it they look the same. Nice!

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2011-11-17 17:27:59 +01:00
Katrin Fischer
c1d824deaa Bug 7079: [SIGNED-OFF] Default values for German system preferences
Patch adds updates for system preferences to the sql file
in the installer directory:

- New: AmazonLocale: DE
- borrowerRelationship: Vater|Mutter
- BorrowersTitles: Herr|Frau
- New: CurrencyFormat: FR
- New: dateformat: metric
- New: DefaultClassificationSource: z
- New: OpacMainUserBlock: translated content
- New: OpacNav: translated content
- New: OpacNavBottom: translated content
- New: OPACSearchForTitleIn: translated content

To test:
A) Do a full installation with German sample files
B) Run the sql file 'system_preferences.sql' against your database

Verfy values of system preferences have been changed.

Signed-off-by: Magnus Enger <magnus@enger.priv.no>
Patch applied cleanly. I ran through the webinstaller in German on an empty
database, and made sure system_preferences were loaded. No complaints from
the database and the systprefs are set to the right values when I check in the
staff client.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2011-11-17 17:12:38 +01:00
Frédérick Capovilla
8fde30912e Make all strings translatable in marc21_field_007.tt
http://bugs.koha-community.org/show_bug.cgi?id=7033

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Test plan:
- apply patch
- update po files using 'perl translate update <language-code>
- check po files for new strings from 007 plugin
- translate some / all of them
- update templates with changed po files 'perl translate install <language-code>
- verify 007 still works and got translated
2011-11-17 17:08:21 +01:00
Robin Sheat
e7251f73a2 Bug 6916 - item's acq date now takes you to its invoice
When viewing an item's details, selecting the accession date for it now
takes you to the invoice for that item.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
This works as advertised.
1) Order and receive an item in acquisition
2) Search for it in staff and go to the 'items' tab
3) Click on the 'receive date' link

Fixed conflict in moredetail.pl.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
QA. This patch does only work when AcqCreateItem==placing an order. This is caused by an existing bug. See Bugzilla for more details.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2011-11-17 17:05:17 +01:00
bada2e4c36 Bug 6321 Add a 1/4 months frequency
Thanks Stefano Bargioni for the typo fix

[2011.09.16] Thanks Paul for catching the display error.
[2011.10.11] Thanks Katrin for finding display error on OPAC.

Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tested prediction pattern and display in OPAC.
No problems found.
2011-11-17 16:56:28 +01:00
Paul Poulain
2216cd4371 updating history.txt : 3.6.0 & 3.4.6 & KohaCon11 & Joy Nelson 160th 2011-11-17 16:50:54 +01:00
Joy Nelson
1d0192b85c Bug 7221: C4/Biblio.pm documentation is incorrect.
$dbh is not a valid first parameter.  Removed $dbh from line 392 to show correct syntax.

Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
2011-11-17 16:47:28 +01:00
Chris Nighswonger
7824a1bc8d Bug 7207 - Reverting a portion of commit 607b5449bd which breaks the label export script.
squashed chris_n's two patches. Label export works again. Also changed the pattern for the item_number to the known working, critic friendly pattern.

Don't change $_ in a list context

Changed the 3rd bit to the critic friendly pattern chris_n suggests in the previous two lines.

Signed-off-by: Brendan <brendan@bywatersolutions.com>
2011-11-16 17:55:35 +01:00
55162ca846 Follow-up fix for Bug 5150 - Issuing should read Circulation
Really just a typo, but I found it when trying to chase
down instances of this bug, so here you go.
2011-11-16 17:51:30 +01:00
Nahuel ANGELINETTI
e0b029a4f5 (bug #4518) enhance 2.2 to 3.0 scripts
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-11-16 17:48:24 +01:00
Katrin Fischer
5d5a047984 Bug 4161: Preselect active currency for new vendors
Currently when creating a new vendor in acquisitions the alphabetical first
currency will be preselected. For better usability and less mistakes the
active curency should be preselected.

To test:
Check your currency settings in administration.
Your active currency should not be the first in the list.

1) Create a new vendor
Verify the active currency is selected for list and invoice prices.

2) Check vendor summary page
Verify the correct currencies from the vendor record are shown here.

3) Edit vendor
Verify the correct currencies from the vendor record  are shown here.

Signed-off-by: Liz Rea <lrea@nekls.org>
Verified with tests 1, 2, and 3.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2011-11-16 17:46:08 +01:00
Ian Walls
1e2f697e3b Bug 2629: Add diacritic support for Ů (U with ring)
Adds Ů and ů support to word-phrase-utf.chr.  These characters are used in
Czech, for example the author Martinů, Bohuslav (1890-1959)

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2011-11-16 17:40:16 +01:00
Paul Poulain
93e597b5ea Revert "Bug 6015 : Improving load_testing"
sorry, was not supposed to be pushed (follow-up needed)

This reverts commit 47d74bb3fb.
2011-11-09 17:29:17 +01:00
Ian Walls
c3abbedebe Bug 5945: email not searchable in patron search
Adds 'email' to valid search parameters in members/member.pl

To test:
1. give a patron a unique email address in your test database
2. search on the full email; should work
3. search on the part of the email before the domain; should work

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2011-11-09 17:20:23 +01:00
Katrin Fischer
7a3dc5102e Bug 7138: Can't print basket group order pdf
PDF print of basket groups is broken.

To test:

1) Make sure OrderPdfFormat is set to pdfformat::layout2pages or pdfformat::layout3pages
2) Create a basket with orders
3) Close the basket and create a basket group checking the checkbox
4) Print the basket group as PDF

Before patch the file is broken and when opened in an editor contains an error message.
After the patch the PDF should be generated correctly again.

Thx to Chris for helping me to fix the problem.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2011-11-09 17:07:26 +01:00
Henri-Damien LAURENT
47d74bb3fb Bug 6015 : Improving load_testing
Adding a benchmark for OPAC
it tests :
 - mainpage
 - search page
 - detail page

Staff :
Adding a test on member searches
2011-11-06 18:46:13 +01:00
Chris Cormack
ee0627f20b Bug 6679: Fixing admin/aqplain :encoding(UTF-8) gives strict validation
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
tested with diacritics, no changes before and after the patch
2011-11-06 18:29:12 +01:00
Chris Cormack
3b0474950c Bug 6679 : Tidying changed parts of file
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2011-11-06 18:19:19 +01:00
Chris Cormack
21e4d79be8 Bug 6679 : Don't declare variables in conditionals
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2011-11-06 18:18:53 +01:00
Chris Cormack
e8ea58270d Bug 6679 : Not using strict .. bad script, no cookie for you!
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2011-11-06 18:13:33 +01:00
Chris Cormack
607b5449bd Bug 6679 : Don't declare variables in conditionals Don't change $_ in a list context http://search.cpan.org/~elliotjs/Perl-Critic-1.116/lib/Perl/Critic/Policy/ControlStructures/ProhibitMutatingListFunctions.pm
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2011-11-06 18:12:58 +01:00
Chris Cormack
6bb73a04c4 Bug 6679 : Declare variables outside of conditionals
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2011-11-06 18:12:18 +01:00
Paul Poulain
bfc3ea8cc4 Merge remote-tracking branch 'origin/new/bug_6390' 2011-11-06 17:56:36 +01:00
Ian Walls
58bdfdb088 Bug 6390 Followup: Basket's authorisedby might not be a borrowernumber
aqbasket.authorisedby is not foreign key constrainted to borrowers.borrowernumber,
so if it's anything other than that, vendor search breaks by using an undefined value
(GetMember() on an invalid borrowernumber) as a HASH ref.

This patch sets the branchcode (the desired value from GetMember) to a blank value, then only
changes it if GetMember is defined.  In the case where the authorisedby librarian has been deleted,
or the value is otherwise invalid, and AcqViewBaskets is set to 'branch', the basket will not appear
except to superlibrarians

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Invalid borrowernumber in aqbasket.authorisedby no longer breaks search.
2011-11-06 17:55:37 +01:00
Chris Cormack
1c429d8f63 Bug 6679: Fixing admin/aqplain :encoding(UTF-8) gives strict validation
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2011-11-06 17:36:41 +01:00
Paul Poulain
0f8db0c538 Bug 7188: C4::Context::db_scheme2dbi does case-insensitive grep
Checking NYTProf in C4::Context, it appears that the /i flag is highly time-consumming
As we don't support anything outside from mysql, returning directly mysql directly

If in a future version PostgresSQL works, then we will have to update this sub. But if an ORM is introduced, this code will be removed completly anyway

Testing note:
Drops execution time of the line from 300ms to 20 microseconds (in my testing).
2011-11-06 15:49:48 +01:00