Commit graph

45 commits

Author SHA1 Message Date
caae161a4e Bug 14306: Show URL from MARC21 field 555$u under Title Notes/Descriptions
This patch includes:
[1] Add some logic to GetMarcNotes to embed the contents of MARC21 field
    555$u in a html anchor tag.
[2] Add a unit test for GetMarcNotes in Biblio.t
[3] Remove calls to GetMarcNotes from sendbasket.pl (opac and staff).
    A closer look revealed that the data was not used; the notes in the
    mail of sendbasket are taken from GetBiblioData.

Test plan:
[1] Edit a record. Add one or two URLS in 555$u. Add something in 500$a too.
[2] Check if you can click the URLs in opac and staff detail tab Notes or
    Descriptions.
[3] Run the unit test t/db../Biblio.t
[4] Add something in the cart. Click More Details and send the cart.
    Verify that you have something in Notes (from 500$a).

Signed-off-by: Marc Veron <veron@veron.ch>
Followed test plan. Works as expected. QA tools OK.

Tested with all patches together, works as expected
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
2016-03-07 17:58:32 +00:00
0114465ced Bug 14330: Remove unused email_sender from sendbasket/sendshelf
The sendbasket/sendshelf scripts and templates do not use email_sender
as a cgi parameter or as a template var. Probably a leftover from previous
changes.
Let's make Koha cleaner :)

Test plan:
[1] Send your cart from opac or staff.
[2] Send a shelf from opac or staff.
[3] Git grep email_sender. No results.

Followed test plan. Works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-06-08 10:38:08 -03:00
Jonathan Druart
baea0a79d5 Bug 7976: Remove the borrow permission
The borrow permission was used but uselessly.
For instance, at the opac, the flagsrequired parameter was set to
'borrow' but the 'authnotrequired' was set also (which means no auth
required).
At the end, this permission was used at only 1 place: for the basket,
intranet side.
This can be replaced with the catalogue permission (which is used to
search).

Test plan:
1/ Confirm that you are able to show/download/sent the cart (intranet side)
with the catalogue permission.
2/ At the OPAC, you should be able to access the same pages as before
with any other permissions.

Concretely it is quite difficult to test this patch, you should have a
look at the code.

Signed-off-by: Nick Clemens <nick@quecheelibrary.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-06-05 13:43:34 -03:00
Jonathan Druart
a6c9bd0eb5 Bug 9978: Replace license header with the correct license (GPLv3+)
Signed-off-by: Chris Nighswonger <cnighswonger@foundations.edu>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>

http://bugs.koha-community.org/show_bug.cgi?id=9987

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-04-20 09:59:38 -03:00
Jonathan Druart
3adddd3410 Bug 3873: follow-up for all other pages
This should fix the issue on other pages.

Test plan:
Try to download and export the basket (intranet+opac sides).

Re-tested for errors in comment #5, they do not longer appear.
Signed-off-by: Marc Veron <veron@veron.ch>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-03-31 10:52:10 -03:00
Jonathan Druart
a0e5d77a71 Bug 13343: Embed items when send a basket/shelf
When a basket/shelf is downloaded, items are embedded, but not when
sending it by email.

We would expect to get the same file.

Test plan:
On Opac and intranet:
1/ Add records with items to your basket and send it by email.
Verify the file contains items.
2/ Add records with items to a list and send it by email.
Verify the file contains items.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-12 15:33:11 -03:00
Jonathan Druart
3291c8b130 Bug 11944: Fix encoding on sending emails
This patch fixes 2 places where mails were badly encoded:
1/ At the opac and the intranet, on sending baskets
2/ At the opac and the intranet, on sending shelf/list

Test plan:
Shelf/List:
- Create a list with non-latin characters in the name.
- Add some items containing non-latin characters in their content.
- Send the list by email

Basket/Cart:
- Add some items containing non-latin characters in their content to
  your cart..
- Send the cart by email

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Dobrica Pavlinusic <dpavlin@rot13.org>

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-01-13 13:07:24 -03:00
Jonathan Druart
e20270fec4 Bug 11944: use CGI( -utf8 ) everywhere
Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Dobrica Pavlinusic <dpavlin@rot13.org>

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-01-13 13:07:21 -03:00
Chris Cormack
0c161a9a66 Bug 9530 making changes to opac/opac-sendbasket.pl
To Test

1/ Edit the new systempreferences (ReplytoDefault and ReturnpathDefault)
2/ Optionally edit the branch the mail will be sent from, adding email addresses
3/ Send a cart from the public site (OPAC)
4/ Check that the mails have the correct From, Replyto and ReturnPath set
   The rules are
   If the values are set in the branch use that, else use the syspref

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-10-27 10:38:22 -03:00
afd2418d73 Bug 11349: Change .tmpl -> .tt in scripts using templates
Since we switched to Template Toolkit we don't need to stick with the
sufix we used for HTML::Template::Pro.

This patch changes the occurences of '.tmpl' in favour of '.tt'.

To test:
- Apply the patch
- Install koha, and verify that every page can be accesed

Regards
To+

P.S. a followup will remove the glue code.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-07-17 11:05:49 -03:00
76e8bb0fab Bug 12065: use encode_qp consistently when sending basket/shelf
QP-encode both mail header and mail body when sending baskets or
shelves.  There is no need to Encode qp-encoded strings.

Note that this does not solve all possible encoding problems in the mail
sent. This is related to decoding CGI parameters and use of TT. That
problem is addressed in bug 11944.

Test plan:
Verify if sending a basket from opac and staff still works.
Check if sending a shelf (list) from opac and staff still functions as
expected.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Cart/List sent form opac/staff works
No koha-qa errors

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-09 15:14:40 +00:00
Jonathan Druart
4290fa60ef Bug 10605: fix encoding issue in basket email (OPAC)
There is an encoding issue on the received mail.
Here, we have to keep the encode_qp in order not to break links (= is a
special char for email https://en.wikipedia.org/wiki/MIME#Encoded-Word).

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-12-10 04:36:37 +00:00
Katrin Fischer
9fe8b5c4cf Bug 8626: Fix encoding in cart emails for use of quoted-printable
When using quoted-printable data needs to be encoded accordingly.

Content-Transfer-Encoding: quoted-printable

Without the patch = in URLs or data will be interpreted as the beginning
of a special character resulting in broken URLs.

To test:
- Check diacritics in records display correctly
- Check various URLs with = to make sure they all work correctly

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
This is only a partial fix, as the subject line is not encoded,
but it is a huge improvement over what it was before.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-08-29 18:14:32 +02:00
Paul Poulain
226af0485d Merge remote-tracking branch 'origin/new/bug_8062' 2012-07-24 17:31:07 +02:00
bbee374075 8062 Followup for HTML::FormatText
The dependency is not used in opac-sendbasket. But there is a require of HTML::FormatText in the code of Template::Plugin::HTMLToText.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
2012-07-24 17:28:32 +02:00
da61657989 3280 Followup for privacy issue on X-Orig-IP in mail header
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-07-03 18:09:44 +02:00
Frère Sébastien Marie
a1cdb441cf Bug 3280 Restrict Send basket feature
In order to prevent spamming using sendbasket.pl, some counter-measure are done:
 - permit send basket only for authenticated user
 - permit send basket only if basket contains items
 - use username & email for 'Reply-To' field (with fallback to KohaAdminEmailAddress)
 - add field X-Orig-IP with IP of sender
 - add field X-Abuse-Report with KohaAdminEmailAddress

Note: we don't use forged 'To' address with patron email in order to
prevent be marked as spam (by SPF for example).

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-06-29 16:23:30 +02:00
2a58e1213f Bug 8062 [SIGNED-OFF] Cart email broken for non english templates
Fix basket email sent from OPAC. The email body is now generated HTML
(to be translatable), and converted into TEXT before beeing sent by
email.

To test that it works in other language than English, you have to update
your language .po file:

  perl translate update de-DE

Then, translated strings coming from opac-sendbasket.tt, and install the
translation:

  perl translate install de-DE

New dependency: Template::Plugin::HtmlToText

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
2012-06-09 19:33:28 +02:00
fffe2ccbf5 Bug 4330 : Fixing FSF address and copyright statements
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-05-28 17:53:46 +02:00
9e70695907 Bug 3651 Follow-up, Require patron login to send shelves and baskets
The fix for Bug 4289, "Add a syspref 'OpacPublic', to hide OPAC
search-bar and force authentication on all OPAC pages" incorrectly
made some page permissions dependent on the value of the OpacPublic
setting. Some pages should require authentication no matter what.

This patch returns opac-sendbasket.pl to the state it was in before
Bug 4289, Bug 4274 notwithstanding. I have added the authentication
requirement to opac-sendshelf.pl to match.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
1) sending cart requires login
2) sending shelf requires login
3) updating personal details requires login

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-01-06 15:57:57 +01:00
Colin Campbell
2ab00242d0 Bug 6050 Make calls to GetItemsInfo consistent
Do not misleadingly document or pass an unused second parameter
makes all calls use the single parameter call as the C4
routines already did

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-06-14 14:12:02 +12:00
Colin Campbell
cf28bf4785 Bug 3810: Ensure all calls to Mail::Sendmail handled consistently
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-03-16 20:57:12 +13:00
Mason James
f46b03cf2d Bug 4289: 'OpacPublic' feature
applied to git tag 'v3.02.00-rc'

Frédéric Demians:

  - Rebased this patch to HEAD
  - Solved a merge conflict
  - The patch works as described here:
    http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=4289

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Jared Camins-Esakov <jcamins@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-01-19 14:30:34 +13:00
a066cae6c5 bug 3651 followup: updated for new GetMember() parameter style
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-02-18 12:59:46 -05:00
Nahuel ANGELINETTI
96e7c92583 (bug #3651) sending baskets and shelves
this patch restrict the send of baskets and shelves to authenticated users only, and show their surname/firstname in the e-mail, so the receiver will know who sent the list.
(cherry picked from commit f87b755228)

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-02-18 12:58:08 -05:00
Garry Collum
11a1c687fd Bug 2505: Enabled warnings in opac-export.pl and opac-sendbasket.pl
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-08-12 21:28:27 -04:00
Garry Collum
a1f827a611 Bug 3317: Adds author and added-author to email sent from basket (Cart).
Adds the author and added author fields to the email that is sent from the shopping cart.  This makes the data sent via email consistent with the data that is viewed in the basket.

There is still a problem with author authority records other than 100 tags appearing correctly in the shopping cart.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-07-14 22:54:04 -04:00
Galen Charlton
696fc0ff22 bug 3141: use quoted printable encoding in cart/list emails
Ensure that emails sent from lists and the cart in the
OPAC have the correct quoted-printable encoding.  Otherwise,
if there is an equals sign followed by one or two characters
that look like hexadecimal digits in body of the email, the
results can look mangled in some email clients.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-18 18:36:14 -05:00
Nahuel ANGELINETTI
c49b3eb464 (bug #2909) fix the attachment base64 encoding
this patch change the attachment encoding, else if the file is too large, koha throws an error.
This solution was found on koha list in a Joshua's e-mail

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-01-12 15:52:08 -06:00
Galen Charlton
4bf76c2d77 bug 2615: remove unneeded 'require Exporter'
Most Perl scripts (as opposed to modules) do
not need to require Exporter.

No user-visible or documentation changes.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-09-26 09:05:08 -05:00
51fbaf8f5b Fixes bug #2231
In OPAC, when cart is sent by email, the email contains an attachement:
an ISO2709 file with cart biblio records. Most users don't have a clue
what to do with this file.

This patch modifies opac-sendbasket.tmpl to clarify what the attachment is.
It also fix a bug in opac-sendbasket.pl which wasn't reading the template
section containing information about the basket:

  Here is your cart, sent from the Koha Online Catalog... foo

It may be necessary to verify that template text is in 'valid' English...

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-10 08:22:22 -05:00
Henri-Damien LAURENT
3ee97ddacc bug fixing : encoding with texts in opac-sendbasket.pl
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-29 07:58:22 -06:00
Galen Charlton
8e41022b0d item rework: moved various accessor functions
Moved following functions from C4::Biblio to
C4::Items:

    GetItemStatus
    GetItemLocation
    GetLostItems
    GetItemsForInventory
    GetItemsCount
    GetItemInfosOf
    GetItemsByBiblioitemnumber
    GetItemsInfo
    get_itemnumbers_of

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-03 16:25:05 -06:00
hdl
100e6a9808 functions that were in C4::Interface::CGI::Output are now in C4::Output.
So this implies quite a change for files.
Sorry about conflicts which will be caused.
directory Interface::CGI should now be dropped.
I noticed that many scripts (reports ones, but also some circ/stats.pl or opac-topissues) still use Date::Manip.
2007-04-24 13:54:28 +00:00
tipaul
fc1342f73d rel_3_0 moved to HEAD 2007-03-09 15:12:54 +00:00
tipaul
b38997925f big commit, still breaking things...
* synch with rel_2_2. Probably the last non manual synch, as rel_2_2 should not be modified deeply.
* code cleaning (cleaning warnings from perl -w) continued
2005-10-26 09:11:02 +00:00
tipaul
e82eca42c9 see mail on koha-devel : code cleaning on Search.pm + normalizing API + use of biblionumber everywhere (instead of bn, biblio, ...) 2005-09-22 10:01:45 +00:00
rangi
0c68d59940 Fixing a bug caused by the syncing with the 2.2 branch 2005-06-29 02:01:03 +00:00
tipaul
f55e808ec0 synch'ing 2.2 and head 2005-06-20 14:33:32 +00:00
rangi
eadd0dba6c This simply wasnt working before.
It is now not erroring, not sure if its actually sending mail, working on
that now
2005-06-20 01:01:06 +00:00
tipaul
64cd740d2b synch'ing 2.2 and head 2005-05-04 08:58:30 +00:00
tipaul
a3bc9cdf82 email sent basket : the sender can give it's name, in case the basket is sent to a friend, not to itself 2004-12-07 10:10:40 +00:00
tipaul
ba610a9a4a fixing a problem in char encoding : translation of the send basket was erroneous 2004-11-22 16:41:03 +00:00
doxulting
d16e8d2330 records appear in message body instead of in attached file 2004-07-23 16:06:00 +00:00
doxulting
9c98f03072 Functions for Basket sending 2004-07-12 08:10:40 +00:00