working/Evergreen.git
12 years agoMerge branch 'master' of git.evergreen-ils.org:Evergreen into z39-batch-fetch-overlay collab/berick/z39-batch-fetch-overlay
Bill Erickson [Mon, 25 Feb 2013 21:33:45 +0000 (16:33 -0500)]
Merge branch 'master' of git.evergreen-ils.org:Evergreen into z39-batch-fetch-overlay

12 years agoZ39 Batch : XUL (i18n/css)
Bill Erickson [Mon, 25 Feb 2013 19:04:22 +0000 (14:04 -0500)]
Z39 Batch : XUL (i18n/css)

Signed-off-by: Bill Erickson <berick@esilibrary.com>
12 years agoZ39 Batch : TPAC List Action
Bill Erickson [Mon, 25 Feb 2013 18:17:59 +0000 (13:17 -0500)]
Z39 Batch : TPAC List Action

Signed-off-by: Bill Erickson <berick@esilibrary.com>
12 years agoQueryParser: Improve container searches
Thomas Berezansky [Wed, 20 Feb 2013 17:26:01 +0000 (12:26 -0500)]
QueryParser: Improve container searches

Add a with/from set for containers for record limiting instead of using the
EXISTS methodology for better index usage.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Ben Shum <bshum@biblio.org>
12 years agoQueryParser: Check for URIs in staff visibility
Thomas Berezansky [Tue, 19 Feb 2013 16:42:08 +0000 (11:42 -0500)]
QueryParser: Check for URIs in staff visibility

Specifically, don't show staff records with no copies but with URIs unless the
URIs are "in scope".

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Ben Shum <bshum@biblio.org>
12 years agoQueryParser: Adjust visibility order
Thomas Berezansky [Tue, 19 Feb 2013 16:39:40 +0000 (11:39 -0500)]
QueryParser: Adjust visibility order

Checking call number URIs last gives us a faster return on average based on
finding copy information first.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Ben Shum <bshum@biblio.org>
12 years agoQueryParser: Provide null rank query as default
Thomas Berezansky [Sun, 17 Feb 2013 00:03:27 +0000 (19:03 -0500)]
QueryParser: Provide null rank query as default

If a given node contains only negative atoms the rank query was coming out as
an empty string, which was generating bad SQL. This causes the default to be a
null tsquery instead.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Ben Shum <bshum@biblio.org>
12 years agoZ39 Batch : Release Notes
Bill Erickson [Mon, 25 Feb 2013 16:37:28 +0000 (11:37 -0500)]
Z39 Batch : Release Notes

Signed-off-by: Bill Erickson <berick@esilibrary.com>
12 years agoZ39 Batch : Z Index Conify
Bill Erickson [Mon, 25 Feb 2013 16:01:17 +0000 (11:01 -0500)]
Z39 Batch : Z Index Conify

Signed-off-by: Bill Erickson <berick@esilibrary.com>
12 years agoZ39 Batch : Z Index Conify
Bill Erickson [Mon, 25 Feb 2013 15:43:33 +0000 (10:43 -0500)]
Z39 Batch : Z Index Conify

Signed-off-by: Bill Erickson <berick@esilibrary.com>
12 years agoZ39 Batch : Z Index Conify
Bill Erickson [Mon, 25 Feb 2013 15:40:11 +0000 (10:40 -0500)]
Z39 Batch : Z Index Conify

Signed-off-by: Bill Erickson <berick@esilibrary.com>
12 years agoZ39 Batch : Z Index Conify
Bill Erickson [Mon, 25 Feb 2013 15:37:11 +0000 (10:37 -0500)]
Z39 Batch : Z Index Conify

Signed-off-by: Bill Erickson <berick@esilibrary.com>
12 years agoZ39 Batch IDL
Bill Erickson [Mon, 25 Feb 2013 15:36:54 +0000 (10:36 -0500)]
Z39 Batch IDL

Signed-off-by: Bill Erickson <berick@esilibrary.com>
12 years agoTranslation newpot
Bill Erickson [Thu, 21 Feb 2013 16:26:14 +0000 (11:26 -0500)]
Translation newpot

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
12 years agoZ39 Batch : xul open queue
Bill Erickson [Fri, 22 Feb 2013 14:53:27 +0000 (09:53 -0500)]
Z39 Batch : xul open queue

Signed-off-by: Bill Erickson <berick@esilibrary.com>
12 years agoTPAC: Avoid leading / trailing space on pages
Dan Scott [Mon, 18 Feb 2013 22:48:44 +0000 (17:48 -0500)]
TPAC: Avoid leading / trailing space on pages

Use the [%- -%] whitespace-chomping directives to remove the leading
space on pages.

Signed-off-by: Dan Scott <dan@coffeecode.net>
Signed-off-by: Ben Shum <bshum@biblio.org>
12 years agoTPAC: Let there be HTML5
Dan Scott [Mon, 18 Feb 2013 22:44:28 +0000 (17:44 -0500)]
TPAC: Let there be HTML5

Stop living the lie that we're pretending to be XHTML Transitional and
embrace HTML5. And save a whole bunch of bytes right off the bat!

Also, use a valid language/locale identifier--we need hyphens instead of
underscores.

Signed-off-by: Dan Scott <dan@coffeecode.net>
Signed-off-by: Ben Shum <bshum@biblio.org>
12 years agoTPAC: Make Google Books Preview depend on Dojo
Dan Scott [Wed, 20 Feb 2013 16:37:08 +0000 (11:37 -0500)]
TPAC: Make Google Books Preview depend on Dojo

It would be possible, but painful, to do all of this in raw JavaScript,
so make the preview functionality depend on Dojo. Also, split out the
relevant JavaScript into its own file. Also, don't search for a preview
if no ISBNs have been gathered; I'm sure Google is never going to return
a result for ISBN:undefined.

You can test this functionality in the sample record set using ISBN
4431287752.

Thanks to Ben Shum for the review comments!

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Ben Shum <bshum@biblio.org>
12 years agoTPAC: Google Books preview loader
Dan Scott [Tue, 5 Feb 2013 17:25:24 +0000 (12:25 -0500)]
TPAC: Google Books preview loader

Refinements should include checking more than just the first ISBN for
embeddability and passing more identifiers to the preview loader.
Roughly equivalent to what JSPAC had though.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Ben Shum <bshum@biblio.org>
12 years agoMerge branch 'master' of git.evergreen-ils.org:Evergreen into collab/berick/z39-batch...
Bill Erickson [Thu, 21 Feb 2013 22:15:05 +0000 (17:15 -0500)]
Merge branch 'master' of git.evergreen-ils.org:Evergreen into collab/berick/z39-batch-fetch-overlay

12 years agoStop requiring unneeded/absent RPC::XML::Method
Jason Stephenson [Fri, 9 Nov 2012 20:06:04 +0000 (15:06 -0500)]
Stop requiring unneeded/absent RPC::XML::Method

It's not a thing in recent versions of RPC::XML

Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
12 years agoIn XML-RPC Gateway, substitute __ for - in method names
Lebbeous Fogle-Weekley [Mon, 22 Oct 2012 22:42:55 +0000 (18:42 -0400)]
In XML-RPC Gateway, substitute __ for - in method names

Dashes have never actually been valid in XML-RPC method names, and some
clients (like newer versions of Perl's RPC::XML) enforce this rule on
their clients.  This way we give XML-RPC clients a way they can still reach
our methods.

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
12 years agoStop requiring unneeded/absent RPC::XML::Function
Lebbeous Fogle-Weekley [Mon, 22 Oct 2012 22:19:03 +0000 (18:19 -0400)]
Stop requiring unneeded/absent RPC::XML::Function

It's not a thing in recent versions of RPC::XML

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Signed-off-by: Dan Scott <dan@coffeecode.net>
Conflicts:
Open-ILS/src/extras/Makefile.install

12 years agoInstall CPAN on Fedora
Chris Sharp [Thu, 21 Feb 2013 18:33:31 +0000 (13:33 -0500)]
Install CPAN on Fedora

Fedora 18 split CPAN out into its own separate package, rather
bizarrely, and as we sadly still need to install some unpackaged
dependencies from CPAN we had better try to install it.

Signed-off-by: Dan Scott <dan@coffeecode.net>
12 years agoSerials: change more carp() to croak() to avoid infinite loops
Lebbeous Fogle-Weekley [Wed, 13 Feb 2013 15:34:17 +0000 (10:34 -0500)]
Serials: change more carp() to croak() to avoid infinite loops

This addresses a problem very similar to that in LP #1075167, where
certain loops never end because problems with the data elicited calls to
carp(), which fills up log, but never gives our loops notice to end.

Visible symptoms include 1) a greate volume of log spew and 2) an
open-ils.serial drone that ties up a CPU.

The fault lies maybe in our loops rather than in the MFHD
package, but this fixes the problem fastest, and should not have
undesirable side-effects.

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Signed-off-by: Dan Wells <dbw2@calvin.edu>
12 years agoMerge branch 'master' of git.evergreen-ils.org:Evergreen into collab/berick/z39-batch...
Bill Erickson [Thu, 21 Feb 2013 15:33:22 +0000 (10:33 -0500)]
Merge branch 'master' of git.evergreen-ils.org:Evergreen into collab/berick/z39-batch-fetch-overlay

12 years agoZ39 Batch : xul open queue
Bill Erickson [Thu, 21 Feb 2013 15:30:46 +0000 (10:30 -0500)]
Z39 Batch : xul open queue

Signed-off-by: Bill Erickson <berick@esilibrary.com>
12 years agoLP1108867: i18n support for holds in record details
Dan Scott [Tue, 29 Jan 2013 10:55:10 +0000 (12:55 +0200)]
LP1108867: i18n support for holds in record details

Rather than constructing a string of "Place hold on " + "copy", etc,
just display more complete "Copy hold" / "Volume hold" / "Issue hold"
strings that have a chance of being translatable.

Signed-off-by: Dan Scott <dan@coffeecode.net>
Signed-off-by: Pasi Kallinen <pasi.kallinen@pttk.fi>
12 years agoStandardize on 'My' for user pronoun labels
Dan Wells [Fri, 1 Feb 2013 19:39:23 +0000 (14:39 -0500)]
Standardize on 'My' for user pronoun labels

The TPAC currently uses a mish-mash of 'My' and 'Your' when
labeling user elements (e.g. 'my list', 'your account', etc.).
This commit settles on the use of 'My', but only for labels, not
for "dialog" (e.g. 'Your payment has been approved') or for
imperative statements (e.g. 'Please change your password'). One
text which is borderline is 'Log in to Your Account', but I
decided to treat it as imperative and leave it alone for now.

This commit also changes a heading on the list page which was
lacking title case, as the rest of the interface uses title
case for all headings.

Signed-off-by: Dan Wells <dbw2@calvin.edu>
Signed-off-by: Dan Scott <dan@coffeecode.net>
Conflicts:
Open-ILS/src/templates/opac/myopac/lists.tt2

12 years agoZ39 Batch : ML
Bill Erickson [Wed, 20 Feb 2013 18:48:30 +0000 (13:48 -0500)]
Z39 Batch : ML

Signed-off-by: Bill Erickson <berick@esilibrary.com>
12 years agoTPAC: Allow multiline buttons and other minor button work.
Pasi Kallinen [Tue, 22 Jan 2013 10:53:46 +0000 (12:53 +0200)]
TPAC: Allow multiline buttons and other minor button work.

Allows using multiline buttons; instead of using opac-button
-class in the a-tag, wrap the a-tag in a div with
opac-multiline-button -class.

Changes the login help button so a longer button text
behaves properly and looks good.

Unifies the green OPAC button behaviour when hovering
a mouse over them; the input and button -tag buttons
did not change their color.

Signed-off-by: Pasi Kallinen <pasi.kallinen@pttk.fi>
Signed-off-by: Dan Scott <dan@coffeecode.net>
Conflicts:
Open-ILS/src/templates/opac/css/style.css.tt2

12 years agoAdd Finnish to the enabled languages list
Pasi Kallinen [Tue, 8 Jan 2013 07:49:39 +0000 (09:49 +0200)]
Add Finnish to the enabled languages list

Signed-off-by: Pasi Kallinen <pasi.kallinen@pttk.fi>
Signed-off-by: Dan Scott <dan@coffeecode.net>
12 years agoZ3950 Batch : xul dialog
Bill Erickson [Tue, 19 Feb 2013 22:55:28 +0000 (17:55 -0500)]
Z3950 Batch : xul dialog

Signed-off-by: Bill Erickson <berick@esilibrary.com>
12 years agoZ39 Batch SQL / Vandelay Z-source bib attr
Bill Erickson [Tue, 19 Feb 2013 22:54:11 +0000 (17:54 -0500)]
Z39 Batch SQL / Vandelay Z-source bib attr

Signed-off-by: Bill Erickson <berick@esilibrary.com>
12 years agoZ39 Batch SQL (upgrade)
Bill Erickson [Tue, 19 Feb 2013 21:38:01 +0000 (16:38 -0500)]
Z39 Batch SQL (upgrade)

Signed-off-by: Bill Erickson <berick@esilibrary.com>
12 years agoMerge branch 'master' of git.evergreen-ils.org:Evergreen into collab/berick/z39-batch...
Bill Erickson [Tue, 19 Feb 2013 21:28:15 +0000 (16:28 -0500)]
Merge branch 'master' of git.evergreen-ils.org:Evergreen into collab/berick/z39-batch-fetch-overlay

Conflicts:
Open-ILS/src/sql/Pg/950.data.seed-values.sql

Signed-off-by: Bill Erickson <berick@esilibrary.com>
12 years agoFix failing SIP unit test
Dan Scott [Mon, 18 Feb 2013 22:59:45 +0000 (17:59 -0500)]
Fix failing SIP unit test

Per LP# 1099595, just copy the constant inline instead of requiring the
SIPServer code to be installed on every instance where you don't want
'make check' to fail. (Skipping the test in the absence of the SIPServer
code would be another option, but then you're skipping the test, and for
the sake of 1 constant, that seems like a bad trade.)

Signed-off-by: Dan Scott <dan@coffeecode.net>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
12 years agothe first rule of fixing typos is that you don't talk about fixing typos
Galen Charlton [Mon, 18 Feb 2013 22:42:11 +0000 (17:42 -0500)]
the first rule of fixing typos is that you don't talk about fixing typos

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
12 years agoLet's inch towards valid XHTML by making POST and GET lowercase in our forms
James Fournie [Mon, 18 Feb 2013 20:41:20 +0000 (12:41 -0800)]
Let's inch towards valid XHTML by making POST and GET lowercase in our forms

Signed-off-by: James Fournie <jfournie@sitka.bclibraries.ca>
Signed-off-by: Dan Scott <dan@coffeecode.net>
12 years agoZ3950 Batch : xul dialog cont.
Bill Erickson [Mon, 18 Feb 2013 22:00:33 +0000 (17:00 -0500)]
Z3950 Batch : xul dialog cont.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
12 years agoZ39 Batch ML
Bill Erickson [Mon, 18 Feb 2013 22:00:23 +0000 (17:00 -0500)]
Z39 Batch ML

Signed-off-by: Bill Erickson <berick@esilibrary.com>
12 years agoZ3950 Batch : initial xul dialog for finding matches
Bill Erickson [Mon, 18 Feb 2013 20:49:32 +0000 (15:49 -0500)]
Z3950 Batch : initial xul dialog for finding matches

Signed-off-by: Bill Erickson <berick@esilibrary.com>
12 years agoZ3950 Batch : initial xul dialog for finding matches
Bill Erickson [Mon, 18 Feb 2013 19:35:10 +0000 (14:35 -0500)]
Z3950 Batch : initial xul dialog for finding matches

Signed-off-by: Bill Erickson <berick@esilibrary.com>
12 years agotypos be gone
Galen Charlton [Mon, 18 Feb 2013 18:15:42 +0000 (13:15 -0500)]
typos be gone

There is nothing like an old typo
reaching out and shaking one by the collar
when reviewing patches.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
12 years agoAdd Rose::URI prerequisite for Ubuntu systems
Lebbeous Fogle-Weekley [Mon, 18 Feb 2013 16:07:23 +0000 (11:07 -0500)]
Add Rose::URI prerequisite for Ubuntu systems

The Ubuntu parts of Makefile.install don't use the same list of CPAN
packages to install since for Ubuntu there are more distro packages
available than for Debian.

Spotted by Ben Shum.

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Signed-off-by: Ben Shum <bshum@biblio.org>
12 years agoLP#1129318: fix exception thrown when printing circ receipts
Galen Charlton [Mon, 18 Feb 2013 17:44:50 +0000 (12:44 -0500)]
LP#1129318: fix exception thrown when printing circ receipts

Because of a misplaced parenthesis in the patch introducing the
PATRON_EXPIRE_DATE_YMD receipt macro, attempting to print
various circ receipts would result in the following exception:

Error in util.date.formatted_date:
location.href = oils://remote/xul/2.3_5/server/circ/checkin.xul
typeof orig_date = string orig_date = 2014-11-07T00:00:00-0500
typeof _date = object _date = Fri Nov 07 2014 00:00:00 GMT-0500 (Eastern Standard Time)
format = undefined
TypeError: s is undefined

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Ben Shum <bshum@biblio.org>
12 years agoZ3950 Batch : initial xul dialog for finding matches
Bill Erickson [Mon, 18 Feb 2013 17:12:26 +0000 (12:12 -0500)]
Z3950 Batch : initial xul dialog for finding matches

Signed-off-by: Bill Erickson <berick@esilibrary.com>
12 years agoZ3950 Batch : initial xul dialog for finding matches
Bill Erickson [Mon, 18 Feb 2013 15:41:01 +0000 (10:41 -0500)]
Z3950 Batch : initial xul dialog for finding matches

Signed-off-by: Bill Erickson <berick@esilibrary.com>
12 years agoDocument new dependency for standalone databases
Lebbeous Fogle-Weekley [Mon, 18 Feb 2013 15:11:34 +0000 (10:11 -0500)]
Document new dependency for standalone databases

Rose::URI.  I had added this to Makefile.install, but I forgot about this
section of documentation that lists dependencies for standalone databases.

Spotted by Ben Shum.

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
12 years agoLP 1092284 - Fix add to my list dropdown with ContentCafe links
Ben Shum [Wed, 16 Jan 2013 21:33:22 +0000 (16:33 -0500)]
LP 1092284 - Fix add to my list dropdown with ContentCafe links

As noted in the bug ticket, the dropdown menu for Add to my list disappears
whenever hovering over the Reviews & More link for ContentCafe-enabled TPACs.

Removing position:relative from .results_review seems to keep the two areas
from having any strange interactions.

Signed-off-by: Ben Shum <bshum@biblio.org>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
12 years agoqp_fix: number upgrade scripts, disable QP unit tests needing more attention
Lebbeous Fogle-Weekley [Fri, 15 Feb 2013 20:36:01 +0000 (15:36 -0500)]
qp_fix: number upgrade scripts, disable QP unit tests needing more attention

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
12 years agoQueryParser: use combined metabib_field column
Thomas Berezansky [Tue, 18 Dec 2012 20:53:28 +0000 (15:53 -0500)]
QueryParser: use combined metabib_field column

Because I somehow forgot about it. Oops.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
12 years agoAdd basic release notes and notes for docwriters
Thomas Berezansky [Tue, 18 Dec 2012 20:12:10 +0000 (15:12 -0500)]
Add basic release notes and notes for docwriters

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
12 years agoUpgrade script for ts config use
Thomas Berezansky [Tue, 18 Dec 2012 19:35:28 +0000 (14:35 -0500)]
Upgrade script for ts config use

And the rest of that work

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
12 years agoAdd config interfaces
Thomas Berezansky [Tue, 18 Dec 2012 15:38:24 +0000 (10:38 -0500)]
Add config interfaces

For metabib class, class ts maps, field, and field ts maps.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
12 years agoQueryParser Driver: Much work
Thomas Berezansky [Thu, 11 Oct 2012 15:43:25 +0000 (11:43 -0400)]
QueryParser Driver: Much work

Switch to configurable fts configs
Add "combined" index vectors
Add word boundary checks for phrase searches
Use combined rel_bump function

And probably more I forgot about

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
12 years agoQueryParser Driver: Remove Unphrases, add negates
Thomas Berezansky [Wed, 10 Oct 2012 21:23:43 +0000 (17:23 -0400)]
QueryParser Driver: Remove Unphrases, add negates

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
12 years agoUse ][ instead of # to split facets
Thomas Berezansky [Wed, 10 Oct 2012 20:51:36 +0000 (16:51 -0400)]
Use ][ instead of # to split facets

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
12 years agoQueryParser Driver: Add "lucky" modifier
Thomas Berezansky [Thu, 27 Sep 2012 20:48:03 +0000 (16:48 -0400)]
QueryParser Driver: Add "lucky" modifier

Forces to 1 result. Best used with redirect on single hit active.

Because why not.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
12 years agoQueryParser Driver: Improve format filter
Thomas Berezansky [Tue, 18 Sep 2012 15:55:07 +0000 (11:55 -0400)]
QueryParser Driver: Improve format filter

Allow multi-select in particular, and make negate more intuitive.

-format(at-d) would previously generate:
-item_type(a,t) -item_form(d)

Now it generates:
-(item_type(a,t) item_form(d))

Multi-select allows for things like:
format(at-d,g)

To generate:
((item_type(a,t) item_form(d)) || item_type(g))

Negating that results in:
-((item_type(a,t) item_form(d)) || item_type(g))

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
12 years agoQueryParser Driver: Long Line Cleanup
Thomas Berezansky [Fri, 14 Sep 2012 16:15:40 +0000 (12:15 -0400)]
QueryParser Driver: Long Line Cleanup

Both in the code and in the generated where clause.

The where clause we start a new line whenever:

1 - We encounter an AND or OR
2 - We are building a complex subquery (including embedded newlines)
3 - We enter a subplan

This makes for a nicely human-readable where clause.

For the code we split many long lines into multiple. A number of those were
changed due to the where clause formatting.

We also change all instances of multiple ${spc} being added to use the
${spc} x #
method of doing things, as it tends to be shorter.

Also, we move some conditionals from the ends of lines to the fronts, mainly
in those situations where we are moving something from single to multi line.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
12 years agoQueryParser Driver: Remove Switch usage
Thomas Berezansky [Fri, 14 Sep 2012 12:57:45 +0000 (08:57 -0400)]
QueryParser Driver: Remove Switch usage

Because not all distros install it by default.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
12 years agoQueryParser Driver: Improve anchored searches
Thomas Berezansky [Wed, 12 Sep 2012 13:12:41 +0000 (09:12 -0400)]
QueryParser Driver: Improve anchored searches

By checking individual atoms for ^ and $ anchors we can get better results,
without needing to have people quote individual terms.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
12 years agoQueryParser Driver: Protect against NULLs
Thomas Berezansky [Tue, 11 Sep 2012 19:02:59 +0000 (15:02 -0400)]
QueryParser Driver: Protect against NULLs

mrd.attrs->'value' can return NULL. If this happens:

Checking that the value is within a range or list will work fine.
NEGATING that will not.

This is because:
AND NULL returns NULL
AND NOT (NULL) also returns NULL

The solution? Adjust things so we can wrap all the offending checks in a
COALESCE to false. Then if mrd.attrs->'value' is null we get a false.

In the process we move any and all negations to outside the COALESCE.

Also apply the same logic to the bib_source filter, not to mention
making it support being negated.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
12 years agoAdd bib_source filter
Thomas Berezansky [Tue, 11 Sep 2012 13:48:39 +0000 (09:48 -0400)]
Add bib_source filter

Because it would likely be very useful, if only for staff.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
12 years agoFix empty statuses filter
Thomas Berezansky [Tue, 11 Sep 2012 13:42:38 +0000 (09:42 -0400)]
Fix empty statuses filter

By adding a check that was overlooked.

Also remove a leftover TODO note and add another test query.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
12 years agoQueryParser Driver: Use proper table alias
Thomas Berezansky [Tue, 11 Sep 2012 13:21:36 +0000 (09:21 -0400)]
QueryParser Driver: Use proper table alias

When all atoms are dummy atoms we need the correct table alias.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
12 years agoAdd some more test queries to query_tester.pl
Thomas Berezansky [Tue, 11 Sep 2012 13:11:29 +0000 (09:11 -0400)]
Add some more test queries to query_tester.pl

At least one of which requires a follow-up change to the driver to resolve.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
12 years agoRemove search.query_parser_fts from schema
Thomas Berezansky [Mon, 10 Sep 2012 20:47:15 +0000 (16:47 -0400)]
Remove search.query_parser_fts from schema

Including an upgrade script to drop it.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
12 years agoQuick script for pushing queries into search
Thomas Berezansky [Mon, 10 Sep 2012 17:54:55 +0000 (13:54 -0400)]
Quick script for pushing queries into search

Several of the defaults are designed to trigger bad SQL generation.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
12 years agoRemove dependence on search.query_parser_fts proc
Thomas Berezansky [Fri, 7 Sep 2012 20:07:26 +0000 (16:07 -0400)]
Remove dependence on search.query_parser_fts proc

We do this by moving everything into the QueryParser driver, then telling
the metabib layer to not call it anymore.

In the process we remove the "superpage" checks, instead just getting the
entire result set directly from the DB.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
12 years agoQueryparser Driver: SQL Generation Tweaks
Thomas Berezansky [Fri, 7 Sep 2012 18:13:08 +0000 (14:13 -0400)]
Queryparser Driver: SQL Generation Tweaks

Remove fwhere/where distinction due to issues with detecting where some
operators were supposed to go.

Change format to a callback instead of forcing it to the top of the tree.

Change date-based filters to work in nested situations.

Change container and record_list to work in nested situations.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
12 years agoQueryParser Driver: Adjust query whitespace
Thomas Berezansky [Fri, 7 Sep 2012 14:46:34 +0000 (10:46 -0400)]
QueryParser Driver: Adjust query whitespace

Adjust spacing and newlines to make the resulting query more easily read.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
12 years agoQueryParser: Expand negate and disallow operators
Thomas Berezansky [Sun, 16 Sep 2012 20:46:43 +0000 (16:46 -0400)]
QueryParser: Expand negate and disallow operators

Allow negate to act like disallow on phrases.

Allow both to apply to groups.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
12 years agoQueryParser: Add negate operator
Thomas Berezansky [Sun, 16 Sep 2012 19:21:07 +0000 (15:21 -0400)]
QueryParser: Add negate operator

To replace the previous -atom behavior add a negate op, by default !.

This acts identically to how - worked before it was changed to convert atoms
into unphrases.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
12 years agoQueryParser: Treat Unphrases as negated phrases
Thomas Berezansky [Sun, 16 Sep 2012 19:08:06 +0000 (15:08 -0400)]
QueryParser: Treat Unphrases as negated phrases

This should allow drivers to better check for negated phrases by using
indexes on the contained atoms.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
12 years agoQueryParser: Protect phrase parsing
Thomas Berezansky [Sun, 16 Sep 2012 17:53:16 +0000 (13:53 -0400)]
QueryParser: Protect phrase parsing

Ensure that phrases don't get parsed as containing anything other than
individual atoms. This ensures that you can phrase-escape things that would
otherwise be treated as QP syntax.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
12 years agoConvert negated words to unphrases, like we do with +d words to phrases
Mike Rylander [Fri, 14 Sep 2012 18:28:20 +0000 (14:28 -0400)]
Convert negated words to unphrases, like we do with +d words to phrases

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
12 years agoLots ...
Mike Rylander [Wed, 12 Sep 2012 17:12:12 +0000 (13:12 -0400)]
Lots ...

 * increase debugging amount and readability
 * floating sections (push-to-top)
 * force plan level setting
 * fix several forms of auto-pushdown breakage (explicit bool precedence support)

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
12 years agoQueryParser unit test
Jared Camins-Esakov [Sat, 8 Sep 2012 02:44:50 +0000 (22:44 -0400)]
QueryParser unit test

Test that QueryParser can handle a variety of queries. This initial
unit test does the following:

1) Test the configuration of QueryParser.
2) Test that various queries have stable canonical representations.
3) Test that a number of equivalent queries are correctly parsed as
   equivalent.
4) Test that a number of non-equivalent queries are correctly parsed as
   NOT being equivalent.
5) Several other tests relating to query parsing.

This includes almost 100% subroutine coverage in the QueryParser class.
Other classes have somewhat lower test coverage.

As of 2012-09-09, several outstanding bugs affect these tests:
1) QueryParser->superpage cannot be unset.
2) Explicit groups are not handled correctly by the abstract query
   to string converter.
3) There is no defined precedence between explicit boolean connectors
   and implicit boolean connectors.
4) Modifiers are silently dropped when not at the top level of the query.

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
12 years agoStart adding skeletal POD for subroutines
Jared Camins-Esakov [Sun, 9 Sep 2012 14:52:06 +0000 (10:52 -0400)]
Start adding skeletal POD for subroutines

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
12 years agoMove allow_nested_modifiers to the driver level, provide a wrapper for it, and add...
Mike Rylander [Mon, 10 Sep 2012 19:31:05 +0000 (15:31 -0400)]
Move allow_nested_modifiers to the driver level, provide a wrapper for it, and add that to the Pg test setup as an example

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
12 years agoAllow nested modifiers
Jared Camins-Esakov [Sat, 8 Sep 2012 03:36:36 +0000 (23:36 -0400)]
Allow nested modifiers

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
12 years agoPretty-fy canonicalization
Mike Rylander [Mon, 10 Sep 2012 18:58:01 +0000 (14:58 -0400)]
Pretty-fy canonicalization

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
12 years agoTeach QP about floating (force-to-top) subplans indicated by {{...}}
Mike Rylander [Mon, 10 Sep 2012 17:21:30 +0000 (13:21 -0400)]
Teach QP about floating (force-to-top) subplans indicated by {{...}}

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
12 years agoQP: OO-ize canonicalizer; remove extra nesting from canonicalized query; repair neste...
Mike Rylander [Fri, 7 Sep 2012 19:51:43 +0000 (15:51 -0400)]
QP: OO-ize canonicalizer; remove extra nesting from canonicalized query; repair nested operator in bool nesting; updated (basis) test script

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
12 years agoAutomatic push-down of explicitly-bool-connected conditions
Mike Rylander [Fri, 7 Sep 2012 18:15:21 +0000 (14:15 -0400)]
push-down of explicitly-bool-connected conditions

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
12 years agoLP1071505 - Add 264 RDA tag to TPAC pubinfo display
Ben Shum [Wed, 10 Oct 2012 21:00:54 +0000 (17:00 -0400)]
LP1071505 - Add 264 RDA tag to TPAC pubinfo display

Prior to this, TPAC only retrieved the 260 tag for publication info. Allow for
the possibility that the 264 tag might exist and contain relevant information.
Special note: the 264 tag must have a second indicator value of 1 to be meant
for publication statement.

Also, this only picks out the first 260 or 264 tags in any given bib record.

Approach inspired by Dan Scott's approach taken for finding edition statements.

Signed-off-by: Ben Shum <bshum@biblio.org>
Signed-off-by: Dan Wells <dbw2@calvin.edu>
12 years agoZ3950 Batch : search ou settings
Bill Erickson [Wed, 13 Feb 2013 19:07:29 +0000 (14:07 -0500)]
Z3950 Batch : search ou settings

Signed-off-by: Bill Erickson <berick@esilibrary.com>
12 years agoZ39 Batch : Sort Vandeley queued recs by matches
Bill Erickson [Wed, 13 Feb 2013 17:16:24 +0000 (12:16 -0500)]
Z39 Batch : Sort Vandeley queued recs by matches

Signed-off-by: Bill Erickson <berick@esilibrary.com>
12 years agoZ39 Batch : vandelay match_bucket vandelay UI
Bill Erickson [Wed, 13 Feb 2013 16:04:03 +0000 (11:04 -0500)]
Z39 Batch : vandelay match_bucket vandelay UI

Signed-off-by: Bill Erickson <berick@esilibrary.com>
12 years agoZ39 Batch : vandelay match_bucket vandelay UI
Bill Erickson [Wed, 13 Feb 2013 15:56:59 +0000 (10:56 -0500)]
Z39 Batch : vandelay match_bucket vandelay UI

Signed-off-by: Bill Erickson <berick@esilibrary.com>
12 years agoZ39 Batch : vandelay match_bucket queueu create API
Bill Erickson [Wed, 13 Feb 2013 15:56:44 +0000 (10:56 -0500)]
Z39 Batch : vandelay match_bucket queueu create API

Signed-off-by: Bill Erickson <berick@esilibrary.com>
12 years agoZ39 Batch : vandelay match_bucket IDL fix
Bill Erickson [Wed, 13 Feb 2013 15:56:21 +0000 (10:56 -0500)]
Z39 Batch : vandelay match_bucket IDL fix

Signed-off-by: Bill Erickson <berick@esilibrary.com>
12 years agoZ39 Batch : vandelay match_bucket
Bill Erickson [Mon, 11 Feb 2013 20:33:07 +0000 (15:33 -0500)]
Z39 Batch : vandelay match_bucket

Signed-off-by: Bill Erickson <berick@esilibrary.com>
12 years agoZ39 Batch SQL (upgrade)
Bill Erickson [Mon, 11 Feb 2013 20:31:19 +0000 (15:31 -0500)]
Z39 Batch SQL (upgrade)

Signed-off-by: Bill Erickson <berick@esilibrary.com>
12 years agoZ39 Batch ML
Bill Erickson [Mon, 11 Feb 2013 19:44:11 +0000 (14:44 -0500)]
Z39 Batch ML

Signed-off-by: Bill Erickson <berick@esilibrary.com>
12 years agoZ39 Batch ML : queueing results
Bill Erickson [Mon, 11 Feb 2013 19:39:42 +0000 (14:39 -0500)]
Z39 Batch ML : queueing results

Signed-off-by: Bill Erickson <berick@esilibrary.com>
12 years agoZ39 Batch ML
Bill Erickson [Fri, 1 Feb 2013 17:23:19 +0000 (12:23 -0500)]
Z39 Batch ML

Signed-off-by: Bill Erickson <berick@esilibrary.com>
12 years agoZ39 Batch ML
Bill Erickson [Fri, 1 Feb 2013 14:42:38 +0000 (09:42 -0500)]
Z39 Batch ML

Signed-off-by: Bill Erickson <berick@esilibrary.com>