Robin Sheat [Wed, 30 Apr 2014 03:33:44 +0000 (15:33 +1200)]
Bug 9048 - fix quote editor under Plack
The ajax responder for the quote editor was using the wrong error codes.
These have been fixed. Also, a small fixup to get rid of some annoying
warnings.
To test:
* Under plack,
* Add/edit/delete a quote.
* Make sure that things don't crash.
Kyle M Hall [Wed, 7 May 2014 16:04:48 +0000 (12:04 -0400)]
Bug 12212: fix error that prevented sysprefs.sql from loading
The line for inserting AggressiveMatchOnISBN didn't have the right
number of columns.
Test Plan:
1) Attempt to run the web installer OR try to import the sysprefs.sql
into your db
2) Apply this patch
3) Try again, no errors should be reported this time
Mathieu Saby [Fri, 20 Dec 2013 22:21:32 +0000 (23:21 +0100)]
Bug 11433: (code cleanup) remove unused 'attachbasket' op value in basket.pl
This patch cleans code in basket.pl
In basket.pl, some code is supposed to be executed if
$op eq 'attachbasket'. But it is never the case
(grep attachbasket * -r), so this condition can be removed.
No functional change expected.
Regression test only :
* Make a complete acquisition process, from the creation of a basket
to the closure of a basketgroup, and check everything is OK
* On a basket page, try to change the basketgroup it belongs to, and
check everything is OK
* On a basketgroup page, try to edit the content of a basketgroup (put
a new basket in it, change the deliverybranch...), and check everything
is OK
* On a basketgroup page, try to reopen a closed basketgroup, and close an
open basketgroup, and check everything is OK
Galen Charlton [Wed, 7 May 2014 01:00:34 +0000 (01:00 +0000)]
Bug 8375: (follow-up) final adjustment to t/Creators.t
This patch adjusts the test so that it can pass successfully
without a valid context (in which case C4::Creators::PDF defaults
to the built-in fonts) or with one (in which case it uses the
TrueType fonts).
Galen Charlton [Tue, 6 May 2014 18:52:12 +0000 (18:52 +0000)]
Bug 8375: (follow-up) adjust StrWidth to account for TTF fonts
This patch fixes an issue caught by the test case where StrWidth()
based its calculations on the internal Adobe font rather than a
TrueType font in use.
Robin Sheat [Wed, 30 Apr 2014 04:28:21 +0000 (16:28 +1200)]
Bug 12163 - fix adding new quotes
Something changed somewhere (maybe a new jQuery or datatables version)
and the javascript that redrew the table row after a new quote was saved
stopped working. This fixes the call to the datatables function so that
it matches the API.
Note that although the new quote didn't appear to be added, reloading
the page shows that it had been.
To test:
* Go and add a quote.
* Note that when you press enter after finishing the quote, the line
stops being an editor, and becomes just a display, like it should.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Serial receiving was broken when "create an item record when receiving
this serial" is used for the subscription. This bug was introduced by
the patch for bug 12138.
Signed-off-by: Pasi Kallinen <pasi.kallinen@pttk.fi> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Kyle M Hall [Fri, 22 Nov 2013 14:15:31 +0000 (09:15 -0500)]
Bug 11287: make patron import tool take new restrictions system into account
The import patrons tool will add restrictions in the previous style (
directly to the borrowers table ). This will actually work, but
will result in the restriction being un-removable, and will be
overwritten by any new restrictions.
Test Plan:
1) Apply this patch
2) Import new patrons with debarrments, note the debarment is created
correctly
3) Import existing patrons with overwrite enabled, note that any new
debarrment is added, and any existing debarrment is ignored
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Martin Renvoize [Wed, 28 Aug 2013 15:00:37 +0000 (16:00 +0100)]
Bug 10798: make OPAC_SEARCH_LIMIT behaves better with search groups
Since the addition of search groups to Koha, the branch limiting
parameter in multiple PAC by URL support should also support
limiting by these search groups. This patch adds this ability.
This patch fixes two problems:
a) Bad PDF when using Helvetica font.
Current label code assigns 'italic' or 'oblique' variants
to title. Helvetica-Oblique was not defined, but is present
b) Bad alignment using center/right justification
Problem was bad font parameter passed to StrWidth
routine
To test:
1. Try making a batch using Helvetica, downloaded PDF do not open.
2. Try a batch of mixed scripts with layout alignment center or
right, only latin scripts align almost correctly.
3. Apply the patch and update your koha-conf.xml to add Oblique variant
4. Try again 1, now PDF opens
5. Try 2, now alignment is correct
New problem (for another bug): DejaVuSans has a good
support for arabic, but not Oblique variant. As selection
of italic/oblique is hardcoded, now Arabic titles are
not displayed. I'll try to add a checkbox to select
or not this feature.
Added a FIXME for the hardcoded forced oblique -chris_n
Signed-off-by: Chris Nighswonger <cnighswonger@foundations.edu> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Since built-in PDF fonts suport just Latin-1 encoding, we have
to switch to TrueType fonts to correctly encode all UTF-8 characters
(which we should be getting from database anyway).
This approach also nicely sidesteps our encoding cludges, but
requires paths to TrueType fonts which are included in koha-conf.xml
under new <ttf> section. Without this directive in kona-conf.xml
code will still use Latin-1 built-in pdf fonts.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Chris Nighswonger <cnighswonger@foundations.edu> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Marcel de Rooy [Wed, 26 Mar 2014 14:25:43 +0000 (15:25 +0100)]
Bug 9612: Zconn parameters and elementSetName in _new_Zconn
This patch makes a few adjustments in C4::Context::Zconn.
It does no longer pass the (ignored) auth, syntax parameters to _new_Zconn.
Note that auth was not completely ignored in theory, but we never pass
auth=1 [while not having user/password in koha-conf].
Furthermore, it removes the elementSetName for dom indexing. Using marcxml
here does not make a difference. It only adds a constraint on what is in
the dom-config files. (It could probably be removed there now..)
Two cosmetic code changes:
Removes unused label retry.
And moved 'servername' into the database name option.
Test plan:
When using Zebra with dom indexing, do a biblio and authority search.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Marcel de Rooy [Thu, 20 Mar 2014 12:24:11 +0000 (13:24 +0100)]
Bug 9612: fix SRU response for DOM indexing
This patch makes changes to koha-conf.xml by removing the fallback section
from biblioserver and authserver. The information is in a include file on
the same server (no need to fall back) and moreover, some information
is not up-to-date and should be moved elsewhere.
The patch also simplifies the DOM retrieval-info files for auth and bib.
And eliminates superfluous F and usmarc from the dom-config files. (I felt
the urge to remove marcxml too, but left it for now; see also the second
patch.) For reference, look at the marcxml example files of Zebra.
NOTE: This patch does not deal with the Debian package installs. In the
same way koha-conf-site.xml.in, and *-retrieval-info-* could be adjusted.
Test plan:
[1] Run at least a dev install in order to copy the new files to your
Zebra folders. Choose for DOM indexing.
Enable the SRU server on port 9998 (small edit in koha-conf.xml).
[2] Restart Zebra and reindex -a -b -x.
[3] Verify if a search from Koha still functions as expected.
Check the SRU output on port 9998. NOTE: If you do not pass recordSchema,
you should get back a marc response now (instead of index schema).
Bonus: Add your server as a Z3950 target to another Koha install. And
perform a Z3950 search from the other server to your new install.
Bonus: Check response from the auth and biblio socket via yaz-client.
[4] Reindex again with -a -b but without -x.
[5] Repeat Koha search, SRU response (Z3950, yaz-client).
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Galen Charlton [Mon, 5 May 2014 19:31:00 +0000 (19:31 +0000)]
Bug 10500: (follow-up) disable AggressiveMatchOnISBN if UseQueryParser is on
The original patch did not correctly construction ISBN phrase
searches when QP is on. Unfortunately, when attempting to fix that,
I discovered that there's a deep bug in QP that makes it generate
incorrect search queries when combining more than two atoms
in with the || operator. Consequently, until that can be fixed,
this patch ensures that if UseQueryParser is on, AggressiveMatchOnISBN
has no effect.
To state it anther way, AggressiveMatchOnISBN works only when QP
is not in use.
Kyle M Hall [Thu, 20 Jun 2013 14:45:44 +0000 (10:45 -0400)]
Bug 10500: Improve ISBN matching when importing records
Test Plan:
1) Catalog a record with the ISBN "0394502884 (Random House)"
2) Export the record, edit it so the ISBN is now
"0394502884 (UnRandomHouse)"
3) Using the record import tool, import this record with matching
on ISBN.
4) You should not find a match
5) Apply this patch
6) Run updatedatabase.pl
7) Enable the new system preference AggressiveMatchOnISBN
8) Repeat step 3
9) The tool should now find a match
Signed-off-by: Tom McMurdo <thomas.mcmurdo@state.vp.us> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Kyle M Hall [Wed, 19 Feb 2014 21:39:17 +0000 (16:39 -0500)]
Bug 5377: widen columns to better accommodate multiple ISBN and ISSN
Test Plan:
1) Apply this patch
2) Create a record with 5 ISBNs and 5 ISSNs
3) Create a new report from the following SQL, or execute it from the
mysql console:
SELECT isbn, issn FROM biblioitems ORDER BY biblionumber DESC LIMIT 1
4) Note that all your ISBNs and ISSNs are listed, separated by the pipe
character ( | )
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
This might be slow to run on big databases, because of the 2 index
rebuilds, however it changes no functionality just increases the field
size which is safe enough (we store multiple now already)
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Katrin Fischer [Tue, 11 Feb 2014 15:29:13 +0000 (16:29 +0100)]
Bug 11741: Correct display of < > in XSLT result lists
< and > are incorrectly transformed into HTML entities on the
XSLT result list when using the GRS-1 indexing mode.
Example:
Record: <TEST>
Result list: <TEST>
HTML source: &lt;TEST&gt
To test:
- catalog a record that contains > and <
- Reindex, without using the -x option
- Confirm the display is correct
- Reindex again, using the -x option
- Confirm the display is now broken
- Apply patch
- Reindex again with and without -x
- Verify that now the display is always correct
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Note: the problem is only visible in GRS-1 setup. It works as expected.
No behaviour change in DOM.
I believe we shouldn't be (de)escaping data ad-hoc, but it seems that GRS-1
needs it because it doesn't handle HTML entities properly. This fix is OK for
GRS-1, unneeded for DOM and probably any other modern search engine.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Fridolyn SOMERS [Fri, 1 Feb 2013 16:52:11 +0000 (17:52 +0100)]
Bug 9532: fix reservability check when bib-level item types are in use
When itemtype is defined on biblio (item-level_itypes syspref), the
method C4::Reserves::CanItemBeReserved uses item->{itemtype}. But
ithe item comes from C4::Items::GetItem and it does not have an
'itemtype' key; in this method the item type value is always in
'itype' key.
This patch corrects it.
Test plan:
You should have itemtype on biblio and 'item-level_itypes' syspref
set to biblio.
This test plan is with ReservesControlBranch on ItemHomeLibrary.
- Choose a branch, a borrower category and an item type, for example
'NYC', 'CHILD' and 'DVD'
- Set an issuing rule for 'NYC', CHILD' and 'DVD' with 'Holds allowed'
set to 10
- Set an issuing rule for 'NYC', CHILD' and all item types with
'Holds allowed' set to 0
- Choose an item of a biblio with itemtype 'DVD', that can be reserved,
with 'NYC' as homebranch
- Choose a borrower with category 'CHILD'
- Try to request the item for the borrower
=> without the patch, you can
=> with the patch, you can't
You may check reserve is allowed with 'Holds allowed' > 0 on issuing
rule for 'DVD'.
Signed-off-by: Liz Rea <liz@catalyst.net.nz>
Great test plan - thanks!
Confirmed the bug, and the fix. Looks good to me.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Galen Charlton [Mon, 5 May 2014 17:16:37 +0000 (17:16 +0000)]
Bug 9532: add regression test
To test:
[1] Run prove -v t/db_dependent/Holds.t. The last test
should fail.
[2] Apply the main patch.
[3] Run step 1 again. This time the tests should all pass.
It is implemented in a way that it removes already used or mutually
exclusive parameters (instance names, option switches).
I already have written completion for other (more complex) commands,
but I belive a simpler patch is better to start with.
IMPORTANT: this patch relies on having the koha-list command available
in the path.
To test:
- Make sure you have bash-completion installed and enabled (IRC might
help us if you encounter problems).
- Apply the patch.
Option 1:
- Pick the debian/koha-common.bash-completion file and do
$ cp debian/koha-common.bash-completion /etc/bash_completion.d/koha-common
- Open a new bash shell (I do it opening a new terminal on my Ubuntu box).
- Type one of the listed commands...
And repeatedly press <TAB>.
- Enjoy, and signoff if you belive it is usable. Otherwise report back.
Option 2:
- run:
$ . debian/koha-common.bash-completion
- Type one of the listed commands...
And repeatedly press <TAB>.
- Enjoy, and signoff if you belive it is usable. Otherwise report back.
Tests:
- Some koha-list option switches are mutually exclusive, -h should be
available in any context
- koha-enable should only autocomplete disabled instances
- koha-disable should only autocomplete enabled instances
- koha-email-enable should only autocomplete email-disabled instances
- koha-email-disable should only autocomplete email-enabled instances
- koha-*-zebra scripts should only autocomplete enabled instances.
- koha-*-sip scripts should only autocomplete sip-enabled instances.
Regards
To+
Note: writing bash-completion routines is a bit hacky, I tried to make
it the simplest way I could. Your comments are welcome.
Sponsored-by: Universidad Nacional de Cordoba Signed-off-by: Dobrica Pavlinusic <dpavlin@rot13.org> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10195: hide bib details page for OPAC-suppressed bibs
Records hidden with OpacSuppression are filtered from the search
results, but the opac-detail page is still visible if you know the
biblio number. This patch hides the detail page for suppressed biblios
by redirecting (controlled by the syspref OpacSuppressionRedirect)
either to opac-blocked (default), explaining that the record is blocked
(including optional explanatory text from the syspref
OpacSuppressionMessage) or to Koha's 404 page, giving no hint that a
biblio with that number exists in the system.
Test plan:
Make sure you have at least one record with 942$n == 1.
Set OpacSuppression to "Don't hide".
Do an OPAC search that should bring up your hidden record and other
records.
Observe that your record is found.
Open the detail page for the record.
Observe that it is accessible. Copy the URL for later(!).
Set OpacSuppression to "Hide".
Leave OpacSuppressionByIPRange blank.
Set OpacSuppressionRedirect to "an explanatory page ('This record is
blocked')."
Leave OpacSuppressionMessage blank for now.
Disable queryparser(!) (because of bug 10542).
Do a full zebra reindex.
Do an OPAC search that should bring up your hidden record and other
records.
Observe that your record is not found.
Open the opac-detail URL of the record (the one you copied before).
Observe that you are redirected to opac-blocked and it displays a
short standard message.
Edit OpacSuppressionMessage and input some text.
Open the opac-detail URL of the record again (the one you copied
before).
Observe that the text you entered in OpacSuppressionMessage is
displayed under the standard text you have seen before.
Set OpacSuppressionRedirect to "the 404 error page ('Not found')."
Open the opac-detail URL of the record again (the one you copied before).
Observe that you are redirected to Koha's 404 error page.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Jonathan Druart [Fri, 2 May 2014 14:54:51 +0000 (16:54 +0200)]
Bug 11209: (follow-up) message content must also match for new message to be considered a duplicate
If the template contains dynamic parts, the message won't be
considerated as duplicated.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Duplicate messages will be queued, but when sending the queued messages
duplicates are found and are marked as failed.
Jonathan Druart [Tue, 3 Dec 2013 11:17:50 +0000 (12:17 +0100)]
Bug 11209: (follow-up) check if a notice has been already sent today
The previous patch checks if a notice has already been sent when the
current notices has been sent in queue. Which is wrong!
We have to check if a similar notice has been sent today.
This patch has been created after an observation on a production server:
If a user place on holds several items, he will receive 1 SMS per hold.
Here we only want 1 SMS for all holds.
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Jonathan Druart [Wed, 6 Nov 2013 13:56:35 +0000 (14:56 +0100)]
Bug 11209: Don't sent the same SMS message for the same user the same day
For PREDUE messages, one message is sent to the message_queue table for
each items in advance, meaning that the patron could receive duplicate
notices.
The SMS part for DUE and PREDUE often do not contain dynamic parts, only
a standard message.
Note that this patch *only* affects the SMS transport.
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Kyle M Hall [Fri, 4 Oct 2013 13:53:11 +0000 (09:53 -0400)]
Bug 8769: Allow SIP2 return backdating
Currently Koha's SIP server ignores the return date part of an 09 ( aka
CHECKIN ) message. Koha should backdate a return, and remove
fines accordingly.
Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no>
Works as notified, second date field in SIP checkin (return date) is
used as return date. Return shows up in history with correct date.
Comments:
- patron is fined if return date is before issue date, but that
is largely irrelevant anyway.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 4397: fix scan index search results for non-latin characters
The Zoom specification defines that a ScanSet should provide a way
to retrieve terms suitable for displaying and another one for using
on further searches [1].
The Net::Z3950::ZOOM implementation actually provides both [2] but we
were using the wrong one.
Using $scanset->display_term(...) instead of $scanset->term(...) fixes
the problem.
To test:
- Do a index scan search (advanced search > more options > check
'index scan')
- Notice non-latin characters are replaced by one or more '@' symbols.
- Apply the patch
- Re-do the search, everything shows as it should.
- Try to follow any of the terms (clicking on them) and notice that
it actually gives you relevant results (i.e. is not searching for
@!!!!).
Sponsored-by: Universidad Nacional de Cordoba
Followed test plan. Patch behaves as expected. Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
I reproduced the issue and I confirm this patch fixes it.
I put "Fuß" in a title, reindex the record. Launch a search on Title
checking the "scan index" checkbox. And the non-latin characters are
well displayed.
Bug 11048: Fix logout redirection for CAS authentication
The logout redirection function after a CAS authentication was misused.
This patch fixes it, and allows the CAS server to redirect the user back
to the opac after logout.
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
From the Authen::Cas::Client documentation
logout_url [%args]
"logout_url()" returns the CAS server's logout URL which can
be used to redirect users to end
authenticated sessions. %args may contain the following
optional parameter:
* url => $url
If present, the CAS server will present the user
with a link to the given URL once the user has logged out.
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Change only affects CAS authentication and is correct
according to the module documentation.
This followup corrects the fact that when using $query->url(), both
GET and POST params are get.
Using $query->url_param() will only get params directly in URL.
Test plan :
- Enable CAS
- Go to login page : cgi-bin/koha/opac-user.pl
- Try to connect with local login using random login and password
(they will be transmitted by POST)
- You stay to login page
- Look at CAS login URL
=> Without this patch it will contain the random login and password
as parameters of opac-user.pl
=> With this patch it does not contain any parameter
Signed-off-by: Matthias Meusburger <matthias.meusburger@biblibre.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Fridolyn SOMERS [Fri, 8 Nov 2013 10:12:57 +0000 (11:12 +0100)]
Bug 11219: make CAS authentication work with URL parameters
Bug 10029 tries to fix the use of URL parameters in CAS authentication.
But is does not work.
The full URL must be used in all methods of C4::Auth_with_cas.
Also, in checkpw_cas(), the 'ticket' parameter must be removed to find
the original URL.
This patch removes the 'ticket' parameter from query before calling
checkpw_cas() since the ticket is passed as method arguemnt.
In C4::Auth_with_cas, many methods use the same code to get the CAS
handler and the service URI. This patch adds a private method
_get_cas_and_service() to do the job.
Test plan:
- Enable CAS
- Go to opac without been logged-in
- Try to place hold on a record
=> You get to /cgi-bin/koha/opac-reserve.pl?biblionumber=XXX showing
authentication page
=> Check that CAS link contains query param "biblionumber"
- Click on CAS link and log in
=> Check you return well logged-in to reserve page with biblionumber
param
- Check CAS loggout
- Check Proxy CAS auth
Signed-off-by: Koha team AMU <koha.aixmarseille@gmail.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests in t, xt, and t/db_dependent/Auth.t.
Also passes QA script.
As I have no working CAS server, I focused on regression testing:
Activated Persona and casAuthentication.
- Verified normal login against database still works.
- Verified Persona login works.
Note: With Persona you are always forwarded to the patron
account - so you have to search for the record again before
you can place a hold.
- Verified that the CAS URL contains the biblionumber when
logging in while placing a hold.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Retested 2014-04-12
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
At the OPAC, if the bootstrap theme is used, the modal
dialog does not allow to use the CAS authentication.
This patch proposes, in case CAS is enabled, to
redirect to the opac-user.pl page (like prog theme).
This is because the popup content should stay small
(thinking about mobile surf), and that CAS url is
actually only computed in opac-user (see C4/Auth.pm)
and it would not be performant to compute it in all
pages.
Test plan:
- set syspref opacthemes to bootstrap
- enable the casAuthentication syspref
- fill the casServerUrl syspref with something like:
https://localhost:8443/cas
- go on the opac home page
- click on "Log in to your account" link (top right)
=> You go to cgi-bin/koha/opac-user.pl page where you
see the cas link
- disable the casAuthentication syspref
- go on the opac home page
- click on "Log in to your account" link (top right)
=> You see a popup for login and password
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Normal login still works with/without CAS.
Passes all tests and QA script.
Jonathan Druart [Tue, 19 Nov 2013 13:30:21 +0000 (14:30 +0100)]
Bug 11262: Don't require hardcoded translations for seasonal numbering pattern to work
This patch removes the use of POSIX::strftime which is based on the
locales of the system.
The DateTime module translates month and day name with success, without
any locale installed.
For the saesons, I use the way used in Koha: write the word in
templates. On this way the translate script will match them and allow
translators to translate them.
This patch adds a regression: the season names are not translated
following the locale selected.
This could be done when bug 8044 will be pushed.
Test plan:
0/ Update your po files and translate the season name.
1/ Create a numbering pattern using season.
example:
Name: Seasonal
Numbering formula: {X}
X: Season, Add=1, Every=1, Set back to 0 when more than 3, formatting
"name of season"
And test the prediction pattern with:
frequency: 1/3 month
First issue : 2013-09-21
length: 12 months
X begins with 2 (21th Septembre is Fall)
2/ Click on the test pattern button, you should get:
Fall 21/09/2013
Winter 21/12/2013
Spring 21/03/2014
Summer 21/06/2014
Change the locale and verify the season names are *not* translated.
Change the Koha language and verify the season names are translated.
3/ Create a numbering pattern using day or month name.
example:
Name: day
Numbering formula: {X}
X: day, Add=1, Every=1, Set back to 0 when more than 6, formatting "name
of day"
Frequency: 1/day
First issue: 2013-11-18
length: 1 month
X begins with 0
You should get:
Monday 18/11/2013
Tuesday 19/11/2013
Wednesday 20/11/2013
[...]
Sunday 15/12/2013
Monday 16/12/2013
Tuesday 17/12/2013
change the locale and verify the day names are translated.
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Work as described. No koha-qa errors
Tested on top of Bug 11265 and Bug 11263,
and solved merge conflict
Updating PO file gives seasons to translate.
Tested using seasons, day and month
Only note is different behavior
1) To use seasons you need to use staff in desired language
2) To use day and month only need to select locale
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
No regressions found. Passes koha-qa.pl, t and xt
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tested this again on top of 11263 and it works as described.
Jonathan Druart [Thu, 12 Dec 2013 10:27:26 +0000 (11:27 +0100)]
Bug 11263: Use all languages instead of just the translated ones
This patch produces the same dropdown list as the one in the adv search.
With this way, it won't be necessary to install additional templates to
fill the locale list.
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Jonathan Druart [Tue, 19 Nov 2013 13:21:38 +0000 (14:21 +0100)]
Bug 11263: do not use system locales settings for subscriptions
The locales list for subscriptions should not be retrieved from the
locales of the system.
This patch retrieves the locales list from the Koha DB (in the same way
as pref language and opaclanguages).
Test plan:
Edit a subscription (or a numbering pattern) and verify the list of
languages is the same as languages available in Koha.
Note: with this patch we loose the saeson translation, it is
normal. See report linked.
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Work as described. No koha-qa errors.
New locale is retrieved from installed languages.
I wonder if that list can be restricted to
'enabled' ones (parsing syspref language value).
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes QA script and all tests.
Works according to description.
Julian Maurice [Mon, 17 Mar 2014 22:25:37 +0000 (23:25 +0100)]
Bug 11848: Fix C4::Context::interface, add POD and UT
1/ Edit a Perl script, for example mainpage.pl
2/ add "use Koha::I18N;" to the top of file
3/ add a translatable message somewhere in the script (this have
to be after the call to get_template_and_user). For example:
warn gettext("This is a translated warning");
4/ Create or update the PO files with
misc/translator/translate create LANGCODE
or
misc/translator/translate update LANGCODE
(LANGCODE should be enable in syspref 'languages')
5/ In misc/translator/po/LANGCODE-messages.po you should have
your string, translate it (using a text editor or a PO file
editor, make sure you don't have the "fuzzy" flag for this
string).
6/ Go to mainpage.pl with active language being English with your
browser and check your logs. You should see your string "This
is a translated warning".
7/ Now change language to LANGCODE. Check your logs, you should
have the string translated.
Note: I chose to name the sub 'gettext' because it's the default
keyword for xgettext for Perl. We can change it to whatever we want.
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Follow test plan, work as described.
No koha-qa errors.
Tests pass
Fixed small merge conflict on t/Context.t
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Copied test plan from bug.
Julian Maurice [Wed, 26 Feb 2014 15:45:59 +0000 (16:45 +0100)]
Bug 11848: Make Koha::I18N easier to use
Instead of writing
use CGI;
use Koha::I18N;
my $cgi = new CGI;
my $lh = Koha::I18N->get_handle_from_context($cgi, 'intranet');
print $lh->maketext('my translatable text');
you can now write
use Koha::I18N;
print gettext('my translatable text');
Julian Maurice [Mon, 20 Aug 2012 11:51:27 +0000 (13:51 +0200)]
Bug 8044: (follow-up) add copyright block and use Modern::Perl
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Julian Maurice [Mon, 20 Aug 2012 08:55:50 +0000 (10:55 +0200)]
Bug 8044: (follow-up) fix warning and error messages in translate.pl
CHARSET is now automatically replaced by UTF-8, and 'update' creates the
PO file if it does not exist.
Also do not try to create PO files if POT file creation failed (when
there is no messages to translate for example).
+ add some verbosity
+ add Locale::Maketext and Locale::Maketext::Lexicon to Koha
dependencies
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Julian Maurice [Fri, 4 May 2012 12:33:10 +0000 (14:33 +0200)]
Bug 8044: new module for translating strings in Perl source files
You have to use the new module Koha::I18N
Code example:
use Koha::I18N;
use CGI;
my $input = new CGI;
my $lh = Koha::I18N->get_handle_from_context($input, 'intranet');
print $lh->maketext("Localized string!");
PO files are in misc/translator/po/LANG-messages.po.
Creation of PO files are integrated to existing workflow, so to create
PO file for a language, just run in misc/translator:
./translate create LANG
To update:
./translate update LANG
You can then translate the PO with your favorite editor. Strings will be
localized at runtime.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Works as advertised. Some details needing further attention noted on bug
report.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Colin Campbell [Wed, 14 Aug 2013 15:21:26 +0000 (16:21 +0100)]
Bug 10729: Add phrases configuration for ICU
Add a separate phrases-icu.xml for phrase indexes
The file is based on that distributed with zebra
with a couple of additions to reflect Koha usage
This patch adds a separate tokenizer variable
for phrase indexes so that default.idx is
correctly rewritten for sites using icu
indexing
Signed-off-by: Paola Rossi <paola.rossi@cineca.it> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
- Applied patch
- perl Makefile.PL --prev-install-log ../koha-dev/misc/koha-install-log
- make upgrade
- Restarted Zebra server
- Did a full reindex of bibliographic and authorities
- Checked various searches
- Links records to authorities
- Checked created links work correctly
I couldn't find a regression with this patch.
Passes all tests and QA script.
Jonathan Druart [Thu, 23 May 2013 15:28:25 +0000 (17:28 +0200)]
Bug 8952: (follow-up) using_https does not deal with Plack
When using Plack, the https method returns 'OFF'.
We have to test this value before sending the value to templates.
Test plan:
1/ Fill your OPACBaseUrl
2/ Configure apache for using http
3/ Check the social networks links (should be http://OPACBaseUrl)
4/ Launch Plack
5/ Check the social networks link (should be http://OPACBaseUrl)
6/ Stop Plack
7/ Configure apache for using https
sudo openssl req -x509 -nodes -days 365 -newkey rsa:1024 -out
/etc/apache2/server.crt -keyout /etc/apache2/server.key
and add in you virtualhost (with :443)
SSLEngine on
SSLCertificateFile /etc/apache2/server.crt
SSLCertificateKeyFile /etc/apache2/server.key
a2enmod ssl
service apache2 restart
8/ Check the social networks links (should be https://OPACBaseUrl)
FIXME: Under Plack, with ssl actived, the CGI->https() method always
returns 'OFF'.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Owen Leonard [Wed, 24 Oct 2012 16:30:33 +0000 (12:30 -0400)]
Bug 8952: Add http:// to url in social media links on opac-detail
This patch adds a variable to the template, "protocol" based on
whether "using_https" is set. The appropriate protocol is
inserted before social media links.
To test, confirm that OPACBaseURL is set and lacks "http(s)://"
Social media links should include correct URLs.
A follow-up patch could copy use of this [% protocol %] variable
in other parts of this template which duplicate large chunks of
HTML based on [% using_https %].
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 11309: avoid creating duplicate numbering patterns during upgrade to 3.14.x
To test:
1/ Install Koha 3.12
2/ Create some subscriptions. Ensure you have at least two
subscriptions with the same numbering pattern, with one of the
keys everyX/addX/whenmorethanX/settoX set to NULL
3/ Remember this numbering pattern.
4/ Upgrade to 3.14
5/ Run updatedatabase.pl
6/ The numbering pattern is duplicated
Now repeat steps 1 to 4, then apply the patch and run
updatedatabase.pl. Numbering pattern should not be duplicated.
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Robin Sheat [Fri, 4 Oct 2013 03:13:20 +0000 (16:13 +1300)]
Bug 10944: fix mixed content warnings for covers on staff client
This switches the URLs used to access Amazon's cover images to the
SSL image server, preventing warnings when using this on a secure
site.
To test:
* Enable Amazon images in the sysprefs, all other cover images off.
* Do a search in the staff client. Using firebug or similar, inspect the
images that indicate both "no image found" and the covers.
* Are they all https, and showing correctly?
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Liz Rea [Wed, 25 Sep 2013 02:50:24 +0000 (14:50 +1200)]
Bug 10944: fix mixed content warnings in opac results and detail with Amazon images on https
It's probably going to become more popular to run Koha in SSL
environments.
Currently on SSL, with Amazon images enabled, a SSL enabled site
will either not show Amazon images (IE, some versions of Firefox?),
or show a warning to users about mixed secure and insecure content
(Firefox, Chrome).
Since we now have the using_https template variable, it makes sense
to use it.
To test:
In each browser you have access to, and preferably with SSL set up
(you can set up a self signed cert for your dev install by following,
more or less, the instructions here:
https://wiki.debian.org/Self-Signed_Certificate)
For the apache config, just copy the one for the OPAC, but set it to
use 443 instead of 80 for the port, and point it to your keys per the
instructions above.
** note that using a self signed cert on your dev install will prompt
you when you connect the first time that OMG I CAN'T VERIFY THIS IS
COOL. You did it yourself, if you can't trust yourself... then who can
you trust?
* Enable Amazon images in the system preferences
* Do a search that you know will have images for, verify that without
SSL
1. the images show
2. the image source is from an Amazon url that uses http://
3. the images are the right size, and look ok
* Do the same using https, verify that with SSL
1. the images show
2. the image source is from an Amazon url that uses https://
3. the images are the right size, and look ok
Clicking on the image should link to the item on Amazon. This patch
also corrects a problem with the Amazon URL used on the images -
it was pointing to a feature that is currently unavailable. That's
fixed here. All you need to check is that it goes to a valid Amazon
endpoint that doesn't show an error.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Liz Rea [Sun, 6 Apr 2014 22:23:05 +0000 (10:23 +1200)]
Bug 11684: avoid mixed content warnings using SSL with Amazon - opac-readingrecord and opac-user
To test:
0) It goes without saying that images being looked at should
continue to be the proper size and look ok.
1) In the staff client, change the OPAC system preference
opacthemes to 'bootstrap'.
2) Enable Amazon images in the system preferences
3) Issue a book you know will have images for a known user
4) Issue a book you know will have images for intentionally
overdue for the same user
5) git reset --hard origin/master
6) In OPAC, log in as the user.
-- On the 'your summary' tab on the left (which is default),
a) In the 'Checked out' tab, there should be at least two
books. The two books issued should have http images.
b) In the 'Overdue' tag, there should be at least one
book. The image for the overdue book issued should
have http images.
7) Click the 'your reading history' tab on the left.
-- The images for the two books issued should have
http images.
8) Apply the patch
9) Repeat steps 6-7, but all the images in question should
have https images now.
10) In the staff client, change the OPAC system preference
opacthemes to 'prog'.
11) Repeat steps 5-9
12) Run the koha QA test tool
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Checked reading history, overdoes, and checkouts in
bootstrap and prog OPAC. Amazon image URL is now https://.
Jonathan Druart [Wed, 11 Sep 2013 08:36:19 +0000 (10:36 +0200)]
Bug 10862: (follow-up) fix a couple of issues
This followup fixes a couple of issues:
- disable the feature by default.
- use the datatables include file.
- fix the syspref description.
- replace "History search" with "Search history".
- replace biblio with catalog
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Jonathan Druart [Mon, 2 Sep 2013 15:02:02 +0000 (17:02 +0200)]
Bug 10862: Add search history to the intranet interface
Like OPAC, the search history is now available for intranet. This
is controlled by the EnableSearchHistory system preference.
Test plan:
1/ Switch on the 'EnableSearchHistory' syspref.
3/ Launch some biblio and authority searches.
4/ Go on your search history page (top right, under "Set library").
5/ Check that all yours searches are displayed.
6/ Click on some links and check that results are consistent.
7/ Delete your biblio history searches.
8/ Delete your authority searches history searches.
9/ Launch some biblio and authority searches
10/ Play with the 4 delete links (current / previous and biblio /
authority).
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Galen Charlton [Mon, 5 May 2014 02:55:41 +0000 (02:55 +0000)]
Bug 10807: (follow-up) use 24-hour time when storing search times to session
This ensures that if an anonymous session is converted to a logged-in
session, that search history times from the anonymous session get
stored corectly.
Owen Leonard [Wed, 11 Sep 2013 13:55:14 +0000 (09:55 -0400)]
Bug 10807: (follow-up) wording tweak; take OpacAuthorities into account
This follow-up makes two changes:
1) Change "biblio" to "catalog" when referring to non-authority
searches.
2) Make display of the authority search tab dependent on the
OpacAuthorities system preference. If OPAC authority searches are
disabled we shouldn't show a tab which will always be empty.
To test, view the OPAC search history page with the OpacAuthorities
preference both on and off.
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Jonathan Druart [Fri, 30 Aug 2013 12:01:15 +0000 (14:01 +0200)]
Bug 10807: Add an authority search history for the OPAC
Like biblio, this feature provides an authority search history.
This history is available for connected and disconnected user.
If the user is not logged in Koha, the history is stored in an
anonymous user sessin.
The search history feature is now factorized in a new module.
This patch adds:
- 1 new db field search_history.type. It permits to distinguish the
search type (biblio or authority).
- 1 new module C4::Search::History. It deals with 2 different storages:
DB or cookie
- 2 new UT files: t/Search/History.t and t/db_dependent/Search/History.t
- 1 new behavior: the 'Search history' link (on the top-right corner of
the screen) is always displayed.
Test plan:
1/ Switch on the 'EnableOpacSearchHistory' syspref.
2/ Go on the opac and log out.
3/ Launch some biblio and authority searches.
4/ Go on your search history page.
5/ Check that all yours searches are displayed.
6/ Click on some links and check that results are consistent.
7/ Delete your biblio history searches.
8/ Delete your authority searches history searches.
9/ Launch some biblio and authority searches
10/ Delete all your history (cross on the top-right corner)
11/ Check that all your history search is empty.
12/ Launch some biblio and authority searches.
13/ Login to your account.
14/ Check that all previous searches are displayed.
15/ Launch some biblio and authority searches.
16/ Check that these previous searches are displayed under "Current
session".
17/ Play with the 4 delete links (current / previous and biblio /
authority).
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
All patches together pass QA script and tests.
Also, new tests in t/db_dependent/ pass.
Tested in all 4 OPAC themes, being logged in and anonymous.
Anonymous search history will be appended to personal search
history after logging in.
Also verified that cleanup_database still purges search history,
now also including the authority searchs.
Fridolin Somers [Wed, 29 Jan 2014 16:26:15 +0000 (17:26 +0100)]
Bug 11635: remove duplicate definition of 995$r in UNIMARC record.abs
Test plan :
- Create a fresh install UNIMARC flavor and GRS1 indexing for biblios
- Re-indexe database
- Perform a search with index "itemtype" (and then "itype") on an
existing value of 995$r. For example : itemtype:BOOK
=> Check you get results
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Signed-off-by: Galen Charlton <gmc@esilibrary.com>