Commit Graph

319 Commits

Author SHA1 Message Date
Chris Cormack 014ecffdbb Bug 5327 : Fixing unit test for SQLHelper.pm
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Confirm that all SQLHelper tests pass.
(cherry picked from commit dbe36a2bf3)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2012-02-20 14:11:15 -05:00
Paul Poulain c377ae1de8 Bug 6137 follow-up, moving new test to db_dependent directory
(cherry picked from commit 46a5154df9)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
(cherry picked from commit 870a4204fa)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2012-02-19 22:27:58 -05:00
Julian Maurice 6fd3121f68 Bug 6137: unit tests for C4::Circulation::_GetCircControlBranch
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
(cherry picked from commit 76be6208ee)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
(cherry picked from commit b35218a1a4)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2012-02-19 22:27:58 -05:00
Chris Cormack 2c3585270c Bug 5327 : Removing a broken test
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
(cherry picked from commit 181f3b36ee)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
(cherry picked from commit 6f251690ff)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2012-02-19 22:27:45 -05:00
Chris Cormack 1b92fdb88a Bug 929 : Follow up, shifting test
(cherry picked from commit 6a06860f0c)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
(cherry picked from commit 07af219057)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2012-02-19 22:27:43 -05:00
Robin Sheat b0d7bf8913 Bug 5327 - move another test around
(cherry picked from commit 8aacb28fc0)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
(cherry picked from commit 316dc62867)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2012-02-19 22:27:37 -05:00
Chris Cormack e773268666 Bug 5327: Shifting a db dependent test to the right place
Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
(cherry picked from commit 227cafe8c2)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
(cherry picked from commit e0612c01d9)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2012-02-19 22:27:37 -05:00
Sam Sanders 11b735f8c3 Bug 5327 added tests for C4/Languages.pm
Signed-off-by: Chris Hall <chrish@catalyst.net.nz>
(cherry picked from commit a0c1414f6d)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
(cherry picked from commit ed9eac7dd0)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2012-02-19 22:27:34 -05:00
Connor Dewar ec020e1709 Bug 5327 Added unit tests for C4/SIP/ILS/Transaction/Renew.pm
Signed-off-by: Chris Hall <chrish@catalyst.net.nz>
(cherry picked from commit 597fabf4f4)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
(cherry picked from commit bb06b9ac1b)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2012-02-19 22:27:34 -05:00
Kate Henderson ab2d045da7 Bug 5327 added unit tests for C4/Search_PazPar2.pm
Signed-off-by: Chris Hall <chrish@catalyst.net.nz>
(cherry picked from commit 66fecdd798)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
(cherry picked from commit 91aab0fddf)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2012-02-19 22:27:34 -05:00
Kate Henderson cc9771816f Bug 5327 added unit tests for C4/Scheduler.pm
Signed-off-by: Chris Hall <chrish@catalyst.net.nz>
(cherry picked from commit 1e2e7b9dd8)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
(cherry picked from commit a36582632d)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2012-02-19 22:27:33 -05:00
Sam Sanders cf398b8ab4 bug 5327 added unit tests for C4/Ris.pm
Signed-off-by: Chris Hall <chrish@catalyst.net.nz>
(cherry picked from commit 0618b9db72)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
(cherry picked from commit 88aee70187)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2012-02-19 22:27:33 -05:00
Jono Mingard 4dbefb7d77 Bug 5327 added unit tests for C4/Creators/PDF.pm
Signed-off-by: Chris Hall <chrish@catalyst.net.nz>
(cherry picked from commit e81cbd7fe0)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
(cherry picked from commit cbccfdbb61)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2012-02-19 22:27:33 -05:00
Sam Sanders a967a4f913 Bug 5327 added unit tests for C4/ClassSortRoutine/LCC
Signed-off-by: Chris Hall <chrish@catalyst.net.nz>
(cherry picked from commit 200b5a8231)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
(cherry picked from commit 2d113b9303)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2012-02-19 22:27:33 -05:00
Jorgia Kelsey ff510a4326 Bug 5327 added unit tests for C4/Barcodes_PrinterConfig.pm
Signed-off-by: Chris Hall <chrish@catalyst.net.nz>
(cherry picked from commit 1a20feb4ca)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
(cherry picked from commit dbf3a3df34)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2012-02-19 22:27:32 -05:00
Jono Mingard 933730e2b5 Bug 5327 added unit tests for C4/AuthoritiesMarc/MARC21.pm
Signed-off-by: Chris Hall <chrish@catalyst.net.nz>
(cherry picked from commit 5579abe41f)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
(cherry picked from commit 675315473a)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2012-02-19 22:27:32 -05:00
Sam Sanders 714b68fe8a Bug 5327 added tests for C4/Labels.pm
Signed-off-by: Chris Hall <chrish@catalyst.net.nz>
(cherry picked from commit 3b9722c7dd)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
(cherry picked from commit 60bf1f0594)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2012-02-19 22:27:32 -05:00
Sam Sanders 4b777b3735 bug 5327 added unit test for C4/Csv.pm
Signed-off-by: Chris Hall <chrish@catalyst.net.nz>
(cherry picked from commit f918c57e89)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
(cherry picked from commit 329e39b8cc)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2012-02-19 22:27:31 -05:00
Colin Campbell 54662479c3 Bug 6752: Be stricter with utf-8 encoding of output
use encoding(UTF-8) rather than utf-8 for stricter
encoding
Marking output as ':utf8' only flags the data as utf8
using :encoding(UTF-8) also checks it as valid utf-8
see binmode in perlfunc for more details
In accordance with the robustness principle input
filehandles have not been changed as code may make
the undocumented assumption that invalid utf-8 is present
in the imput
Fixes errors reported by t/00-testcritic.t
Where feasable some filehandles have been made lexical rather than
reusing global filehandle vars

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
(cherry picked from commit 263dded818)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
(cherry picked from commit 960da426a8)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2012-02-19 21:37:10 -05:00
Connor Dewar dfec2b4491 Bug 5327 Added unit tests for C4/Reports.pm
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
perl t/Reports.t b/t/Reports.t
All tests complete successfully.
(cherry picked from commit e96c92d077)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
(cherry picked from commit e44ed03423)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2012-01-21 01:31:01 -05:00
Connor Dewar e942bdde4f Bug 5327 Added unit tests for C4/ClassSortRoutine/Dewey.pm
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit f053ca0c22)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
(cherry picked from commit e4d759ff52)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2012-01-21 01:31:01 -05:00
Connor Dewar b8f4d5c4ef Bug 5327 added unit tests for C4/ClassSortRoutine/Generic
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit 995485e574)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
(cherry picked from commit 9bcc15b3f1)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2012-01-21 01:31:01 -05:00
Julian Maurice 2912921a6e Bug 6132: Add unit test for system preferences
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
(cherry picked from commit 6eac5284ee)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
(cherry picked from commit 14720f508d)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2012-01-21 01:23:21 -05:00
Chris Cormack d7c054c369 Bug 929 : Follow up adding unit tests, discovered C4::Dates cached the syspref with no way to clear it, fixed also.
(cherry picked from commit 55d0b65522)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
(cherry picked from commit 7d4cc170ed)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2012-01-21 01:22:41 -05:00
Chris Cormack 558cbe8733 Bug 929: Follow up adding the Koha:: namespace to the list of modules to test
(cherry picked from commit e6bbb97942)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
(cherry picked from commit bd05f46d12)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2012-01-21 01:22:27 -05:00
Liz Rea baf6d27040 Bug 7333 - Fixing up db_dependent/Search.t to use sample data Thanks to Chris N. for helping figure out that it was because there were no French stopwords in the DB that the test was failing.
Patch changes the French string (with French stopwords) to an English string with English stopwords, as only English stopwords are installed in the default data.

This patch will allow Search.t to run on the database attached to this bug.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
(cherry picked from commit 3c12d5f2f6)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
(cherry picked from commit 0668963124)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2012-01-20 23:33:10 -05:00
Chris Cormack b444177688 Test to check for XXX in kohaversion.pl or updatedatabase.pl
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Works as advertised.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Amended the original patch of Chris to add two exceptions for a line in SetVersion and TransferToNum.

http://bugs.koha-community.org/show_bug.cgi?id=6700
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
(cherry picked from commit bb92ac1ee0)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
(cherry picked from commit 28c00dd146)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2012-01-20 23:21:45 -05:00
Srdjan Jankovic 1430e4a987 bug_2830: Remove reserve when checking out if the borrower is not the first one in the reserve queue
To test:
Create 4 holds on a bib, for patrons A, B, C, and D,

Check in the item to mark hold as waiting for patron A
Check out the item to patron B -> reserve for patron B should be removed
Check in the item to mark hold as waiting for patron A
Check out the item to Patron A, hold should complete normally
Check in the item to mark hold as waiting for patron C
Check out the item to patron D -> reserve for patron D should be removed.
Check in the item to mark hold as waiting for patron C
Check out the item to patron C, hold should complete normally
Check in the item -> there should be no more reserves.

We also tested:
Created 4 holds on a bib with two items, for patrons A, B, C, and D

All worked as expected.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
(cherry picked from commit 6e07fd7b00)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
(cherry picked from commit da99978777)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2012-01-20 23:11:51 -05:00
Duncan Tyler c6fe08496d Bug 5327: Added unit test for C4/SIP/ILS/Transaction/RenewAll.pm
http://bugs.koha-community.org/show_bug.cgi?id=5327
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Test requires a database installed using the sample data.
All tests pass.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
(cherry picked from commit 3ae23cd6cf)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
(cherry picked from commit 4e64d14700)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2012-01-20 23:11:11 -05:00
Liz Rea 984c0a7115 Bug 7333 - modifying Members.t to use a branchcode that exists in the sample data
To test:
Create a fresh koha db with all of the sample data (if you have one that has the sample branches in it, that will work too)
run the test: prove t/db_dependent/Members.t

All subtests should complete.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
All tests complete successfully with my database created from
sample data and with the database provided on the bug.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
(cherry picked from commit b955692c84)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
(cherry picked from commit 3a42ff5d67)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2012-01-20 15:31:01 -05:00
Paul Poulain 74a213b215 Revert "Bug 5327: Added unit test for C4/SIP/ILS/Transaction/RenewAll.pm"
This reverts commit 06c822c37c.
(cherry picked from commit 8df873c1a2)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
(cherry picked from commit 2f95419c36)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2012-01-20 15:24:46 -05:00
Duncan Tyler d009946081 Bug 5327: Added unit test for C4/SIP/ILS/Transaction/RenewAll.pm
http://bugs.koha-community.org/show_bug.cgi?id=5327
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Test requires a database installed using the sample data.
All tests pass.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
(cherry picked from commit 06c822c37c)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
(cherry picked from commit caf02e8dca)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2012-01-20 15:24:20 -05:00
Chris Hall a10d4f71e5 Added missing reference case to Boolean.t and corrected count
http://bugs.koha-community.org/show_bug.cgi?id=5327
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Test passes.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
(cherry picked from commit 64a9c64100)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
(cherry picked from commit 31efcea6ca)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2012-01-20 15:24:06 -05:00
Chris Hall bb28932d0e Added missing reference case to Boolean.t and corrected count
http://bugs.koha-community.org/show_bug.cgi?id=5327
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Test passes.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
(cherry picked from commit dfa4b73737)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
(cherry picked from commit c8f04b8e7b)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2012-01-20 15:23:39 -05:00
Duncan Tyler 0867625a1d Added unit tests for Scrubber
http://bugs.koha-community.org/show_bug.cgi?id=5327
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Test passes.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
(cherry picked from commit 47b514cf56)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
(cherry picked from commit fc2a6415a9)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2012-01-20 15:23:13 -05:00
Duncan Tyler a25a43c88c Added unit test for AuthoritiesMarc/UNIMARC.pm
http://bugs.koha-community.org/show_bug.cgi?id=5327
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Test passes.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
(cherry picked from commit bb79d37b87)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
(cherry picked from commit b418a16623)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2012-01-20 15:22:59 -05:00
Duncan Tyler 252aab52be Added unit tests for Sip Checksum.pm
http://bugs.koha-community.org/show_bug.cgi?id=5327
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Test passes.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
(cherry picked from commit 7876d4fa8d)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
(cherry picked from commit 3aa19f2186)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2012-01-20 15:22:45 -05:00
Chris Cormack 201f4ee4fe Bug 7215 : The Module changed, but the tests weren't updated to reflect that
Updating the test

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
(cherry picked from commit 9c66c42764)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2012-01-18 13:06:01 -05:00
Chris Nighswonger b253e07fca 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>
(cherry picked from commit a340ded2ca)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-11-19 21:07:08 -05:00
Srdjan Jankovic b340aa213e bug_5533: Improved marking items as lost
Call LostItem() whenever an item is lost
Disable lost status on catalogue item edit

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-10-25 19:54:56 -04:00
Srdjan Jankovic a82959ed04 bug_6253: Unified member Search()
Removed SearchMembers() and replaced with more generic Search()
Amended Search() to try cardnumber first
Replaced SearchMembers() calls with Search()
Replaced SELECT with Search() where appropriate
C4::SQLHelper:
- added support for '' key for search filter.
- when passing an array to filter, join with OR (rather than AND)
- added support for key => [val1, val2] in filter
- did not document - there was no input documentation to start with,
  and SQLHelper should be replaced with something better anyway

Signed-off-by: Liz Rea <lrea@nekls.org>
(again - testing merge issue)
The functionality of the patch seems to be maintained with Biblibre's changes.

I tested the following:
Extended attribute searching: works
3 part name searching: works
2 part name searching: works
1 part name searching: works

From:
mainpage.pl
members-home.pl
	Patron search limited by branch: Works
	Patron search limited by patron category: works
	Ordering by cardnumber instead of surname: works
The "Check Out" field in the masthead.

Circ Autocomplete is not reliably functional at this time, but the problem appears to predate this patch.
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit 18b8991cf1)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-10-25 19:32:30 -04:00
Paul Poulain 54ce3fde2b Bug 7034: de-nesting C4/Branch.pm
use C4::Koha was loaded only to call C4::Koha::get_infos_of in get_branchinfos_of

the sub get_branchinfos_of was used nowhere
(checked with "grep -R get_branchinfos_of *")
only one reference was made to get_branchinfos_of, in reserve/request.pl, but the sub was not used in fact (maybe removed previously & silently)

This patch removes sub get_branchinfos_of and use C4::Koha in C4::Branch, as well as the reference in request.pl and the t test

The patch doesn't remove use C4::Branch in reserve/request.pl, as it's still used for other subroutines.

Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit 69732f5c62)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-10-25 19:25:36 -04:00
Chris Cormack 459c3c7b76 Fixing a broken test
(cherry picked from commit 7244d5060b)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-10-08 12:52:54 -04:00
MJ Ray 2afee7b84a Bug 6460: alternative fix, updating template and script instead of C4::Log
Add some test cases and fix a bug in C4::Log found by in review.
Thanks-to: Katrin Fischer.

Signed-off-by: Liz Rea <lrea@nekls.org>
Passes test, interface works as expected.

Signed-off-by: Liz Rea <lrea@nekls.org>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit a746e11c14)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-10-08 12:47:44 -04:00
Chris Cormack c3a3d3ad24 Bug 6679 : Enable Critic tests for authorities and fixed resulting warnings
Signed-off-by: Ian <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit e1bb9e5137)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-10-08 12:44:15 -04:00
Chris Cormack 3ca4d242d0 Bug 6679 Fix scripts in admin & acqui to pass Perl::Critic
Scripts in admin & acqui subdirectores weren't passing t/00-testcritic.t. This
patch add admin & acqui scripts to test case and fix various errors related to
Perl::Critic compliancy.

- Fixing a style error to pass Perl::Critic, plus silencing a warn
- More style errors, plus fixing a security issue
- Explicitly using Carp

Contrary to common belief, subroutine prototypes do not enable
compile-time checks for proper arguments. Don't use them.

Defining a named sub within another sub, does not prevent that
subroutine being global

Signed-off-by: Frédéric Demians <frederic@tamil.fr>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit 7cdea5de35)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-10-08 12:16:39 -04:00
Galen Charlton ee02c805fc bug 5653: use itemcallnumber in bib label layouts
The sample bib label layouts and the hard-coded default
format_string for new layouts used 'callnumber' when they
should have used 'itemcallnumber', preventing call numbers
from being printed on spine labels that use the system-supplied
layouts.  Besides correcting the sample data, this patch
now also enshrines 'callnumber' as an alias for 'itemcallnumber'.
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
After applying patch it works for new and old layouts (itemcallnumber and callnumber).

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit d2f49e1976)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-06-13 20:59:37 -04:00
Jared Camins-Esakov 905d24a9e0 Add unit tests to ensure bug 5683 doesn't reappear
Signed-off-by: Jared Camins-Esakov <jcamins@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
(cherry picked from commit d949472324)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-06-03 15:06:01 -04:00
Colin Campbell d8b362e0f9 Bug 5415 Let calls of SimpleSearch utilize considtent interface
Remove some unnecessary checks when check of error is
sufficient. Make the order in some cases more logical
Should remove some possibilities of runtime warning noise.
Although some calls belong to the 'Nothing could
ever go wrong' school have added some warnings

Signed-off-by: Christophe Croullebois <christophe.croullebois@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-08 13:52:57 +12:00
Frédéric Demians b9cee99da4 Bug 5065 Add ability to choose framework on import
Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-03-21 20:36:35 +13:00