Commit graph

4110 commits

Author SHA1 Message Date
4f986f34e2 Bug 8975 - search results should say on order in staff client
In order to allow holds on items with notforloan = -1, processing
of "unavailable" items in Search.pm was altered to exclude items
with notforloan < 0. (See Bug 2341: items marked 'on order' not
 reserveable from search results). Doing so meant that such items
were excluded from the list, in staff client search results, of
items which are unavailable.

This patch changes the logic of that processing so that items
with notforloan < 0 are considered unavailable, but can still
be placed on hold.

To test, edit a record with a single item and view that record
in search results. When the item is is on order (notforloan -1)
it should say so. The holds link should be INactive only if:

- item is withdrawn AND/OR
- item is lost AND/OR
- item is damaged (and AllowHoldsOnDamagedItems is off) AND/OR
- item is not for loan, with notforloan > 0

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>

All tests pass (note that a reindex is required if changing item
statuses - which is why my first tests failed).

Passed-QA-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2012-11-20 07:40:40 -05:00
Jared Camins-Esakov
d44b552b3f Merge branch 'bug_9046' into 3.12-master 2012-11-20 07:32:29 -05:00
Jonathan Druart
ff61e9f16f Bug 9046: Followup FIX perl v5.10 raises an error if itemnumbers if undefined
If the itemnumbers parameter is undef, perl raises an error :
"Can't use an undefined value as an ARRAY reference"

Signed-off-by: Mason James <mtj@kohaaloha.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2012-11-20 07:31:33 -05:00
Paul Poulain
e2cf59ac58 Bug 8997: Unnecessary call to getAllLanguages
In C4/Language, getTranslatedLanguages calls getAllLanguage, passes it
to _build_languages_arrayref, that does nothing of it. Removing this
dead code will clean & reduce SQL overhead

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
I tried switching between languages and enabling and disabling
languages, and could not see any change with the patch applied.

Passed-QA-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2012-11-20 07:19:55 -05:00
Jonathan Druart
0215736bcc Bug 9046: FIX wrong test on an arrayref instead of an array
EmbedItemsInMarcBiblio does not embed items when the itemnumbers param
is given. That breaks the export tools (used from commandline).

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2012-11-20 06:52:51 -05:00
Jared Camins-Esakov
e85631e5ec Merge branch 'bug_9085' into 3.12-master 2012-11-20 06:50:46 -05:00
Chris Nighswonger
cb6870d8d1 Bug 9085 - Installer will not run with DEBUG set
This is due to raising all db errors combined with the fact that attempts
to make selections from a non-existent systempreferences table raises db errors.

The installer should run even with DEBUG set, otherwise dropping and recreating
a development database becomes somewhat of a chore. This patch adds code to
check for the existence of the systempreferece table. If the table exists, then
RaiseError is enabled on the database handle. Otherwise it is disabled to allow
the installer to run without throwing an error.

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
The installer can now be run both with and without DEBUG set.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2012-11-20 06:50:08 -05:00
Jared Camins-Esakov
49c7d69561 Bug 9066: VirtualShelves db access not Plack+MariaDB compatible
The $dbh database handle in C4::VirtualShelves was declared at the
module level, which means under Plack it is initialized only once, when
the server first starts. With the default MySQL configuration this is
not a problem, since the MySQL connection does not time out, but the
MariaDB default configuration does time out, resulting in every page
that calls any sub in C4::VirtualShelves failing after a certain period.
This patch eliminates the module-level $dbh variable and replaces it
with $dbh handles in each subroutine that requires it.

To test:
Confirm that Virtual Shelves functionality still works as expected. The
problem is not reproducible when using Apache or Plack+MySQL, but if
everything works after the patch has been applied, the changes are safe.

Signed-off-by: Mason James <mtj@kohaaloha.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2012-11-20 06:49:07 -05:00
Jared Camins-Esakov
6456162544 Bug 9053: Test::MockModule and DBD::Mock should be required
Test::MockModule and DBD::Mock are required for the unit tests in t/
to run. This is good, but means they should be required.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Passed-QA-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2012-11-12 09:43:40 -05:00
Jared Camins-Esakov
a1bba47177 Merge branch 'bug_8996' into 3.12-master 2012-11-09 21:30:30 -05:00
Fridolyn SOMERS
24216136f4 Bug 8996: In result page items with negative notforloan are available
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Passed-QA-by: Marcel de Rooy <M.de.Rooy@rijksmuseum.nl>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2012-11-09 21:29:51 -05:00
Jared Camins-Esakov
25bc645c16 Merge branch 'bug_6428' into 3.12-master 2012-11-09 20:37:26 -05:00
Nuño López Ansótegui
6b14cd71f6 Bug 6428 - refered column 'items.coded_location_qualifier' does not exist
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2012-11-09 20:36:04 -05:00
Jared Camins-Esakov
c254d0eb33 Merge branch 'bug_7921' into 3.12-master 2012-11-09 20:24:24 -05:00
Fridolyn SOMERS
1aeff203be Bug 7921: Software error while placing order
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Passed-QA-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2012-11-09 20:19:10 -05:00
Fridolyn SOMERS
33403b61d7 Bug 8988: item status uses authorized value description for intranet
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Passed-QA-by: Marcel de Rooy <M.de.Rooy@rijksmuseum.nl>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2012-11-09 20:13:15 -05:00
Jared Camins-Esakov
92bdb73677 Merge branch 'bug_9005' into 3.12-master 2012-11-08 12:47:04 -05:00
Dobrica Pavlinusic
24125d4be3 Bug 8919 - ExtendedPatronAttributes not populated from LDAP
Current code is overly complex and assumes that
C4::Members::AttributeTypes::GetAttributeTypes
returns array of attribute codes which is not true.

Instead it return array of hashes so none of extended attributes
will be replicated from LDAP.

This code correctly extracts extended attributes from borrower data
provides simpler code which fills same structure.

It also skips empty values (" ") which are result of mapping without
any default value. This is needed to make unique extended patron values
work. If not handled it would insert empty value for first user and
fail for all others on uniqueness constraint.

Test scenario:

1. define Patron attribute types in administration
2. define mapping from LDAP fields to attributes in koha-conf.xml
3. login as new user with LDAP fields and verify that extended
   attributes are replicated from LDAP

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Passed-QA-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2012-11-08 12:42:52 -05:00
Jared Camins-Esakov
4b65389d5e Bug 9005: Allow user to disable syspref cache
Because C4::Context uses an in-memory hash for caching sysprefs,
changing a syspref under a multi-threaded persistent environment
requires a server restart. This patch makes it possible disable
the syspref cache.

To test:
1) If you are using a multi-threaded persistent server (Starman, etc.),
   change a syspref and note that the effects of the syspref change may
   or may not be visible on any given request before applying this patch.
   You will need to choose a syspref with obvious effects that can be
   seen by simply refreshing the page. I recommend enabling or
   disabling additional languages in the OPAC, since you can refresh the
   page a dozen times and reasonably expect to see the new behavior you
   set only 1/n of the time.
2) Apply patch.
3) Add "C4::Context->disable_syspref_cache();" to your koha.psgi file
4) Repeat step 1, noting that you never see the stale behavior.
5) Run test at t/db_dependent/Context.t.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
All tests passed.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2012-11-08 12:41:10 -05:00
5b8e1548e4 Bug 8804 [Revised] Quiet errors in the log from Auth.pm
Found three cases where variables were being
referenced which did not (in each case) exist. Adding
checks for those variables' existence.

Errors appeared when logged in and viewing a detail
page in the OPAC.

Revision simplifies logic as per RM suggestion.

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2012-11-01 16:57:19 -04:00
Robin Sheat
ba8be1f2f9 Bug 8636 - add Moose dependency to the dependencies
Koha::SearchEngine requires moose, but it wasn't declared as a
dependency.

Also update the debian/control dependencies to match the current state
of the requirements.

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Passed-QA-by: Mason James <mtj@kohaaloha.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2012-11-01 09:25:15 -04:00
Jared Camins-Esakov
1d5b614d8b Bug 8823: CatalogModuleRelink Creates Multiple Links between Bib and Auth record
On 3.8.x, it was possible for multiple automatically generated
authorities to be linked to a single heading. This patch deletes
previous links from headings prior to linking them to
automatically-generated headings. This patch also corrects a
potential problem wherein multiple authorities might be generated if
a record is edited repeatedly in quick succession. The latter problem
exists on Master and 3.6.x as well, and the code that corrects the
multiple linkages is equally applicable if seemingly unnecessary.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-10-28 19:27:27 +01:00
Jared Camins-Esakov
9ea2bb7eca Bug 8947: [SIGNED-OFF] XSLT fallback logic backwards
The logic for the XSLT fallback was backwards, which meant that
non-English installations of the CCSR theme were unable to use XSLT
stylesheets. This patch corrects the logic.

To test:
1) Switch to the ccsr OPAC theme.
2) Switch to a language other than English for the OPAC.
3) Turn on the default XSLT stylesheets for the OPAC.
4) Do a search or view a record that would result in something being
   displayed with XSLT. This will work after the patch, but not before.

Signed-off-by: Magnus Enger <magnus@enger.priv.no>
Works as advertised!

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-10-26 17:41:08 +02:00
Robert Williams
95b5e2f94e Bug 8939 : Fines being charged during the grace period
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-10-26 17:26:07 +02:00
Mathieu Saby
44e65ad514 Bug 8958: Make facets more UNIMARC compliant (revision 1)
Suppressions : I suppressed some indexes not existing in Unimarc : 603, 502,
504

Corrections :

  - Places : 651 was Marc21 => I put the right value (607)
  - Topics : 600a => 600ab (name/surname) ;  604a => 604at (author/title)

To test, take a record with 607, 600ab, 601ab, 604at, do a research matching
this record, and check if facets looks nicer that before...

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

Works as described. 607 for Places is very useful! Other tweakings make sense.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-10-26 17:16:50 +02:00
Jared Camins-Esakov
ae977a9cfd Bug 8914: Blank search that returns invalid authorities fails under Plack
When doing a search with no terms for the default authority type under
Plack, you will get a segfault if it returns any records that do not
have any authority type. As far as I can tell, this cannot be reproduced
under CGI/Apache.

To test:
Confirm that you don't get an error if you click the Submit button in
the authorities sections in the staff client and OPAC without entering
a term or changing the authority type.

You may or may not be able to reproduce the problem prior to applying
the patch, but that is the only situation in which I managed to trigger
it.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-10-25 18:41:46 +02:00
Lyon3 Team
0e8e6e7133 Question marks in series title facet links
When series title include a question or exclamation mark, theese must be removed
to prevent search failure.

http://bugs.koha-community.org/show_bug.cgi?id=8888
Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Before the patch: Series facet links with ! or ? return no results.
After the patch the same links return valid results.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-10-25 18:15:37 +02:00
Jared Camins-Esakov
cc9b23d3d7 Bug 8905: Error when accessing invalid authority
The GetAuthority shim does not check that authority retrieval was
successful, and therefore can call ->record on an undefined value.

This can be reproduced by trying to load an invalid authority record
using bulkmarcimport. There may be other ways to trigger it, but I'm
not sure what they are.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
another way to trigger this error is just forging your URL with a wrong
authid !
2012-10-25 15:06:37 +02:00
Mark Tompsett
c66270c02f Bug 8834 - Call to C4::Context::preference fails to pass $self in Circulation.pm
Changed:
    my $circcontrol = C4::Context::preference('CircControl');
To:
    my $circcontrol = C4::Context->preference('CircControl');
This will pass $self and 'CircControl' which will then prevent
a "Use of uninitialized value" error log entry.

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-10-24 18:21:23 +02:00
Colin Campbell
1c4125cd0e Bug 8841 Duedate should be set to end of expiry day
When reducing duedate to patron's expiry date
it should be set to end of that day not 00:00
take account of the fact that the borrower
expiry date will have no hours/minutes

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-10-24 18:17:06 +02:00
Jonathan Druart
fd9f025889 But 8787: don't load the page if OpacMaintenance is ON
If the syspref OpacMaintenance is ON, it is useless to loaded the
requested page.

To test:
- switch on the syspref OpacMaintenace
- check in your apache access log, zebra log, etc. the requested page is
  not loaded (i.e. on the opac-search.pl page)

Signed-off-by: Marc Veron <veron@veron.ch>
Checked by watching  other_vhosts_access.log
Works as expected

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-10-24 18:15:19 +02:00
Jared Camins-Esakov
b29e524656 Bug 8890: C4/HoldsQueue requires DB
This counter-patch moves all database handling code into subroutines
in C4::HoldsQueue. This fixes the test, and is required for persistent
environments like Plack.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
2012-10-24 17:52:36 +02:00
492dd7dc7f Bug 8870 UNIMARC authorities search doesn't display information properly
- Note field (3xx) are not displayed on search result page. We get
  'HASH()' text.
- Parallel/Other forms (7xx) are not displayed, with language name in front of
  heading, both on result and detail page.
- Note are not displayed.
- On result page, seealso form are displayed, but end with a superfluous '--'
- Style the result page, with condensed block, and space between them.
- Done both on OPAC/staff

To be applied on 3.8.x after bug 8523.

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-10-22 17:50:06 +02:00
084367f6cb Bug 3087 Fix Z39.50 server to return the correct record syntax
Modify Makefile.PL and Zebra configuration files in order to parametrized
biblio record type returned by Zebra Z39.50 server.

How to test:

- Test with a MARC21 and a UNIMARC DB
- Do a new installation
- Search from OPAC
- Search from a Z39.50 client like yaz-client: syntax = MARC21/UNIMARC must be
  choosed
- It was working for MARC21: it continues to work
- It wasn't working for UNIMARC: it works now, both in OPAC and from a Z39.50
  client

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Works fine for MARC21. Frederic looked at UNIMARC. Magnus looked at NORMARC.
GRS1 works okay for me. I still have issues with DOM, but they are not directly related to changes in this patch.
A followup is still needed for packaging (debian/templates).

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-10-22 14:12:22 +02:00
32fab74b98 Bug 1963 Problem with deleted biblio in a virtual shelf
This bug reappear in HEAD/3.8. When trying to display a virtual shelf
(list) containing a deleted biblio, this error message is displayed:

Software error:

Can't call method "field" on an undefined value at ....C4/Koha.pm line
1231.

This fix modify SQL query retrieving biblios, just skipping records from
virtual shelf table with no linked record in biblio table: LEFT JOIN
replace with JOIN.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-10-17 18:06:21 +02:00
Paul Poulain
6eeb518042 Merge remote-tracking branch 'origin/new/bug_8636' 2012-10-12 11:55:14 +02:00
Jared Camins-Esakov
54d56e303a Bug 8636: Add dependency on Test::Deep
The test t/db_dependent/Koha.t uses Test::Deep to compare data
structures, but that dependency was not listed for the installer.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-10-12 11:54:19 +02:00
a7ef547ec9 Bug 8700 - RESERVESLIP fields not being replaced correctly
The slip RESERVESLIP is not replacing fields correctly.
C4::Reserves::ReserveSlip calls C4::Letters::GetPreparedLetter,
and passes the $reserve hashref to it for each table except branches
( which is passed the branchcode ). The problem is, if you pass a
hashref for a table, it uses that hashref for the replacing, rather
than looking up the data from the database.

Fixed by passing the correct keys for each of the tables requested.

Signed-off-by: Marc Veron <veron@veron.ch>

Tested following the test plan.
Could reproduce the bug.
After applying the patch slip printed as expected.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-10-10 17:58:30 +02:00
Jonathan Druart
0f044d6c26 BUG 8652: Add a default value for the lateorders
- By default, the date from value is the today's date
- Replace C4::Dates with Koha::DateUtils

To test:
Check the page displays the late orders by default.
Add values for 'date from' and/or 'date to' and/or delay.
The date interval is based on the estimated delivery date and the delay
param is based on the closed date.
2012-10-09 11:27:39 +02:00
Frédérick Capovilla
37340e3718 Normalize records imported from Z39.50 servers.
Some Z39.50 server may use the MARC-8 encoding, which uses separated
diacritics. By forcing a normalization, all imported records will have
combined diacritics.

Records with separated diacritics might not show up in Zebra searches if
the search terms use accented characters.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

http://bugs.koha-community.org/show_bug.cgi?id=8610
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
checked it still works after the patch with UNIMARC and BNF server (that
provide utf-8 records)
2012-10-08 18:46:56 +02:00
Jared Camins-Esakov
e883a0f065 Bug 8829: Fix authority importing
A subroutine was not being imported by C4::ImportBatch (ironic, no?)
so this patch makes the call fully-qualified. This patch also cleans
up two warnings in C4::Auth that are raised when logged in as the
database user.

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-10-08 18:06:55 +02:00
Julian Maurice
c0bd20db7b Bug 8850: Export CanItemBeReserved in C4::ILSDI::Services
Signed-off-by: Matthias Meusburger <matthias.meusburger@biblibre.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-10-05 17:39:21 +02:00
Julian Maurice
2895bb08cf Bug 8850: Export CanBookBeReserved in C4::ILSDI::Services
Signed-off-by: Matthias Meusburger <matthias.meusburger@biblibre.com>
2012-10-05 17:39:18 +02:00
Fridolyn SOMERS
bd8f01fec0 Bug 8497: Strange behavior when modifying the timeout system preference
Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Tested standard login, patron auto-complete, and system preferences.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-10-05 16:49:24 +02:00
1e1422e8ba Bug 7963 Parallel HTTP requests when checking URLs
Current script check-url.pl checks URL found in 856$u by sending HTTP
requests, one by one. The next request can't be sent before the previous
one get a result, which can be very slow for dead URL. I propose a new
script which send multiple requests simultaneously which improve
drastically URL checking execution time.

This script is based on AnyEvent and AnyEvent::HTTP CPAN modules.
Add new dependencies AnyEvent & AnyEvent::HTTP.

See doc: perldoc check-url-quick.pl

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
2012-10-05 11:44:52 +02:00
Paul Poulain
6c182045d9 Bug 8739 follow-up fixing perlcritic error
This patch is not related nor introduced by bug 8739, but while qa-ing it, I found those 2 perlcritic violation

this patch fixes it !

I also fixed a tiny indentation problem
2012-10-03 18:02:38 +02:00
5954631aea Bug 8739 - Partial Fine Payments Saving Amount Paid Incorrectly
Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Confirmed using test plan that the display is corrected.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-10-03 17:58:56 +02:00
Mark Tompsett
4c8cfd0c29 Bug 8737 - Incorrect icon at login in staff client
Added the following missing code to ensure the correct icon
is used when logged out:
   IntranetFavicon => C4::Context->preference('IntranetFavicon')
This was added into an existing $template->param() call.

Not to be confused with the koha logo on the login page, the
icon is a 16x16 pixel graphic in the browser tab. The default
is found at .../intranet-tmpl/prog/en/includes/favicon.ico.

If the "IntranetFavicon" system preference is set, it should be
used by the staff client regardless of login state. It was not
being used in the "AUTH rejected" section of Auth.pm, but the
OpacFavicon variable was being set. This explains why the
"OpacFavicon" system preference works for the OPAC client, but
not the staff client upon logout.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-10-03 11:07:14 +02:00
Mark Tompsett
514b32898e Bug 8350: warning in logs when searching for nonexistent ISBN
Searching for a 10 or 13 digit numeric string that does not exist in
one's catalog will fail to affect SQL statement correctly
in C4::Breeding. Moved string substitution, which was triggering error
when search was undefined, and fixed if statements accordingly.

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-10-02 16:58:41 +02:00
Jared Camins-Esakov
813c744008 Bug 8818: make sure we load modules before using them
An eval { eval "require $module;" }; was replaced with
eval { eval { require $module; }; }; which is a no-op, meaning that
the linker was not getting loaded, and the catalog module was throwing
up a big nasty error every time someone tried to save a record with a
heading. This patch replaces the require with can_load from
Module::Load::Conditional, which is PBP-friendly, and offers equivalent
functionality.

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-10-01 19:01:50 +02:00