Third attempt to correct a bug affecting this page.
Combo lists wasn't reflecting DB content in modification.
To Joshua: You have to apply patch 2 first (patch 1 isn't required)
since I applied this quick fix without rolling back to original state!
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Improve previous patch which was badly coded as pointed out by
Henri-Damien. <TMPL_IF> clauses were included in HTML tags:
it fails translator tool.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
On /admin/z3950servers.pl page, modifying a z3950 host wasn't working
properly. Selected values in Syntax and Encoding combo boxes were hard
coded rather than selected based on record values.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Problem with ModMember : parameters were not passed safely
memberentrygen.tmpl deleted guarantorid for a children if step2 or step3 used fore edition.
Changeing TMPL_IF EXPR into TMPL_IF Name
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Corrected bug that prevented the 'not' operator
from working consistently - i.e., a search of
'mice not men' would not always work.
Also added test cases for NoZebra, so far focusing on
NZanalyse and adding and deleting bibs. A couple of
the test cases are currently known to fail and
therefore are marked TODO. The tests in question
are to verify that rows in nozebra are removed if
no bib is linked to the relevant word. However, it
looks like such rows are retained, just with
nozebra.biblionubmers set to ''. Is there any
reason to keep these rows?
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
When running Koha in NoZebra mode under Perl 5.10, a search
containing a operator (e.g., "mice and men") could cause
a bib search to enter into an infinite loop in NZanalyse.
This possibility arises from the fact that NZanalyse used
to use capture variables from regular expressions without
verifying whether the regular expressions actually matched.
It was compounded by the fact that NZanalyse is recursive;
however, because $1, $2, etc. are dynamically scoped,
*they are not automatically cleared when NZanalyse calls
itself*.
Consequently, if the search string contains a boolean
operator, it would be split into
left = mice
operator = and
right = men
Then NZanalyse would be called recursively on the search
string 'mice'. However, because $1, $2, and $3 are not
automatically cleared when the function is called again,
and because they are not cleared if a match fails, the code
would fail to recognize that 'mice' is leaf, and would
call NZanalyse('mice') repeatedly, to the promotion of
warm server rooms.
The wrinkle in this is that because of a bug in Perl 5.8, a
failing matches can sometimes alter the capture variables, thus
avoiding the infinite recursion. However, this bug was fixed in
Perl 5.10, leading to the NZanalyse bug becoming evident.
The Perl bug is described at http://rt.perl.org/rt3/Public/Bug/Display.html?id=19049
and the fix http://public.activestate.com/cgi-bin/perlbrowse/p/29279.
The fix to the Koha code is to check whether each regexp
that uses capture variables matches or fails, then act
accordingly.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
An earlier attempt to prevent deletion of default framework
by passing a suitably constructured URL actually had
the opposite effect - the default framework could be deleted,
but ia hon-default one could not.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Put the 801$a in tab 8, not 0, so that a valid 801
does not get split by the bib editor.
Signoff from Paul or Henri-Damien requested before
committing this patch.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This patch changes the 4 select statements in C4::Calendar::_init.
tests for this method were included in a previous patch.
There are more potential problems in C4::Calendar::delete_holiday, but that
method seems to have deeper bugs than just these. I'll open another bug for
them if I can figure out how it's supposed to work.
No documentation changes necessary.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
In the course of writing tests for C4::Calendar, I found two bugs and am fixing them here.
One is a documentation bug.
The other prevented C4::Calendar::insert_exception_holiday from working. I was unable
to find anywhere else in the code that depended on the broken behaviour.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Three scripts were incorrect setting the HTTP type
header to 'utf-8' instead of something appropriate
like 'text/html' - Firefox evidentally can ignore that
mistake, but IE7 does not.
Fixed by replacing an invalid print of the HTTP header
and template output with a call to
C4::Output::output_html_with_http_headers.
Also corrected POD in C4::Auth and InstallAuth to
reflect correct use of output_html_with_http_headers.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Including the subtitle in search results and OPAC and staff
details templates. The subtitle is expected to be in the
MARC subfield that is mapped to the (now nonexistant) column
bibliosubtitle.subtitle.
This is a fairly hackish patch that is meant to be minimally
disruptive while allowing subtitles to be displayed for those
not using the experimental XSLT bib display feature. It
does *not* cover all cases where you have a MARC
record and want to display its subtitle.
UNIMARC notes: at the moment, none of the fr-FR UNIMARC
frameworks appear to be map any subfields to bibliosubtitle.subtitle.
This could be changed, but caveat programmer: the UNIMARC 200$e
is repeatable (meaning that get_koha_field_from_marc will put in ' | '
between multiple subtitles) and one may want to also include the
200$d (parallel title). A GetMarcSubtitle routine may be in order
if absolutely necessary.
This points to a long-term need to make display of MARC (and later, hopefully,
non-MARC) bib records more flexible - the XSLT feature is one approach;
there may be others.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Adjusted C4::Members::GetBorrowersWhoHaveNotBorrowedSince so
that staff member records are not selected for deletion.
This functionality change is motivated by the consideration
that a staff member who is authorized to operate Koha is
not necessarily a prolific user of the library's services.
If a batch purge job for inactive staff records is really need,
it should be a separate tool.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
When both the patron delete and patron anonymize checkboxes
were selected, the patron cleaning tool would not
properly register the number of patrons to delete. Fixed
by correcting form input handling.
Also, count of patrons to delete or anonymous now correct
when running with IndependentBranches = ON.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
+ i've added 'intranet' to reach intranet error page, not OPAC one (which is the default when no type specified)
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Update MARC21 bib framework to ensure that subfield $9 in 110,
110, 111, 130, 240, 243, 440, 410, 411, and 440 remain
in same bib editing tab as rest of subfields in those fields.
This helps ensure that authority-controlled fields are not
mangled when editing a bib record.
Change also fixes editing tab for subfields in the 037, 584, and
760.
This is DB rev 085.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Changed default mandatory and optional MARC21 frameworks
to ensure that all the subfields of 037, 100, 110, 111, 130,
240, 243, 400, 410, 411, 440, 584, and 760 are all either
ignored (tab = -1) or assigned to the same editing tab.
Most of these changes involve the subfield $9 in authority-controlled
fields, which for the affected 1xx, 2xx, and 4xx fields was assigned
to tab 6, not 1, 2, or 4. Because of this, any such field with a
$9 was effectively split, leading to record corruption.
This is part of the fix for bug 2017.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Changed some of the tests so that all frameworks
are tested, not just the first row.
This patch has turned up a reported error in the
unimarc_lecture_pub - items.homebranch
and items.holdinbranch for the WEB framework are
in tab -1 (i.e., ignored), but the check is expecting
them in tab 10. Not sure if this is a real error or not:
perhaps no items should be created for bibs in that framework;
on the other hand, it is still possible to do so, in which
case the branches need to be set.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
now yuipath is added in C4::Output and uses themelang
In my opinion, all the general variables that are used in output should get in C4::Output (since there is theme lang computed.)
rather than in C4::Auth
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
I moved C4::Branch::GetBranches to use bind parameters and wrote some tests to demonstrate functionality.
No functional or documentation changes here.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
There is nothing to prevent a user from loading the
sample itemtypes from both 3-LecturePub and 4-Conservation.
To avoid an SQL error (and to let the installer tests
pass), made two of the SQL inserts "INSERT IGNORE" for
sample item types that have the same key.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Now handles cases where two SQL scripts in different
directories have the same name, e.g., fr-FR sample_itemtypes.sql.
Bug was masked by existing failure when attempting to load
both sample_itemtypes.sql.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Editing authorisedvalue now checks if OTHER value has the same authorised_value
before storing
id is now passed to the form so that it is used when editing authorised_value
when imageurl it is passed as '' not empty parameter
Signed-off-by: Joshua Ferraro <jmf@liblime.com>