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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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.
* 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