Commit graph

2637 commits

Author SHA1 Message Date
Nahuel Angelinetti
f4649ab6a3 Add a date field in news edition, and permit to set the "timestamp" field, that is the publication date and modify the GetNewsToDisplay to return only news that timestamp is < to current date that permit to publish news later without any action.
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-11 14:12:59 -05:00
8246a7dce8 Bugfix 3176 - Browser selected languages are not use by OPAC
This patch uses HTTP_ACCEPT_LANGUAGE web browser variable
to select OPAC available language.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-11 09:13:24 -05:00
Michael Hafen
0b50aecaf7 Tweak ceilingDueDate and CalcDateDue
This patch moves ceilingDueDate and ReturnBeforeExpiry checking into
CalcDateDue(), so the renewal due date is also calculated with those.

Also restores a check in CanBookBeIssued.  If the due date isn't given
call CalcDateDue and make sure it's not in the past.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-11 09:03:21 -05:00
Nahuel ANGELINETTI
b1180360a8 (bug #3196) fix itemlost.pl
This patch fix 3 things:
* fix order by
* take care of item_level-itype
* use join in sql query

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-11 08:34:07 -05:00
Galen Charlton
b244cac492 bug 3120: tweak splitting of Dewey call number
If a call number prefix contains a hyphen, try not to
split on the hyphen.  For example, rather than
splitting the call number 'CD-ROM 787.87 EAS'
like this:

CD
-ROM
787.87
EAS

it should be

CD-ROM
787.87
EAS

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-11 07:47:09 -05:00
5ef1d6ff9e Bug 3213 - UNIMARC/MARC21 selection
Modify how XSLT stylesheet are choosen
depending on 'marcflavour' syspref.

DOCUMENTATION: XSLTResultsDisplay and XSLTDetailsDisplay
sysprefs aren't MARC21-only anymore.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-11 07:35:53 -05:00
Ryan Higgins
af2c4340ad bug 3195 : Item Transfers and Holds disrupted.
This follows revert of commit 257a439d (bug 3025).

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-08 11:18:39 -05:00
Ryan Higgins
09a5613586 Revert "(bug #3025) multiple check-in of a multiple times reserved item go wrong"
This reverts commit 257a439daf.
This patch causes Bug 3195 .

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-08 11:18:37 -05:00
Nahuel ANGELINETTI
78756abc37 (bug #3174) show the member name in reports
this patch show the member firstname and surname instead of only the borrowernumber in the guided reports page

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-08 10:17:30 -05:00
Nahuel ANGELINETTI
1a4e67c143 (bug #3183) fix the SetMarcUnicodeFlag function
This patch fix the funciton SetMarcUnicodeFlag for UNIMARC support, now the function will fix the length of the field, and set encoding as "50  " instead of "5050".

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-08 08:23:14 -05:00
15d95fdd0e Optimize XSLT.pm
Avoid reading marc_tag_structure for each biblo record to
transform by XSLT. Not totaly useless on OPAC result page.
Should be done via application variables rather than
request variable, but this is another story.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-08 07:54:08 -05:00
1d2ec60fbd Bug 2944 fix courtesy of Amr Denni
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-08 07:22:49 -05:00
Colin Campbell
3b6c36a4f3 Moved some variable definitions out of conditionals
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-07 17:08:16 -05:00
Nahuel ANGELINETTI
1310c8e2ac (bug #3193) fix the comtd value in acqui-home.pl
this patch fix the value of the comtd value which is not the same as in bookfund.pl, clicking on the value from acqui-home.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-07 16:42:03 -05:00
Chris Cormack
d32d5bfb9b Adding warnings, fixing a bug that meant the title of an item that had a fine was never printed
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-01 17:06:53 -05:00
Nahuel ANGELINETTI
4dbe34f231 (bug #3174) fill borrower number, and show author and creation date in saved reports
This patch add 2 columns in "Use Saved" page whith creation date, and the creator id.
It fix the creation of a report, to save the borrowernumber in reports table(to show it after).

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-01 16:25:36 -05:00
Galen Charlton
53ace84401 Syndetics: add support for AVSUMMARY and AVPROFILE
Added support for the Syndetics AV summary and AV profile
data elements.  The AV summary is displayed in the description
tab if present, while the AV profile is displayed as
a link off of the OPAC bib details page.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-01 07:19:19 -05:00
Galen Charlton
050f9115de Syndetics: start switch to XML::LibXML to parse results
XML::Simple doesn't handle mixed content, which is a
problem because reviews provided by Syndetics sometimes
contain HTML tags.  Furthermore, it's often easier to write
XPath to extract bits of an XML document than trying
to play with XML::Simple's options.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-01 07:17:24 -05:00
Galen Charlton
631c7008f9 Syndetics: handle variations in reviews XML output
For some reason different Syndetics users get
slightly different results when requesting
an XML-formatted review, so it's necessary to
handle both observed variations:

Here's one variation:

...
<Notes>
    <Fld520 I1="BLANK" I2="BLANK">
    <a>This is a review

And another:
...
<Notes>
    <Fld520 I1="BLANK" I2="BLANK">
        This is a review

This patch fixes a bug where some users the
source of a review but not the review itself.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-01 07:16:45 -05:00
Galen Charlton
4d95af2968 fix to C4::Koha::_isbn_cleanup
Both valid ISBN-10s and -13s can use 'X' as a checkdigit
value.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-01 07:16:41 -05:00
Joe Atzberger
ccb64c18ee Bug 3177 - haspermission offers bogus option
$intflags was never used or returned if hashref instead of userid was passed.
Also cleaned up needless passing of $dbh.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-01 07:16:20 -05:00
Ryan Higgins
fa848a66f0 Bug 3179: Typo in C4::Circulation function call causes fatal error
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-01 07:16:15 -05:00
Mason James
f6571fa5c2 fix to remove blank newlines from labels
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-28 07:04:07 -05:00
Nahuel ANGELINETTI
632955332d (bug #2750) Cannot return to another branch if the independantbranch option is set as ON
The code was modified to change the holding branch ONLY if the return to the right branch is done. If you set IndependantBranch to on, you must return the document to the HomeBranch.
And verify the return is done before show the message that allow to transfert the document to another branch.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-28 06:43:49 -05:00
Galen Charlton
a2b1922b66 bug 2915 followup - small efficiency improvement
Following up on a suggestion by Joe Atzberger, save
a database query by not counting the subscriptions
to delete; instead, simply fetch a list of them.

No user-visible change.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-27 18:03:24 -05:00
Nahuel ANGELINETTI
43e4976806 (bug #2893) Allow loan forcing if a syspref is set
If the syspref 'AllowNotForLoanOverride'(YESNO) is set to YES, the librarian is able to force a loan on an item set as "not for
loan".
If the item is not for loan and the syspref is set to YES, koha will ask to the librarian if he really want to check-out it, else
do nothing.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-27 14:29:30 -05:00
Marc Chantreux
6be431d79e _set_defaults_for_add easier to read
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-27 10:50:13 -05:00
Galen Charlton
786a1aa36a bug 3161: don't display blank language chooser
If more than one translation is installed but only one is active, a blank div
is displayed at the bottom of all pages in the intranet (and in the OPAC if the
opacchangelanguages system preference is ON), taking a bit of vertical real
estate needlessly.

Changed so that <div> for the language chooser is output
only if there is more than one enabled language.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-27 06:54:42 -05:00
33fffbcfd6 Bug 2920 Fixes Amazon content use in pro interface
This patch fixes Amazon content use in pro interface :

* Control Amazon Editorial Review by a new syspref:
  AmazonReviews.
* /catalogue/detail.tmpl doesn't display Amazon reader reviews.
  It displays only Editorial review in Description tab.
  This patch disable request for AWS reader reviews.
* Use Amazon TLD for linking book cover to local
  Amazon Search Inside.
* Minor clean up on C4::External::Amazon.pm

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-27 06:53:34 -05:00
199ec1473a Bugfix #2920 Avoid doing unecessary calls to Amazon Web Services
This patch modifies how AWS is called. AWS is now called
depending on syspref. It works completly for OPAC; it
has to be refined for intranet.

For OPAC:

  * If OPACAmazonReviews is set, AWS EditorialReview and
    Reviews (users) are grabed.
  * If OPACAmazonSimilarItems is set, AWS Similarities info
    are grabed.
  * If nothing is asked, AWS is not called anymore,
    sparing server bandwidth.

For intranet:

  It works as it used to work. AWS is called if AmazonEnabled
  is set whatever how other syspref are set.

  TODO:

    * Add a AmazonReviews syspref
    * Request Amazon content depending on AmazonSimilarities
      and AmazonReviews syspref

DOCUMENTATION:

  It should be explained that Amazon services related syspref
  have two levels:

  * AmazonEnable / OPACAmazonEnable
  * Other: OPACAmazonReviews (new), OPACAmazonSimilarProduct,
    OPACAmazonCover

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-26 10:36:14 -05:00
Galen Charlton
716c170b5d fix warning in C4::AuthoritiesMarc::merge()
"my" variable @X masks earlier declaration in same scope at C4/AuthoritiesMarc.pm line 1200

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-26 09:50:56 -05:00
Galen Charlton
b090b1c6e8 improved POD for C4::Serials::HasSubscriptionExpired()
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-26 09:50:55 -05:00
Henri-Damien LAURENT
dd9b33f1e9 Fix :Fatal Errors occurs when date is not a regular date
When the start date or the "current date" is not a regular date
the transformation and checkdate fails because there is no
Year/Month/Date
This patch makes it fail more 'silenty' for the users and raises an
error that could be coped with.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-24 22:37:04 -05:00
Nahuel ANGELINETTI
c5ca4f6391 (bug #2937) use check_date in C4::Serials::hassubscriptionexpired
This patch change the date check in hassubscriptionexpired to use Date_Calc::check_date

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-24 22:36:35 -05:00
Henri-Damien LAURENT
6c5f9d46d8 Removing map calls in void context
Thanks Joe.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-24 22:34:12 -05:00
Henri-Damien LAURENT
42bebf7a21 problem saving authority with ? and other special characters [resend]
Filtering those signs in order not to have them interpreted.
Removing some warns

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-24 22:33:53 -05:00
Henri-Damien LAURENT
9289055703 Bug Fix : 2494
Adds some rewriting
bug fix for merging
AddAuthority had some problem with updating existing data.
ModAuthority adds a new Syspref called MergeAuthoritiesOnUpdate which is used to launch or disable biblios update when updating an authority

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-24 22:33:20 -05:00
Henri-Damien LAURENT
385ffe5179 Merging authorities caused an encoding problem in biblios
MARC::File::USMARC::decode is not aware of encoding as MARC::File::XML is
So it caused a problem when decoding information and updating biblios.
Now uses MARC::File::XML
Encoding is OK

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-24 22:32:18 -05:00
Henri-Damien LAURENT
8b10335def Bug Fix : Adding Some error proofs to HaveSubscriptionExpired
Date::Calc::CalcDays was throwing error 500 when one serial had an undefined date.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-24 22:26:41 -05:00
Mason James
2a1501f539 BUG:3072 small work-around patch to restore authorities searching
this is a work-around fix, until a future patch arrives to define the missing 'Heading-Main' zebra-index.

for 3.0.x

[RM note: also included in HEAD so that I can include the UNIMARC(A)
 updates by HDL]

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-24 22:04:16 -05:00
Henri-Damien LAURENT
40ab51d8f7 Bug Fixing : searching on mainmainentry was disabled
Adding Heading-Main as new index code in order to search only on Heading-main when $a selected.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-24 21:59:04 -05:00
Henri-Damien LAURENT
e5d1bced25 Adding some Error proof on GetAuthority
return undef if there is a problem

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-24 21:01:36 -05:00
Henri-Damien LAURENT
e7282020f7 Restoring startsby search on authorities.
[RM note: fixes bug 2792]

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-24 20:56:58 -05:00
Mason James
866df9ce97 BUG-3160: fixes 'itemlost' check on item return.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-24 20:41:53 -05:00
Galen Charlton
1e6b61cdb1 changed OAI-PMH implementation
Replaced older OAI-PMH server implementation
with new one by Frédéric Demians.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-24 14:01:21 -05:00
Brian Harrington
4c4cae22da Revisions to auto-generated authorities patch
It turns out that the "blank" record created by MARC::Record->new()
has a leader, so now I explicitly create one in addbiblio.pl.  I
also realized I can't count. :-)

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-24 14:01:15 -05:00
David Goldfein
17923b97f6 Modified log reporting to allow multiple modules to be selected.
Reworked ViewLog.pl and the template.  Eliminated html errors, cleaned up
the template, change mime type to text/csv and other minor changes.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-24 13:36:16 -05:00
Michael Hafen
7d61fd62f5 New feature ceiling Due Date.
This adds a feature and system preference: ceilingDueDate.  If this is
set to a valid ( according to dateformat syspref ) date, then calculated
due dates will be less than this date.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-24 12:49:54 -05:00
Joe Atzberger
6ad369f80b Cleanup and tighten Letters module.
Subroutine arguments enforced w/ with more checks, explicit return undef where warranted.
Placeholders used in SQL where applicable.
One logical error corrected :
- next MESSAGE if ( lc( $message->{'message_transport_type'} eq 'rss' ) );
+ next MESSAGE if ( lc($message->{'message_transport_type'}) eq 'rss' );

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-24 11:16:50 -05:00
Joe Atzberger
424eff89dd Basic reformat of section in Search.pm
In for loops, replace all-inclusive conditional blocks like:
    for (@foo) {
        if (test) {
            block;
        }
    }

with conditional use of "next":
    for (@foo) {
        test or next;
        block;
    }

This reduces the number of unnecessarily nested blocks, and the
overall number of lines.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-24 10:55:53 -05:00
Michael Hafen
34d3399149 Use biblioitems.itemtype as a default for items.itype
This correct the html select default in additem.pl, and enforces use of
biblioitems.itemtype as the default in Items::AddItem.  The code in
Items is to catch items added through MARC record staging.

Thanks to Joe Atzberger for suggestion.

[RM note: this patch means that an item's item-level item type,
 once that item is added or updated via additem.pl,
 now cannot be blank or NULL unless the biblio-level item type
 is blank.]

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-24 10:26:57 -05:00
e6076612ba Fix for Bug 1877, Link to patron record from manage suggestions
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-21 18:44:02 -05:00
Brian Harrington
fe95a8ee9b Patch to improve auto-generated MARC21 authorities
This patch makes sure that MARC21 authorities have a minimal
Leader, 008, and 040.  If an authority record is created through
BiblioAddsAuthority it generates a 670 based on information in
the bib record.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-21 14:29:15 -05:00
Paul Poulain
9a0f685e14 fir for #2338
When I go to serials/claims.pl, "All Suppliers (2)" is selected in the supplier
dropdown list, and no missing issues are listed. When I choose another supplier
from that list ("Supplier 1 (2)"), then two missing issues are listed. Should
"All Suppliers" instead read "Choose a Supplier" ?

chris: I think it might be safe to remove the all suppliers option all together as its
doing nothing

paul: agreed, this patch removes the All Supplier line, that is useless, confusing & untranslatable

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-19 08:34:12 -05:00
Paul Poulain
ebfc2cdb1e Fix for 2363
There is a comma at the beginning that shouldn't be there and then there are
commas in the vol, no combo making it hard to read.  it should be something
like this:

Vol 28, No 7; Vol 28, No 8; Vol 28, No 9

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-18 18:36:21 -05:00
60fc079cfb Update for bug 1545 allowing for the title to be edited
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-18 18:36:16 -05:00
834001ffbb Allowing users to edit saved sql in guided reports. Bug 1545
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-18 14:59:02 -05:00
Galen Charlton
5889ea4c58 bug 2958: fix search results navigation for CCL, CQL, and PQF queries
The shortcut to build $query_cgi in C4::Search::buildQuery()
for CCL, CQL, and PQF queries is incorrect, as (for now)
the "q=" prefix is required.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-18 10:42:13 -05:00
Joe Atzberger
248e0392e2 Multi-bug fix - SetMarcUnicodeFlag for records coming from Koha
This has bearing on bugs 2905, 2665, 2514 and other "wide character" crashes
related to diacritics and Unicode.  This should help open the door for reliable
input of diacriticals via acquisitions.

MARC21_utf8_flag_fix.pl diagnoses and fixes existing problems with MARC data
affected by the bug.

Adding SetMarcUnicodeFlag to TransformKohaToMarc prevents the bug from corrupting
further data.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-18 09:14:43 -05:00
Joe Atzberger
cfc3f6471f Re-insert useldapserver into koha-conf.xml
This doesn't insert the large and typically unused <ldapserver> block,
just the switch with a comment pointing to C4::Auth_with_ldap.  This otherwise
was undocumented requirement, making LDAP config a bit of a shot in the dark.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-18 08:21:01 -05:00
Ryan Higgins
86ab0666a0 But 3117 : fix typo in C4::Matcher causing compilation failure.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-15 12:49:33 -05:00
Galen Charlton
14dd58e577 qualify warn; sort_by is not a required search parameter
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-08 15:54:20 -05:00
Galen Charlton
6a2a4e146e fix various warnings
* Use of uninitialized value in pattern match (m//) at C4/Biblio.pm line 1305
  (displaying MARC21 856s that don't have $3)
* Use of uninitialized value in multiplication (*) at catalogue/detail.pl line 243.
  (attemping to calculate average Amazon rating if no Amazon info
   is available)
* opac-detail.pl: Use of uninitialized value in length at C4/External/Amazon.pm line 90
  (attempting to calculate length of $isbn if it happens to be undef)

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-08 15:54:19 -05:00
Galen Charlton
684cea4309 bug 3049: display correct due date of renewed loans
The intranet item display provided by moredetail.pl
would display the original due date of the item, and
would thus be incorrect if the item had been renewed
and got a different due date.

The incorrect date was coming from items.onloan,
which AddIssue() sets to the due date.  This patch
fixes the bug in two ways:

[1] AddRenewal() now updates items.onloan with the
    correct due date.
[2] Two templates were updated to display the
    due date from (indirectly) issues.date_due
    instead of items.onloan, thus making it less
    likely that the wrong value will be displayed.

This patch does *not* update items.onloan to reflect
the correct due date.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-08 14:51:32 -05:00
Nahuel ANGELINETTI
43bb27b8da (bug #2915) C4::Biblio::DelBiblio delete the serials
This patch add the serials deletion in DelBiblio function, so now when a record is deleted all attached serials will be too.

Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-08 14:51:30 -05:00
Henri-Damien LAURENT
dbe0d99371 auto truncation was not used
Auto truncation now works on LTR languages
For RTL languages(Arab, Hebrew), development should be really improved.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-08 13:01:30 -05:00
Joe Atzberger
35c8a5be58 Introduce sth caching to Letters.pm
The re-creation of statement handles for the same queries, repeatedly,
seriously degrades the performance of notices.  This introduces new
class-level caching to avoid that problem.

Note: initial provisions
to do the same with caching of COLUMNS information about tables is
also included, but this would probably be most usefully implemented
in C4::Context (or a separate more central module).  The benefits of
caching that info would probably be even greater.  Note that this
proposed implementation might be obsoleted by ORM integration, where
DB structure info would already be cached.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-08 13:01:23 -05:00
Nahuel ANGELINETTI
89c062c44b (bug #3053) extract ISBD view generator, and permit to display valuecode in ISBD view
this patch extract the generator of ISBD view in a C4 function, because it's used in intranet AND in OPAC but with 2 separate codes.
Now it's more reusable.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-06 11:16:34 -05:00
Joe Atzberger
6a2c518efa Add warning for unrecognized sort order.
This may help elucidate problems we are having with sorts that
do not seem to work.  I.E., if the inteface is requesting
unrecognized sort orders, we need to know about it.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-06 11:01:35 -05:00
Galen Charlton
2e08f626f5 remove incomplete bib bulk editing code
Per discussion I had with Henri, removing experimental
bulk editing from the staff search results code, as
feature is incomplete and can be dangerous if
one tries to use it on a large search result
set.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-06 10:53:50 -05:00
Joe Atzberger
14be4400d8 Bug 3066 - Overhaul guided reports
execute_query now refactored, returns reliable results, does
zero presentation-layer crap.  Arguments reduced, client scripts
adapted to new API and performance improved.  Text::CSV now used
to generate CSV output, ensuring portability, encoding and accuracy.

Replaced tools/runreport.pl with misc/cronjobs/runreport.pl:
    ~ security fixed
    ~ documentation improved
    ~ TODO: finish sendmail option.

Bug 3077 also fixed.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-03 20:17:55 -05:00
Joe Atzberger
1caa108ef0 runreport.pl and prep work on Guided.pm
The old location of runreport.pl was under tools, leaving it exposed
to web requests.  This is a security flaw since it does NOT check any
Auth and allows the user to request any Saved Report be run.  This is
not a problem under misc/crontab/ and it suggests the more appropriate use.

Guided.pm is not fixed here (see bug 3066), but it is prepared to be fixed
and made compatible with runreport as detailed in the perldoc.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-03 20:14:32 -05:00
Joe Atzberger
104de0640b Serial IF statements on same $variable should be ELSIFs.
Small POD update also.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-03 20:14:19 -05:00
Mason James
2fd01051fd patch for bug-3017
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-03 19:53:16 -05:00
Nahuel ANGELINETTI
4f8f297a23 (bug #2862) improve sql reports
Clear all non-alphanum chars at the end of an sql query.
Use ESCAPE=HTML to escape double quotes in csv export

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-03 19:53:06 -05:00
02b5091c1a Internationalize Amazon support
With this patch:

  * On Amazon book cover, 'search inside' text is not displayed
    anymore because it's not translatable.
  * Link the image to local Amazon web site 'search inside' service.
    Based on AmazonLocale syspref.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-03 19:38:37 -05:00
J. David Bavousett
13cce1b3c5 Modifications to C4/Matcher for colon and ending punctuation
Recommended by Michele Maenpaa, this adds handling colon and end-punctuation stripping
in subroutine _normalize, and fixes length testing in subroutine _get_match_keys

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-03 19:10:49 -05:00
Joe Atzberger
657371808a DDCN callnumber splitting with test.
Similar to previous patch for LCCN splitting, this patch incorporates
changes to split_ddcn and supplies a test file for verifying proper
operation.  Note that the only previously documented example for intended
operation is included as one of the tests.

This regexps are created to be rather forgiving.  For example, the function
will not choke if two spaces were included where the "spec" (such as it is)
expects one.  Obviously this is because for CN splitting purposes, it doesn't
matter, we're not going to ever split in the middle of whitespace.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-03 18:47:48 -05:00
462dead372 Adding details to OPAC search results RSS, described in Bug 2973.
This includes a change to Search.pm to add a variable, subtitle_nospan, in order to display subtitles in the feed without search term highlighting HTML. The modified template attempts to display Amazon, Syndetics, or Baker & Taylor book cover images. Google images are not included because they require Javascript.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-03 18:22:04 -05:00
Daniel Sweeney
17b1412ceb Cleared a trailing warn, sorry.
Signed-off-by: Daniel Sweeney <daniel.sweeney@liblime.com>
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-03 16:41:50 -05:00
Joshua Ferraro
65ddce02f2 Serials Display Enhancement
Allows specification of how many issues of a subscription to display
at a global and subscription-specific level. Also adds a link to the
detail page to a specific subscription.

Signed-off-by: Daniel Sweeney <daniel.sweeney@liblime.com>
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-03 16:41:38 -05:00
066adc4a3e Fix Amazon cover for UNIMARC
In UNIMARC, 010 tag contains ISBN. In UNIMARC, ISBN with '-'
are valid. This patch modify ISBN normalization in order to
automaticaly suppress '-' before sending ISBN to Amazon
to get book cover.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-01 10:49:39 -05:00
Mason James
eb62fd74c1 fix to ignore 600$2 'Source of heading' fields for MARC21 subject display
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-01 10:49:28 -05:00
Henri-Damien LAURENT
32a84d56c5 Minor bug fix Documentation update : 3039
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-27 18:36:57 -05:00
Daniel Sweeney
0e76b374eb Changed syndetics base URI from syndetics.com to www.syndetics.com
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-27 17:23:52 -05:00
Daniel Sweeney
afde76f1c1 Added upc to content_identifier_exists criteria.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-27 17:23:51 -05:00
Joshua Ferraro
bd5272f074 Fix for LL Bug 405: Syndetics Enhanced Content: some cover imags are being generated as IMGs but show as broken images
Adds new template variable to test for enhanced content identifiers

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-27 17:23:51 -05:00
Joshua Ferraro
0547da0093 Fix for LL Bug 404: Syndetics Enhanced Content: Excerpts show with embedded HTML tags and entity references
XMLout needed the NoEscape option set

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-27 17:23:51 -05:00
Joshua Ferraro
edcc606257 Syndetics Enhancement: adds upc/oclc to the functions to retrive non-image data
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-27 17:23:51 -05:00
Joshua Ferraro
3d65e44d5c Syndetics and Amazon bugfix enhancements
This patch resolves a number of problems related to Enhanced Content:

1. Previously, there was no syspref for controlling whether or not to display
Amazon.com cover images apart from other content. This had the side effect
of preventing use of amazon.com content alongside use of another provider's
images. This patch introduces AmazonCoverImages and OPACAmazonCoverImages,
and changes the name of AmazonContent to AmazonEnabled.

So, for instance, you can now enable OPACAmazonSimilarItems yet utilize
SyndeticsCoverImages for displaying those similar items.

NOTE TO DOCUMENTATION TEAM: please update references to AmazonContent
and OPACAmazonContent to comply with the above.

2. Fixes some semantically incorrect uses of AmazonContent (now OPACAmazonEnabled)
on the OPAC side.

3. Resolves once and for all, the normalization of ISBN,UPC,EAN and OCLC numbers
for all enhanced content elements; These elements can be normalized using the
new functions in C4::Koha; I've replaced use of the various previously used
variables $xisbn,$norm_isbn,$clean_isbn, etc with $isbn, and the template
variable normalized_isbn.

We finally have a single, consistant place to retrieve normalize values for
these fields given a particular record.

4. Adds Syndetics attribution statements to display of all Syndetics content
'enhanced content provide by Syndetics' or 'Enhanced Description from Syndetics'

5. Adds an option to view the large cover image on the detail page on the OPAC
when using SyndeticsCoverImages; this option is controlled by a new system
preference: SyndeticsCoverImageSize which has two values: MC (medium) LC (large)

6. Adds UPC and OCLC numbers for Syndetics enhanced content queries especially
helpful for finding enhanced content for DVD and Music materials

7. Adds capability to display Syndetics images to opac-user for checkouts and overdues

8. Updates to systempreferences.sql, and updatedatabase.pl database revision 015

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-27 17:23:51 -05:00
Joshua Ferraro
9abcd844f5 Add Syndetics AuthorNotes, Awards, Series
This patch also includes a new function to retrieve the index
page from Syndetics and parse it for available content prior to
retrieving content; this is done to speed up syndetics content
by not retrieving content that doesn't exist for an item. However,
Syndetics continues to be a very slow service compared to Amazon.com
and other enhanced content services

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-27 17:23:50 -05:00
Joshua Ferraro
11bd4a7660 Adds Syndetics Reviews
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-27 17:23:50 -05:00
Joshua Ferraro
9806abf865 Adds support for Syndetics Excerpts and Editions
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-27 17:23:50 -05:00
Joshua Ferraro
de6227bd0a Add Syndetics Summaries and TOC
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-27 17:23:50 -05:00
Joshua Ferraro
3d46ed59ee Add System Prefs for Syndetics to Auth
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-27 17:23:49 -05:00
Joshua Ferraro
69c74c06ae Move Amazon.pm to External/ directory
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-27 17:23:49 -05:00
Galen Charlton
3c04a7915a fix error introduced in a previous commit
Change to GetReservesFromBiblionumber() had effect
of causing all requests of constrainttype other
than 'o' to not be included in result.

while ($foo) {
    $bar or next;
    # do stuff
    # do other stuff
}

is not equivalent to

while ($foo) {
    if ($bar) {
        # do stuff
    }
    # do other stuff

}

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-11 10:39:33 -05:00
Joe Atzberger
6b3e5ce0dc Correct perldoc
Indentations misformatted for code blocks.  Also updated reference to
GetBranchesLoop.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-11 08:37:13 -05:00
Joe Atzberger
9c8623fa13 Bug 2691 - LCCN split (for labels)
This corresponds with the test I submitted earlier and essentially
overrides the partial improvement from Nighswonger under Bug 2500.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-11 08:37:09 -05:00
Mason James
cd230c2a72 Resubmitting: fixes print statements with missing 'STDERR' in Auth_with_ldap.pm,
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-11 08:37:03 -05:00
Nahuel ANGELINETTI
257a439daf (bug #3025) multiple check-in of a multiple times reserved item go wrong
This patch check that an item is not "Waiting" before do something in GetOtherReserves(because is the item is waiting, we don't need to do something).

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-11 08:36:58 -05:00
Joe Atzberger
ccee815f4a Bug 2617: Add strict (and warnings), partial fix.
These are some of the simpler scripts to add strict to.
Corrected perldoc for Bookfund.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-11 08:36:55 -05:00
Joe Atzberger
15443111e5 Trivial correction to comment.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-11 08:36:52 -05:00
Joe Atzberger
ba0ae6cd1c Branchoverdues circ report reworking.
branchoverdues.pl
~ Removed unused variables.
~ Use elsif where applicable.
~ Added many FIXMEs.
~ Added help description.
~ Changed link to more accurate description.
~ REFACTORED branchoverdues-specific function in C4 for obvious consolidation.

This report is still of questionable value, since it's dataset has such strange
hardcoded limitations.  It is not clear that "FU" type fines and notifys=0 are
reliable or useful indicators to query on, in hardcoded form.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-06 15:01:41 -06:00
Nahuel ANGELINETTI
04cb467401 (bug #2863) add the borrowers branchcodes in suggestion list
Not a big patch, just add the borrower branchcode.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-06 14:19:11 -06:00
Galen Charlton
638482cf1a fix permissions error 2009-03-06 13:18:00 -06:00
Nahuel Angelinetti
3213ffc859 fix the sql request to work in all mysqls
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-06 13:18:00 -06:00
Joe Atzberger
621c211d43 Allow all argument forms to GetBranchesLoops.
Allow arguments to be specified in the negative (i.e. 0).
Allow function to be called with no arguments.

This supercedes the patch titled:
Allow GetBranchesLoop to intuit IndependantBranches if not specified in argument.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-06 13:03:48 -06:00
Joe Atzberger
c188100bf3 Allow GetBranchesLoop to intuit IndependantBranches if not specified in argument.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-06 13:00:43 -06:00
Joe Atzberger
3d3628a1a6 Add GetBranchLoop since so many pages use exactly the same code.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-06 12:59:27 -06:00
Joe Atzberger
0c84d36353 AddReserve had bogus prepare statement.
This patch was not fully tested because the actual behavior intended
by constraints 'o' and 'e' was apparently never implemented here.
But it had no chance of success as with:
    my $sth = $dbh->prepare("");

This uses the inteneded query, removes unneeded $sth->finish calls and
fixes *some* redeclaration of my $variables in the same scope, as
would be needed to run under warnings pragma.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-06 12:44:51 -06:00
Joe Atzberger
efa79c13b2 Basic cleanup of fixup_cardnumber
Avoid warning on syspref "checkdigit" undefined.
Functionality essentially unchanged.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-06 12:27:48 -06:00
Galen Charlton
e68c85db0e bug 2904: fix display of URLs in UNIMARC
This based on a patch by Nahuel ANGELINETTI; done to
merge changes with Mason's patch for 2951.  The original
patch description is:

in the previous patch the field used for link "name" was 856$z, but the unimarc doesn't specify this, it say to use the 856$2 fi
This patch make koha to use the 856$2."

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-06 12:18:12 -06:00
Mason James
6b6c8e1dea corrected patch for bug 2951
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-06 11:59:12 -06:00
koha
9c72711a2c This patch allows the Branch Transfer Limits feature to limit transfers either by itemtype ( like the original commit ) or collection code ( new feature ).
[Note inserted by RM: this patch is by Kyle Hall]

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-06 11:27:16 -06:00
Nahuel Angelinetti
e080066db4 bug 2772: bad image location
This patch make Page.pm to use the getitemtypeinfo function to generate the imageurl, and check (in the template) if an
image is set.
Before this patch, always the "Alt" information was shown, because the url wasn't right.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-06 09:07:46 -06:00
Daniel Sweeney
ab28085949 Added a require C4::Heading to resolve a circular dependency.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-04 16:58:18 -06:00
Mason James
41cb983c3b fix for bug-2923, corrects renew status in SCO
- removes unneeded  HTML::Template::Pro
 - some indent/newline tidies

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-04 16:28:17 -06:00
Nahuel ANGELINETTI
5397ab31dc (bug #2961) add a button to add manually the next issue
This patch add a button in "Serial Collection" to add manually the next issue. And improve the function GetNextExpected
to retrieve at least something.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-04 09:40:55 -06:00
Chris Nighswonger
fede41b161 Kohabug 2500 Fiction Call Number Splitting Enhancement/Bugfix
The current regexp used to split fiction call numbers does not handle the '.' char well. This patch corrects the regexp so that it behaves as expected.

This patch should be ported to the 3.0.x branch.

[fbcbug 5]

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-04 09:32:08 -06:00
Mason James
f295d4d223 fixes missing 'STDERR', causing 500 error below..
malformed header from script. Bad header=## checkpw - checking LDAP: mainpage.pl,

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-04 08:07:29 -06:00
Nahuel ANGELINETTI
63d2fdd8c6 (bug #2995) Set a default encoding for e-mails
Just set a default encoding as utf8 if none is provided.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-04 08:02:03 -06:00
Galen Charlton
2026c28797 display library name instead of code in limit description
The OPAC and staff search results page will now display
the library name instead of the library code in the limit
part of the search description, e.g.,

"kw,wrdl: cat branch:Centerville" instead of
"kw,wrdl: cat branch:CPL"

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-02-27 15:11:37 -06:00
Joe Atzberger
3f54fb1961 Bug 2968 - SIP ACS_STATUS message (98) misreported config.
The *_ok methods in ILS.pm were targeting the wrong depth.
This also resolves a longstanding FIXME on to_bool() warning like:
    Argument "\x{66}\x{61}..." isn't numeric in numeric ne (!=) at /ILS.pm line 94.

The example_institution_dump.sh essentially provides the proof test case for this patch.
Run it before/after on SIPconfig.xml where "MAIN" has checkout="true" and checkin="true".

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-02-26 14:57:22 -06:00
Andrew Elwell
b49d937e2c more Minor documentation fixes
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-02-26 14:45:58 -06:00
Michael Hafen
96412f1863 Add option to inventory tool to ignore copies on loan
This adds an option to the inventory tool causing it to ignore copies
currently on loan.  This is good if you want to do inventory, but don't
want to update the date-last-seen on items currently on loan.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-02-25 16:32:30 -06:00
Galen Charlton
4d7500b73c bug 2952 followup
The feature in question is described in bug 2952; to
summarize the enhancement, which the earlier patch
description did not do, the list of bibs in an
import record batch now includes a column linking
each import record to the bib that was actually created
or updated when the import batch was committed.

The improvements in this patch are:

* If bib in import batch has not been committed, it
  has not been linked to a matching new or updated bib.
  In that case, do not create a link to a guaranteed
  404 (/cgi-bin/koha/catalogue/detail.pl?biblionumber=)

* When reverting an import batch, set matched_biblionumber
  to NULL for affected records - otherwise, the Bib
  column will include links to bibs that may no longer
  exist.

* Fixed a minor HTML validation error.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-02-12 17:04:48 -06:00
Mason James
31adf4ef83 patch for feature 2952 - v3
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-02-12 16:39:33 -06:00
Nahuel ANGELINETTI
f09d0547b1 (bug #2957) import Date_to_Days
This patch import Date_to_Days from Data::Calc, else CalcFine can crash.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-02-12 14:45:47 -06:00
Galen Charlton
4c55cc220f reduce bib fetches during search and OPAC display
Speed up bib search and OPAC bib display, especially
when the XSLT OPAC results and details display sysprefs are
ON, by passing an existing MARC::Record object to three
functions:

C4::Biblio::get_biblio_authorised_values()
C4::XSLT::XSLTParse4Display()
C4::XSLT::transformMARCXML4XSLT (internal)

These functions previously fetched the bib from the
database, incurring the cost of DB retrieval and MARCXML
parsing even though client code already had a
MARC::Record object available.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-02-12 14:31:55 -06:00
Galen Charlton
05864978c5 bug 2126: reduce round-off errors in fine balance
If a patron has a number of fine transactions, the
total could be wrong.  This is particularly noticeable
when a patron has a zero balance, as summing a group
of floating point values derived from decimal(6,2) columns
can result a scalar value that is not zero.

Koha really should be using integral arithmetic
or appropriate accounting modules to do fine and
acquisitions calculations.  Using floating point scalars
for monetary amounts is always a mistake.

This patch also prevents an account maintenance
fee from being applied when renewing a patron if the
amount would be 0.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-02-12 14:31:52 -06:00
Joshua Ferraro
d2cb0a20de Fixes to two issues with status display on OPAC:
1. rather than testing for notforloan == -1, test for any negative values to set the On order status
2. in cases where itemcallnumber is blank or null, don't display the itemcallnumber brackets []

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-02-09 14:36:56 -06:00
Joshua Ferraro
04270d01b2 Distinguish between items marked 'not for loan' and 'Available'
This patch works with XSL* sysprefs == ON, a future patch will address XSL sysprefs==OFF

Items with notforloan set to a negative number still designate an 'ordered' status

Some items are marked 'not for loan' by setting that value at the item level, others by assigning
that value to that item's itemtype. This patch works for both scenarios.

Specific changes this patch introduces to the OPAC:

* Adds a new OPAC results page key 'Copies available for reference:'
* Changes 'Copies available at:' to 'Copies available for loan:'
* Changes the availability limit label in opac-advsearch from:
    'Only items currently available' to 'Only items currently
	available for loan or reference
* Displays the authorised value for the specific notforloan value in the OPAC detail page in
	parentheses next to 'Not for Loan'

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-02-09 14:36:51 -06:00
Joe Atzberger
bf17eb3902 Bug 2940 - private shelf (list) display error on 2nd and subsequent pages.
The before/after URL for the 2nd page of list elements:
http://atz.dev.kohalibrary.com/cgi-bin/koha/opac-shelves.pl?display=privateshelves?viewshelf=120&itemoff=2
http://atz.dev.kohalibrary.com/cgi-bin/koha/opac-shelves.pl?viewshelf=120&display=privateshelves&itemoff=2

The change in query string arguments is incidental, the prevention of multiple "?" is essential.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-02-09 14:28:52 -06:00
Joe Atzberger
6b9b778b1b GetMarcFromKohaField needs 2 args, or there's no point.
GetMarcFromKohaField returns (0,0) without the $frameworkcode argument.
Note the argument can be "", but it must not be undefined.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-02-09 14:15:03 -06:00
eaa3ee40a7 Avoid XSLT stylesheet building for each biblio record to transform
In XSLT.pm, put XSLT stylesheet object in a session variable in order
to avoid to build it for each biblio to parse: useful on search
result page.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-02-09 14:06:57 -06:00
Michael Hafen
ee7499d9d6 tweak Inventory tool and sub in C4/Items so call number min and max are not required
This changes the setting if default values in the inventory tool where
the min and max call number are concerned.  Also changes how the query
is formed in C4/Items so that these two are not required.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-02-09 13:53:07 -06:00
Galen Charlton
ed3621aa47 remove editor settings
Me, I use ed(1) for everything...

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-02-04 14:47:42 -06:00
John Beppu
b0ed658d3b bug 341: Use the Right Branch
When sending circulation alerts, use the branch that the
event happened on instead of $item->{homebranch}.

Signed-off-by: Daniel Sweeney <daniel.sweeney@liblime.com>
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-02-04 14:00:46 -06:00
John Beppu
062bb9a804 bug 324: Setting to_address
- Enqueue the messages with a to_address.

Signed-off-by: Daniel Sweeney <daniel.sweeney@liblime.com>
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-02-04 14:00:18 -06:00
John Beppu
9035706950 bug 323: Item Circulation Alerts UI Fixes
- fixed cross browser issues.  (IE and Safari don't let you say
  someobject.class, presumably because "class" is a keyword that's reserved
  for future versions of JS.  Firefox and Opera allow it.)

- added text to the grid for added clarity.

Signed-off-by: Daniel Sweeney <daniel.sweeney@liblime.com>
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-02-04 13:59:03 -06:00
John Beppu
39d0ed3635 Perl Modules
- C4::Letters:EnqueueLetter() is aware of new fields in message_queue table
- C4::Circulation::SendCirculationAlert() actually works
- C4::Category cleanup
- C4::ItemType cleanup
- C4::Message is a new module.
  It presents yet another way to interact with the message_queue.
  You can now take messages that have already been queued and modify
  their contents before they're sent out.

Signed-off-by: Daniel Sweeney <daniel.sweeney@liblime.com>
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-02-04 13:58:03 -06:00
John Beppu
2270ecaa90 Brand New UI for Alert Configuration
- grid layout (javascript required now)
- makes distinction between checkin and checkout messages
- no longer have to click on a button to submit the branch selection form

Signed-off-by: Daniel Sweeney <daniel.sweeney@liblime.com>
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-02-04 13:57:48 -06:00
John Beppu
e0dd01406f whitespace cleanup
Signed-off-by: Daniel Sweeney <daniel.sweeney@liblime.com>
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-02-04 13:56:53 -06:00
John Beppu
02fe630873 Sending Circulation Alerts part 1
- Added code to AddIssue to send an alert when appropriate.
- Added code to AddReturn to send an alert when appropriate.
- Added a sub called SendCirculationAlert() that DOESN'T ACTUALLY WORK YET.

Signed-off-by: Daniel Sweeney <daniel.sweeney@liblime.com>
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-02-04 13:56:20 -06:00
John Beppu
5991cdd33a New C4 Modules
* C4::Category
  - patron categories as objects
  - an all() method to return all the categories as a list
* C4::ItemType
  - itemtypes as objects
  - an all() method to return all the item types as a list
* C4::ItemCirculationAlertPreference
  - wrapper around the item_circulation_alert_preference table
  - create() and delete() methods for easy manipulation of the preferences
  - I regret giving it such a long name.
  - The item_type column should've been named itemtype to make it
    more similar to pre-existing tables.  Oh well.

(C4::Category and C4::ItemType were made so that I wouldn't have to
write SQL inside my CGI scripts.
Their main purpose is to provide an easy way to get a list of
patron categories and item types.
Do not be fooled by the amount of POD.
There's actually very little code in these modules.)

Signed-off-by: Daniel Sweeney <daniel.sweeney@liblime.com>
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-02-04 13:55:48 -06:00
John Beppu
e7702b3334 POD for C4::Members::Messaging
- fixed typos and formatting.
- added notes on how to add new kinds of messages.
- added notes on the tables being used.

Signed-off-by: Daniel Sweeney <daniel.sweeney@liblime.com>
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-02-04 13:55:14 -06:00
Mason James
35a8b9bf55 fixes SQL typo and return value in GetImportBatchStatus()
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-02-02 08:20:57 -06:00
Jesse Weaver
1301705150 Add holds policies
This adds holds policy creation support to smart rules and read support to
C4/Circulation.pm, and the two reservation pages. It also adds a system
preference, AllowHoldPolicyOverride, to control whether the staff can override
these policies.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Daniel Sweeney <daniel.sweeney@liblime.com>
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-01-16 08:21:07 -06:00
Nahuel ANGELINETTI
bfebda4ad9 (bug #2908) adding send shelf by e-mail feature
This patch add the form for sending shelf by e-mail, and add a button in shelves that allow the user to send a shelf.
It's an approximate copy of the send basket feature.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-01-12 15:51:59 -06:00
Nahuel ANGELINETTI
796f626b5b (bug #2904) support of 856$u and 856$z in UNIMARC
This patch change the linktext as the label of the link(in 856$z), and set the url from the 856$u.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-01-09 13:22:01 -06:00
Joe Atzberger
54f5ee3332 Prevent multiple warnings per notice filling cron logs.
If a value being substituted in was NULL, then warnings like this
would be emailed to the crontab owner (or MAILTO):

Use of uninitialized value in substitution (s///) at /home/user/kohaclone/C4/Letters.pm line 508.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-01-09 12:22:30 -06:00
Galen Charlton
e7aff14ba2 bug 2505: more warnings fixes in C4/Context.pm
* more portable way to determine uname for
  crash messages
* C4::Context->userenv now returns undef instead
  of 0 if no userenv has been set yet; returning
  undef when necessary is almost always better
  than returning a scalar when a hashref is
  normally expected.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-01-09 12:17:49 -06:00
stan
5ce47ac580 Enable use warnings;, clean up complainy functions, fix a few tab/space formatting issues.
Refactoring KOHAVERSION to be less crufty, enabling use warnings, change formatting slightly in places.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-01-09 10:42:57 -06:00
Galen Charlton
3a7ae97440 followup to patch for bug 2900
Previous patch broke date comparison that sets
overdue flag - now that ISO-formatted date
strings are being compared, must use "it"
instead of "<".

"2009-01-02" lt "2009-01-08" is true
"2009-01-02" <  "2009-01-08" is *false*

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-01-08 14:19:09 -06:00
Joe Atzberger
c70cd87d54 Bug 2900: fix GetPendingIssues.
GetPendingIssues did several bad things:
~ select * on a 4 table join,
~ including multiple namespace collisions,
~ including large fields marc and marcxml from biblioitems,
~ return ($count, \@array_being_counted).

Not everything is fixed here (see FIXMEs), but the situation is
improved considerably, with bug 2900 resolved.  The "timestamp"
namespace collision in query should be resolved by separate patch.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-01-08 11:08:27 -06:00
Joe Atzberger
cdb4b60d93 Bug 2747 for staff interface itemtype display.
Prefer accuracy over graphical icon.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-01-07 15:13:43 -06:00
Galen Charlton
2dcca73ae0 fix permission error introduced in a previous patch
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-01-06 21:04:42 -06:00
Joe Atzberger
a581f7203c Bug 2842: ->regexp('syspref') failed for users of iso dateformat.
Sticky due date and patron import were the two areas affected.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-01-06 20:24:46 -06:00
Joe Atzberger
4e50585926 Dates expanding to expose some time (HH:MM:SS) granularity.
t/Dates.t is essentially restored from its previous state with
the revision that it now does not use C4::Context or check syspref
for the default date format.  Instead it sets the C4::Dates default
directly, taking cue from command line argument or ENV.  ISO format
revised to accept "T" separator and "Z" (zulu) terminator. POD
expanded and corrected.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-01-06 20:24:40 -06:00
Galen Charlton
db59418c2c patch followup: restore test in GetMarcItem
Change made to GetMarcItem to quell a warning
changed sense of a test; defined($foo) is *not*
the same as $foo ne ''.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-01-06 18:55:01 -06:00
Galen Charlton
dfa0f6ea24 bug 2505: more warnings fixes to C4/Biblio.pm
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-01-06 18:54:55 -06:00
Andrew Moore
0b1c856e4b Bug 2505: adding warnings to C4/Biblio.pm
I added 'use warnings' to C4::Biblio and made a handful of changes to
reduce the number of warnings emitted.

One notable spot is the change in the regex in
C4::Biblio::GetNoZebraIndexes. I have replaced the parens with a character
class. The parens change the way 'split' works, making it return elements
for each delimiter. We did not want those elements returned, and they
only resulted in "'' => undef" being added to the final hash. They also
resulted in two "undefined" warnings for each pass through the loop. I've
included a simple test for this function.

There may be a few warnings still emitted in spots, but either I haven't
seen them yet, or I have chosen to not fix them yet because they require
too much change.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-01-05 16:16:38 -06:00
Henri-Damien LAURENT
80781eedeb Using Warns would cause problems with NoZebra
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-01-05 16:04:52 -06:00
Joe Atzberger
9dbd65da27 barcodedecode() did not always return barcode
This patch amends the function to return barcode, in particular when
filter is not defined.  It also adds an optional 2nd argument to
allow the filter to be specified by caller, enabling testing.

Non-DB-dependent test script included.  Note: T-prefix style
barcode filter is not documented, and drops the first nonzero
digit after the T.  This seems mistaken, but is not corrected here
to avoid any surprises.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-01-05 15:55:14 -06:00
Joe Atzberger (siptest
76309ae328 Allow AddIssue to log SIP transactions distinct from others.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-01-05 15:43:12 -06:00
Joe Atzberger
55c2320a23 Labels Cleanup (Part 1 of Many)
Consolidated error catching after evals.
Removed unnecessary $sth->finish calls and some unused variables.
Pulled query for itemtype mappings outside DrawSpineText and added
a class level caching variable to eliminate repeated queries for
*each piece of text* on *each label*!  This was a major performance
downside.

Note: this does not fix Unicode problems, but it does add some notes
on unsuccessful attempted workaround using utf8::encode.

C4::Labels should likely be broken up to separate out the pieces that
do not touch the database (wrappers of PDF::Reuse) and those that are
CRUD API for table data.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-12-31 15:56:11 -06:00
Joshua Ferraro
acd431f55d Adds the ability to reference itemcallnumber within XSLT
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-12-31 10:19:55 -06:00
Galen Charlton
53d4e8fa2c bug 2856 followup: remove unconditional warn
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-12-29 13:55:22 -06:00
Nahuel ANGELINETTI
61ebf9160f (bug #2856) Activate the duplicate patrons detection and check birthdate only if one is set
This patch activate the check of unique member, it was checked but not shown, and the member was added even if a duplicate was
detected.
It improve the duplicate detection, to check the birthdate only if it was specified in the form.
And fix an url of "Yes" link(if the borrower added IS the duplicate detected).

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-12-29 13:46:11 -06:00
Kyle Hall
9cf0472903 Added 'Branch Transfer Limits' Feature requested by Geauga County Library System.
Added syspref to updatedatabase.

Updated kohastructure.sql with the limits table.

Signed-off-by: Andrew Moore <andrew.moore@liblime.com>
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-12-17 14:49:02 -06:00
Henri-Damien LAURENT
29995accf1 Adding some fixing for NoZebra
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-12-11 09:34:14 -06:00
Joe Atzberger
45a33a9a40 Minor cleanup, unused variable removed.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-12-11 08:33:35 -06:00
Jesse Weaver
c9a50403e5 bug 2848 [1/2]: Send notifications to patrons when hold is received
This adds notification code to Reserves.pm to send notifications through email
or SMS to patrons when their hold is filled. It does not send the letter
directly, but instead uses EnqueueLetter. Also, it relies on
EnhancedPatronMessaging being on and the hold notification being turned on for
the specific patron through the 'Messaging' tab.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-12-08 08:51:12 -06:00
Galen Charlton
5f18793461 bug 2758: don't confirm checkout if fine balance is 0
Fixes problem where if the IssuingInProcess preference is ON,
the operator is always required to confirm a checkout if
the patron has had any fine transactions at all, even if
the patron's balance is 0.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-12-02 16:44:20 -06:00
Nahuel Angelinetti
873d1c6336 bug #2757: change the opac login generation
This patch change the method used to generate a new login for a user when his informations are modified(memberentry.pl).

Before the login are generated with the first letter of lastname and the 9 first letter of the surname, and do not verify the
login already exist).
Now the login will be lastname.surnameX, where X is an incremented digit if the login already exists.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-12-02 08:35:01 -06:00
Galen Charlton
933216b1c1 fix POD error introduced in last patch
Run prove xt/author/podcorrectness.t to verify
that POD is syntactically correct.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-12-01 11:13:35 -06:00
Danny Bouman
cd2bf6e70a bug 2817: Added support to pull Amazon information based on UPC, EAN, and 13-digit ISBN
By adding support for UPC,EAN and 13-digit ISBN we are able to pull much more content from Amazon, especially on most music and dvd content which
does not have an ISBN.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-12-01 11:05:30 -06:00
Galen Charlton
324958669a fix permissions error introduced by previous patch
Modules in C4 should not be executable.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-12-01 10:39:05 -06:00
Nahuel Angelinetti
e0bbb9d7e7 Delete all calls to thesaurus_popup.pl, and no more used plugins.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-12-01 10:31:46 -06:00
Allen Reinmeyer
25eb36f21f Bug #2531 Cannot delete private shelf
Added logic to create a list of private lists to check on deletion.  Multiple pages have the ability to delete lists, both private and public.  Default option of retrieving a user's lists is retrieving the public ones.  Now private lists of the owner are retrieved as well and checked upon deletion request.  This allows any method of deletion to delete the correct list without examining the myriad of options currently used to indicate display of privateshelves and expect all pages to know whether a shelf number comes from a private or public list.  Since deletion occurs based on shelf number and the virtualshelves table has a primary key on shelf number, this will not cause unwanted deletion of shelves.

UPDATE:  added logic for conditional creation of shelves.  Also note change in staff side as deletions worked except for viewing a populated shelf, then deleting.  The confirm message showed, but the display was of public shelves, not private.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-11-20 08:33:59 -06:00
Henri-Damien LAURENT
8b9af2775e bug fix : 2805
deleting die on lack of user/password in config file.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-11-18 16:46:32 -06:00
Galen Charlton
34ba89fd5d fix POD error
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-11-11 16:03:09 -06:00
Andrew Moore
549ec91a13 Bug 2775: adding method to clean syspref cache in C4::Context
C4::Installer provides a way to update the kohaversion syspref. Now that
C4::Context caches syspref values, any updated value through C4::Installer
is not being seen.

This patch adds a method to C4::Context to allow you to clean that
cache. Then, it calls that method when the kohaversion syspref is changed.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-11-11 15:59:00 -06:00
0551f48150 Improve C4::Charset::MarcToUTF8Record performance
A script like bulkmarkimport.pl spends most of the time
in C4::Charset::MarcToUTF8Record function, and
specifically in C4::Charset::char_decode5426
just initializing a hash. This patch moves this
hash outside function to avoid its initializing
each time the functon is called.

A test on a specific conversion script shows me
that performances were improved from 23s to 8s.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-11-06 15:53:29 -06:00
Clay Fouts
0ff177431b Database connectivity cleanups
This patch employs process-local caching of systempreferences and
eliminates the "select 1" execution every time dbh() is called.
DBI::ping() is used instead.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-11-06 15:53:25 -06:00
Joe Atzberger
679871767f Squash warnings by checking if $type is defined before comparing it.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-11-06 14:16:58 -06:00
Joe Atzberger (siptest
72583589ca Allow SIP checkout to pre-empt unfilled holds.
This affects transactions on items that may be covered by
a title or item-level hold, but have not yet been retrieved
from the stacks (i.e. "confirmed") by the librarian. This does
not affect waiting holds (found="W"), so they will still block
transaction unless they belong to the operating patron.

Also I cleanup any hold the patron has on a biblio/item when
they are allowed to checkout the item.
Here we are filling the hold because the checkout is allowed, regardless
of of the queue position.  This is different from AddIssue's CancelReserve, that
only fills the hold if it is next in line, but in the future AddIssue should
adopt a similar logic.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-11-04 14:40:38 -06:00
Joe Atzberger (siptest
8c2e5cc3aa followup - make barcode_to_borrowernumber an internal function
Set this function apart with _ since it is not OO like the rest.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-11-04 14:40:34 -06:00
Clay Fouts
f4d902a76c bug 2729: redundant call to C4::Biblio::get_biblio_authorised_values
Removes redundant and expensive call to C4:Biblio:get_biblio_authorised_values

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-10-30 08:16:59 -05:00
Galen Charlton
2acc36335e followup to Calendar overhaul
correct an errant "SELECT FROM" that slipped in

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-10-23 12:35:11 -05:00
Joe Atzberger
3d26a8cd9c Begin Calendar overhaul, turn on warnings.
Reuse SQL with placeholders where possible.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-10-23 12:18:33 -05:00
Jesse Weaver
b8d8a0ec5a fix for bug 2543: report output by tabulation a bit too literal
This repurposes the Reports module for general reports, and moves its functionality to a different module, Reports::Guided. It also updates all of the reports that can export to correctly treat the 'tabulation' value of the 'delimiter' syspref.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-10-23 11:44:28 -05:00
Galen Charlton
3ad41dbaf8 followup 1 to to renewal limit override
Update POD for CanBookBeRenewed().

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-10-23 10:34:56 -05:00
Michael Hafen
03d8521cbf Allow renewal limits to be overridden
Originally by Jesse Weaver <jesse.weaver@liblime.com>

This patch creates a new system preference, AllowRenewalLimitOverride,
that, if YES, allows the renewal limit to be manually overridden. It
updates C4::Circulation and reserve/renewscript.pl to obey this.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-10-23 10:34:50 -05:00
Michael Hafen
0da84bb4fe Adding a few columns to members/readingrec.pl
Add barcode and issues.renewals to members/readingrec.pl
Had to change the query in C4/Members, items.renewals was squashing
issues.renewals.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-10-16 14:47:21 -05:00
Michael Hafen
5076ee4251 bugfix: Sort previous borrowers descending in Items.pm for moredetail.pl
The list of previous borrowers on moredetail.pl shows the three oldest
rather than the three most recent as I expected.  This changes the sql
to order descending so we get the three most recent.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-10-16 14:47:11 -05:00
Michael Hafen
edd50a3b51 Don't pull all of biblioitems in GetItemsInfo
Pulling marc and marcxml for some 1200 copies takes a lot of RAM.  Lets
not do that.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-10-16 13:44:55 -05:00
Galen Charlton
e15c3b1b09 followup - make barcode_to_borrowernumber() work as named
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-10-14 13:10:57 -05:00
Joe Atzberger (siptest
9bef3f6cf0 SIP Holds processing on checkout
Allow valid comparison of hold_queue to current user barcode and
permit checkout if the current user is at the front of the queue.
Effectively, this allows a user to checkout a book he has held.
Here are the example checkout (11) and checkout response (12)
statements in a SIP telnet session, showing failure (120) previously
and success (121) after patch application.
Before:
11YN20060329    203000                  AOCPL|AA1|AB502326000820|ACterm1
120NUN20081009    140222AOCPL|AA1|AB502326000820|AJKidnapped :|AH|AF2008-10-09 : Koha Admin (1)|BLY|
After:
11YN20060329    203000                  AOCPL|AA1|AB502326000820|ACterm1
121NNY20081009    150204AOCPL|AA1|AB502326000820|AJKidnapped :|AH2008-10-10|AFItem was reserved for you.|

This patch also resolves security/privacy issues related to the display
of "needsconfirmation" values that identify, for example, the user
currently issued an item, or with a hold on the item.  These messages
should not be passed to an end-user interface.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-10-14 13:02:51 -05:00
Joe Atzberger (siptest
b165e9802f Fully qualify function call.
This is a pre-requisite to continued SIP processing, dealing with some
arcana related to recursive dependencies and UNIVERSAL.  The reason this
is separate from other SIP patches is that it is expected patched in other
submissions already.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-10-13 12:05:52 -05:00
Ryan Higgins
1bbe1ea268 Bug 2555 : label batch_id not properly incremented after batch num 10.
This is a stop-gap fix intended for 3.0 maintenance release.
3.2 should include a label_batches table which will allow named
batches to be associated with a template & layout, and fix the
column definition of batch_id here to be an auto_incr int.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-10-05 21:37:12 -05:00
Michael Hafen
3a902f4bc3 bug: query squashes issues.timestamp which circulation.pl needs to sort todaysissues
Little change to the query so we get the right timestamp to sort on.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-10-05 21:03:21 -05:00
Michael Hafen
09e3308024 bug: chargelostitem() didn't unset onloan on the item record.
I don't think this is left set intentionally.

If an item is set lost and it's on loan it's marked returned, but it
wasn't set as not on loan.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-10-05 21:01:24 -05:00
c805939eda Bugfix #2630 2nd attempt
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-10-01 12:23:23 -05:00
Joe Atzberger
07d1eae7cc Remove hardcoded "Freelist" line from Auth.
Apparently a leftover debugging snippet.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-10-01 12:21:49 -05:00
Joe Atzberger
9c811d13be Revising the stub for ILS/Transaction/FeePayment.pm
Obviously more implementation is needed.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-09-26 09:07:22 -05:00
Henri-Damien LAURENT
89fd84c5a3 Bug Fixing : 2581 Problem With HomeBranchOrHoldingBranch (count items management)
Using $item->{$hbranch} rather than $item->{homebranch}

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-09-11 08:43:16 -05:00
Joe Atzberger (siptest
bd0ef37c24 Bugs 2541 and 2587 - AddIssue must return date object as intended.
SIP actually relied on the AddIssue return that was not reliable.
AddRenew also updated to return C4::Dates object for datedue.

Please note, any running SIPServer will have to be restarted
*immediately* after applying this patch, because although Koha
C4 behaves as normal, the SIP server runs as a Net::Server with
components cached.  Changes will not be applied until SIPServer
restarts, and so checkout actions may fail until then.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-09-11 08:06:04 -05:00
Joe Atzberger
5897704e78 Minor cleanup, updated POD.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-09-09 10:53:04 -05:00
Joe Atzberger (siptest
288bbecf2f Correct application of noissues flag in SIP.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-09-09 10:52:44 -05:00
Danny Bouman
bb76d95a91 bug2580: category name and home library will now correctly display on all patron tabs
This patch fixes several improperly named variables and includes the home library variable on the pages that were missing it. The category
description was added to the GetMemberDetails function since a couple of the pages using that function required the variable.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-09-09 10:52:39 -05:00
Michael Hafen
d98ed1dde1 bugfix: need to return something if an itemtype doesn't have an image
I noticed that on the search pages if an itemtype doesn't have an image it's information doesn't make it out the the template.  I don't understand why, but this fixes it.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-09-08 18:44:07 -05:00
Galen Charlton
69781fbe8b bug 2582 [1/2]: don't set issuedate during renewal
Changed so that issues.issuedate is never modified
during a renewal, since that column records the original
date of the loan.  Changed the name and interpretation
of the $issuedate parameter of AddRenewal() to
$lastreneweddate, allowing (e.g.) offline circulation
to set the date of the renewal without changing the
issue date.

As a result of the original bug, issues.issuedate can be
set to NULL for loans that were renewed via the OPAC,
self checkout, or the staff interface when explicitly
renewing a loan.  Loans that were renewed by checking
the item out to the same patron will have the issue date
changed to the date of the last renewal.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-09-04 20:11:25 -05:00
Henri-Damien LAURENT
365520159f modification to show the library and not the username of the person at OPAC.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-09-02 16:24:29 -05:00
Joe Atzberger
aa4c6ff62f Fines fixes: apparent problems with fines prevent processing.
CalcFine returned values that mismatched expectations in fines.pl.

fines.pl refactored: added debugging, prevent needless recreation of
Calendar objects by storing them in hash by branch.
Still outstanding problems with fines, including the output of a field
that has no other references in Koha (so is always undef) and the
incorrect description of FinesMode.

Calendar exported "new" erroneously.  I also cleaned up the queries to
avoid needlessly compiling additional statement handles.

Please test and consider application to 3.0 maintenance.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-08-29 20:31:41 -05:00
Galen Charlton
6f295f997e bug 2466: fix clearing item field
When editing an item in the cataloging and serials
item editors, clearing a field now works.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-08-28 09:23:04 -05:00
Joe Atzberger
a01f4056f1 Minor SIP cleanup, conditionalize warnings.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-08-27 09:55:00 -05:00
Joe Atzberger
1e284039c1 Bug 2419: require Exporter
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-08-27 09:51:18 -05:00
Galen Charlton
b31859946b bug 2552: correct issue history display
The loan history for a bib can be incorrect if the bib's
biblioitemnumber is not the same as its biblionumber.
This was due to a bad join in GetBiblioIssues().

Credit to Michael Hafen for patching a similar bug,
which inspired me to check for other bad joins.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-08-27 09:46:38 -05:00
Michael Hafen
c1c49472f4 bug: bookcount.pl pulls wrong title. Problem is sql joins on wrong columns
the sql seems to assume that biblionumber and biblioitemnumber are always the same, which in my case they aren't.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-08-25 11:51:40 -05:00
Jesse Weaver
9389ef50ee Fix itemtype image problem in moremember.pl
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-08-22 11:15:25 -05:00
Galen Charlton
a670f1817e bug 2509: fix file permissions
Following suggestion by Vincent Danjean for Debian
packaging, 0755 -> 0644 for non-executable
files.

Also removed shebang from a few modules in C4.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-08-21 18:55:02 -05:00
Jesse Weaver
7da895cda7 fix for bug 1771: Template errors with remote itemtype image
This adds a new function, getitemtypeimagelocation, that returns the image
unmodified for absolute urls and returns the proper intranet or opac path
otherwise. It also updates all of the relevant files to use that function.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-08-21 16:50:29 -05:00
Jesse Weaver
c77969022b fix for bug 2477: Improve Speed of the Shelf Browser
This patch updates the queries for the shelf browser in opac-detail.pl for a
slight performance gain. It also adds a param for dateformat to C4::Auth to
fix a warning.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-08-21 16:49:49 -05:00
Vincent Danjean
c52357edc6 Still fixing permission and first line of scripts
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-08-20 20:23:54 -05:00
Andrew Moore
3d323db1fe bug 2503: removing Force* subs and replacing them with calls to C4::Circulation subs
The offline circulation file processor originally used its own methods to
insert circulation data. This patch takes advantage of the updated
C4::Circulation methods that allow us to specify dates in the past.
This makes the offline circulation file processor use C4::Circulation
functions instead of its own and removes the deprecated subs.

moving from ForceIssue to AddIssue
replacing ForceRenewal with AddRenewal
moving from ForceReturn to MarkIssueReturned
removing deprecated Force* subs
fixing a few bugs in process_koc.pl

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-08-20 17:05:24 -05:00
Andrew Moore
1de1e05e23 bug 2503: adding dates to some C4:Circulation methods to allow offline circulation tool to specify dates other than today
When uploading an offline circulation file, some actions may need to take place
in the past. This patch adds date parameters to some C4::Circulation methods
to allow us to set dates on them

added issuedate to C4::Circulation::AddIssue
adding issuedate to C4::Circulation::AddRenewal
adding returdate to C4::Circulation::MarkIssueReturned

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-08-20 17:05:24 -05:00
Andrew Moore
816594bb7b bug 2503: documentation improvements in C4::Circulation
These are some documentation changes that I made to C4::Circulation as
I was writing tests for it.

moved around the docs for CanBookBeIssued. It was in the wrong spot in the file.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-08-20 17:05:24 -05:00
Kyle Hall
38cf1fd318 Integrated version of the Koha Offline Circulation file uploader. It needs some testing and cleanup, but it works.
Signed-off-by: Andrew Moore <andrew.moore@liblime.com>
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-08-20 17:05:24 -05:00
Andrew Moore
7a80acb1e1 bug 2526: removing DEBUG flag from C4::Search
The DEBUG flag was left turned on.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-08-18 07:16:11 -05:00
Galen Charlton
8b48780665 bug 2522 [2/3]: C4::Reserves support for request targeting
_Findgroupreserve, which identifies which hold request an
item should fill, is modified to check to see if
that item is targeted to fill a specific hold request.

It first checks for a targeted match with an item-level hold request,
then a targeted match with a title-level request.  If no
such targeted match exists, it then checks for the top entries
in the holds queue.

The hold targeting map (i.e., the hold_fill_targets table) is
populated by the build_holds_queue.pl batch job.  If that
job is not used, the behavior of _Findgroupreserve
is not changed.

This patch also

* adjusts ModReserveMinusPriority so that it calls
  _FixPriority().
* adjusts circ/returns.pl so that it
  correctly detects transfers.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-08-18 07:15:52 -05:00
Joe Atzberger
49bf046701 Prevent compilation errors from complex C4 import/export.
SIP code uses UNIVERSAL modules that do not tolerate the circular deps in
C4, specifically, in Auth.pm.  Changing the order so that UNIVERSAL follows
the other imports is important to avoiding failures like:
  perl -w -e 'use UNIVERSAL qw(can); use C4::Auth;'
    "MarkIssueReturned" is not exported by the C4::Circulation module

This patch should resolve the problem earlier seen with Shelves too.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-08-18 07:15:39 -05:00
Galen Charlton
80a7d712aa bug 2518: remove useless patron and branch lookups
AddIssue does not use the results of the lookup
of the patron whose hold request was preempted
by the issue.  This patch now leaves a no-op in
the '$restype eq "Waiting"' test, but I'm not going to
refactor the hold cancellation logic now.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-08-18 07:15:24 -05:00
Galen Charlton
c7bc867695 bug 2519: clear waitingdate if request is moved off waiting status
* Changed C4::Reserves::ModReserve so that if using it to take an
  item off the hold shelf, reserves.waitingdate is cleared.
* Improved POD.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-08-18 07:15:21 -05:00
Andrew Moore
dde4051f1b Bug 2400 [18/18]: fixing pod syntax in C4/SIP/Sip/MsgType.pm
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-08-12 19:43:24 -05:00
Andrew Moore
ab13ef3535 Bug 2400 [17/18]: fixing pod syntax in C4/SIP/ILS/Item.pm
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-08-12 19:43:06 -05:00
Andrew Moore
0b49401746 Bug 2400 [16/18]: fixing pod syntax in C4/SIP/ILS/Patron.pm
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-08-12 19:42:59 -05:00
Andrew Moore
bac0647fa6 Bug 2400 [15/18]: fixing pod syntax in C4/External/BakerTaylor.pm
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-08-12 19:42:37 -05:00
Andrew Moore
a7d9851eb6 Bug 2400 [14/18]: fixing pod syntax in C4/Barcodes/incremental.pm
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-08-12 19:41:47 -05:00
Andrew Moore
4313afb977 Bug 2400 [13/18]: fixing pod syntax in C4/Barcodes/hbyymincr.pm
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-08-12 19:41:40 -05:00
Andrew Moore
846c58ac05 Bug 2400 [12/18]: fixing pod syntax in C4/NewsChannels.pm
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-08-12 19:41:38 -05:00
Andrew Moore
636409e7ba Bug 2400 [11/18]: fixing pod syntax in C4/Labels.pm
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-08-12 19:41:30 -05:00
Andrew Moore
ed2e7a0444 Bug 2400 [10/18]: fixing pod syntax in C4/ImportBatch.pm
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-08-12 19:41:20 -05:00
Andrew Moore
b22044aa97 Bug 2400 [9/18]: fixing pod syntax in C4/Overdues.pm
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-08-12 19:41:05 -05:00
Andrew Moore
2662a61f28 Bug 2400 [8/18]: fixing pod syntax in C4/Koha.pm
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-08-12 19:40:48 -05:00
Andrew Moore
46edb67d77 Bug 2400 [7/18]: fixing pod syntax in C4/Barcodes.pm
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-08-12 19:40:33 -05:00
Andrew Moore
33b9b62bf6 Bug 2400 [6/18]: fixing pod syntax in C4/Serials.pm
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-08-12 19:40:30 -05:00
Andrew Moore
279687488c Bug 2400 [5/18]: fixing pod syntax in C4/SMS.pm
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-08-12 19:40:03 -05:00
Andrew Moore
596a73e896 Bug 2400 [4/18]: fixing pod syntax in C4/Reports.pm
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-08-12 19:39:43 -05:00