With the inclusion of this patch, all searches will (try) to use
QueryParser for handling queries for both the bibliographic and authority
databases if UseQueryParser is enabled. If QueryParser is unavailable,
UseQueryParser is disabled, or the search uses CCL indexes, the old
search code will be used.
To test:
1) Apply patch.
2) Run the unit test with `prove t/QueryParser.t`
3) Enable the UseQueryParser syspref.
4) Try searches that should return results in the following places:
* OPAC (simple search)
* OPAC (advanced search)
* OPAC (authorities)
* Staff client (header search)
* Staff client (advanced search)
* Staff client (cataloging search)
* Staff client (authorities)
* Staff client (importing a batch using a match point)
* Staff client (searching for an item for adding to a label)
* Staff client (acquisitions)
* Staff client (searching for a record to create a serial)
* ANYWHERE ELSE I HAVE FORGOTTEN
5) Disable the UseQueryParser syspref. Repeat at least some of the
searches you did above.
6) If all searches worked, sign off.
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Elliott Davis <elliott@bywatersolions.com>
Searching still works as expected for variuos places.
QueryParser syspref seemed to be enabled by default
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
- the dateformat value is send to all templates (from
C4::Auth::get_template_and_user)
- remove all assignment of dateformat in all .pl files
- the DHTMLcalendar_dateformat variable is unused
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Fixed conflicts:
- opac/sco/sco-main.pl
- reports/acquisitions_stats.pl
- tools/cleanborrowers.pl
All tests pass, perlcritic problems appeared in some files
before and after these patches were applied.
Checked sorting in following pages:
- acqui/addorderiso2709.tt - list of staged imports in acq
- acqui/histsearch.tt - sorting of dates in acq search result list
- acqui/invoices.tt - billing date in list of invoices in acq
- acqui/lateorders.tt - list of late orders in acq
- acqui/ordered.tt - ordered titles and estimated costs for a fund
- acqui/parcels.tt - receive shipment page
- acqui/spent.tt - received titles and actual costs for a fund
...
- serials-search.tt - subscription search result list
...
- opac/sco/sco-main.tt - due dates in list of checked out items
- reports/acquisitions-stats.tt - date searches, display of dates
- tools/cleanborrowers.tt
- tools.holidays.tt - different views of dates library is closed,
adding dates
Checked dates display according to system preference everywhere and
searching, entering dates etc. still worked as expected.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
This patch fixes "Error message "Can't bless non-reference value at
/home/pi/koha/C4/Creators/Layout.pm line 111." when trying to add a
label layout while using plack."
The $layout_id variable is set to 5001 on my setup. And 5001 is the Unix
port where I run Plack. WTH is this value stored in this variable ?
Because of
> my $layout_id = $cgi->param('layout_id') || $cgi->param('element_id') || $ARGV[1] || '';
in label-edit-layout.pl
Removing $ARGV[1] solves the problem
Also removing $ARG[0] because I also don't think it's useful
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed off after confirming with Chris Nighswonger that these scripts
were not intended to be run from the command line. Works as promised.
Passed-QA-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
- remove all exit(1) and replace them with __END__ which benefits CGI
- insert correct =cut markers at end of POD (required for CGI::Compile
under plack to correctly parse source code and exeute it)
- scope variables with our which are used inside sub for plack
Signed-off-by: Mirko Tietgen <5p4m@gmx.de>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
This patch touches a lot of code, but basically it removes version
information from use C4::* in our code.
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
All script still compiles after the patch (confirmed by pre-applypatch hook)
It appears that the name of a variable was changed,
but the declaration of said variable was not.
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
This patch adds the ability to print the name of the item's homebranch on labels
Thanks to Shane Sammons <ssammons-at-npelem.com> for the modified SQL SELECT statement.
Document Manager: The documentation will need to be updated to reflect the added field 'branchname' to the list
of available fields for label printing.
To test:
1. Create a new label layout or modify an existing one to include 'branchname'
2. Create a new label batch or using an existing one, export the batch.
3. Verify that the resulting labels contain the home branch name for the respective items.
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Tested with the plan - works
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
squashed chris_n's two patches. Label export works again. Also changed the pattern for the item_number to the known working, critic friendly pattern.
Don't change $_ in a list context
Changed the 3rd bit to the critic friendly pattern chris_n suggests in the previous two lines.
Signed-off-by: Brendan <brendan@bywatersolutions.com>
In the 5 places in the label editor, the user's current branch is determined by taking
the LoginBranchname and doing a reverse look up for the branchcode. This is an unnecessary
query, since C4::Context->userenv has the immediate access to the branchcode; this is how
it's summoned in all other points in the Koha code.
This addresses bug 6673 because, since the move to T:T, the call in tools/manage-marc-import.pl
has used in correct syntax: $template->param('LoginBranchname') instead of $template->{VARS}->param('LoginBranchname')
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
This patch adds a 'No Profile/N/A' selection to the printer profile
drop-down menu along with code to handle the selection of it. This
selection is the default selection for new templates.
Documentation should be updated to reflect this change.
Signed-off-by: Liz Rea <lrea@nekls.org>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
The sample bib label layouts and the hard-coded default
format_string for new layouts used 'callnumber' when they
should have used 'itemcallnumber', preventing call numbers
from being printed on spine labels that use the system-supplied
layouts. Besides correcting the sample data, this patch
now also enshrines 'callnumber' as an alias for 'itemcallnumber'.
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
After applying patch it works for new and old layouts (itemcallnumber and callnumber).
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
- Manage Batch had no branch set
- New Batch had no branch set
- Add link on item result list was broken, missing the batchid
To test:
Create a new batch and add items one by one. Look at 'Manage batches'.
Check that the branch in the top right corner is always correctly shown and set.
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Remove some unnecessary checks when check of error is
sufficient. Make the order in some cases more logical
Should remove some possibilities of runtime warning noise.
Although some calls belong to the 'Nothing could
ever go wrong' school have added some warnings
Signed-off-by: Christophe Croullebois <christophe.croullebois@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
This is due to the incorrect use of string comparators to compare numeric values.
This patch corrects that.
Note: This should be backported to 3.2.x
Signed-off-by: Jared Camins-Esakov <jcamins@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
This was due to the use of an OR which seems to have caused the
param method to be called in a scalar context thus returning only
the first of multiple repeated cgi params.
This patch retains the intent of the OR by replacing it with a
conditional.
Signed-off-by: Koustubha Kale <kmkale@anantcorp.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
working through the master branch to eliminate all
podchecker warnings/errors
Actual improvement to the quality of the POD will
come later (hopefully with assistance of others)
Signed-off-by: Andrew Elwell <Andrew.Elwell@gmail.com>
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
This patch adds the ability to enter items into label batches via
barcode scanning
Work sponsored by Tamil - http://www.tamil.fr
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
This is due to the underlying script not having any defaults hard coded which results
in skewed hash elements when the parameter array is coerced into a hash at a later point.
This also occurs in layouts and profiles. This patch adds defaults to all three.
No documentation changes are necessary.
This fixes:
* A bug which caused the label template editor to throw
an error when saving when no previous profile was applied.
* A typo which caused a 'fetch without execute' error in Labels.pm
It also comments out several useless warns
Two issues here:
1. No radio box was selected by default in the format section of the layout editor. This actually needs some additional attention to allow the user
to establish a default method of entering the format string. As noted in comments in the code, this would probably be best implimented by adding yet
another syspref. However, I don't have time atm.
2. On saving a new template, if no profile was assigned to the new template, the script threw an error and died.
Both issues are addressed in this patch.
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
As discussed with Chris Nighswonger on #koha, this patch
removes the calls to syslog and replaces them with warns
so that error messages generated by the labels code
are sent to the Apache error log. This avoids splitting
this sort of logging across multiple files and is consistent
with current practice in most of the rest of Koha.
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
This patch also moves the Labels tests into their own sub directory.
Due to a squash mistake this patch also includes the following:
Fixing up POD for C4::Labels modules
Also a minor bugfix and code refactoring.
This new version of the patch does away with the need for 2 spinelabel css files.
This patch address two points brought up:
[1] (minor) if an item is not found, it should say so and return to
spinelabel-home.pl, not show an empty label
[2] (minor) can the print button be excluded from the printout?
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
This is a small tool for quickly printing spine labels using dedicated label printers.
It is located in the Tools page as Quick Spine Label Creator.
The system preference SpineLabelFormat defines which fields will be displayed.
The pref SpineLabelAutoPrint will make the print dialog pop up automatically.
The CSS file spinelabel.css controls all presentation for the labels.
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Enabling compression gives a ~26% *reduction* over non-compressed Type 3 font embedding.
ie. 4.5 K/pg (compressed graphic) vs. 17.5 K/pg (uncompressed Type 3 font) vs 111 K/pg
(uncompressed graphic).
It also appears that most other applications that export in pdf use compression by
default. (OO Writer, etc.) So this approach appears justified. One could always add code
to allow the user to select embedding mode and compression.
Also correcting mode parameter value.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Removed unused toggle variable form pcard-member-search.pl.
Added highlighting to pcard-members-search.tmpl and fixed some XHMTL errors.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Since I added more IndependantBranches code to my git repo I need
userenv loaded before SimpleSearch() is called. I think
get_template_and_user() should be called as soon as possible. In this
case it could mean two calls, but it has to be so.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
CalcNextLabelPos pulled out of each subblock.
Print of header and initial structure deferred until later to allow fatals_to_browser to
display any fatal errors encountered in data preparation. This does not fix Unicode "wide character" crashes.
Created subroutine for debug dump lines.
Comparisons corrected (numerical not string compare).
Note: this script is still insecure with NO AUTH CHECK.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
there is some old 2.2 code for more complete labels-searching, thats been commented out
ive logged a 'bug' for this - 2777
http://bugs.koha.org/cgi-bin/bugzilla/show_bug.cgi?id=2777
this fix...
- enables the index-searching functionality
- adds date-ranges
- uses the numSearchResults syspref, not a hardcoded '20'
- rewrote old 2.2 page-num code, (didnt work for 3.x)
- some indent and whitepages tidys.
- unused 2.2 search-code removed.
Mason
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
remove extra flagsrequired line.
move call in first branch to the top.
This will be important is IndepenantBranches code is later added to,
for example, C4::Items::get_itemnumbers_of()
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
This patch adds the callnum_split and text_justify options to the templates,
fixes bad javascript to switch between 'formatstring' and fixed-field means of specifying labels content,
fixes csv output when fixed-fields specifiers are used, and adds some help text for the formatstring case.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This patch ports LCCN splitting code from Koha 2.2.9 to Koha 3.0
This algorithm has been ported just as it appears on some production
systems. LCCNs that do not split correctly should have a bug opened
and include an exact example so that the regexp's can be adjusted.
This patch also adds code to split DDCNs using the *loosest* possible
interpretation of DDCN rules. On the simple end, the DDCN split
algorithm will handle being passed just a Dewey call number.
However, there may be some unusually complex DDCNs that will not
split properly. These will need to have a bug submitted for them
including a specific example so that the regexp's can be adjusted.
The correct choice of splitting alogrithm is determimed by the
item level classification source (items.cn_source).
Documentation should be updated to reflect these changes. Please include
the bit about complex call numbers and the need of a bug report.
[LL Bug 26]
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Pagination was working for searching, but the "type" and batch_id
were not making it onto subsequent pages (i.e., the 2nd page of "B"
names). This corrects the problem with the base URL passed to
pagination_bar.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Major FIXME's still remain, like the use of GET instead of POST.
The code is also a bit too INCLUDE-happy to net good performance.
The entire mechanism of adding to a batch should probably be proper
AJAX instead of the GET-centric opener.location approach.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
pagination bar was not in template, so only the first 20 hits were
visible. Probably it wasn't included because the script referenced a bogus base URL.
Also debugified warn statement in script. Note FIXME for bogus template reference.
We probably don't need that template or the related selector lines for it.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Make any MARC data available to labels module;
Also add a csv output option, allowing export of relevant
biblio data do a 3rd party label layout application.
Note: This patch REQUIRES a forthcoming updatedatabase patch !
Signed-off-by: Joshua Ferraro <jmf@liblime.com>