dbs [Mon, 7 Jun 2010 05:36:47 +0000 (05:36 +0000)]
More cleanup of Dojo JSON files
* Double-quote all strings - no single-quoting or barewords
* Don't escape dollar signs
* JSON doesn't allow expressions like string continuations ("" + "")
reservations.js has some remaining issues, looks like functions were
defined for what should be simple string substitutions. dojo.string.substitute()
will solve this problem, I believe, with ${0}, ${1}, etc tokens for substitution
dbs [Mon, 7 Jun 2010 03:48:07 +0000 (03:48 +0000)]
Commit updates from Launchpad translation
Bringing all of the translated files up to date with what is in Launchpad.
Next steps: generate all of the updates from trunk and add all the new files
erickson [Fri, 4 Jun 2010 20:53:27 +0000 (20:53 +0000)]
Bugfixes: undef handling and legacy script support setting.
The legacy setting was a major bug. It was not possible to disable legacy scripts
except by *removing* the setting. That is, if you set it to 'false',
we failed to interpret that here in SIP to mean FALSE. Instead we
looked at it as a non-zero-length string and therefore TRUE!
This patch also prevents warnings from unitialized values (undef concatenation), like:
Use of uninitialized value in concatenation (.) or string at /openils/lib/perl5/OpenILS/SIP/Patron.pm line 110.
Added a little formatting and whitespace cleanup to address display along w/ undef handling.
erickson [Fri, 4 Jun 2010 20:53:25 +0000 (20:53 +0000)]
Checkin overhual for extensions, including item, patron and checkin underpinnings.
Extensions fields added to AUTOLOADable content.
Also fix checkin logic to check for NO_CHANGE and SUCCESS at necessary moments.
Update new code to match berick's #16544.
Add AUTOLOAD to Item and provide a slot to store the raw EG hold object.
Store the hold data down on the item (not the Checkin transaction level).
Allow SIP Patron lookup by usr ID (not barcode).
This is important because we need supplemental data when we find holds info at checkin.
The change is backwards compatible (w/ just 1 arg it will still be treated as a barcode).
Propagate $inst_id down into checkout core, needed for hold routing logic.
Remove old accessor methods, also make some of the settings checks more flexible w/ regex.
This adds code for enable, still experimental. It also adds the
client's block message to the patron alert, bracketed by <sip> tags.
The tags are necessary because enable has to be able to regexp out
the block alert message (including user-specified variable text).
Remove unused vars.
Whitespace cleanup and extra feedback data.
Return object on failure, not just 0
Signed-off-by: Joe Atzberger <atz@esilibrary.com>
git-svn-id: svn://svn.open-ils.org/ILS/trunk@16598 dcc99617-32d9-48b4-a31d-7c20da2025e4
erickson [Fri, 4 Jun 2010 20:53:23 +0000 (20:53 +0000)]
Lots of cleanup, logging improvements, and comments.
One arrayref accessor updated to recommended style
Removed unused dependency.
Removed never-possible return statement.
Trying to use an arrayref in the log message results in a string like "ARRAY(0x2541870)".
I added a prebuilt string representation of the array for use in those messages.
More whitespace cleanup.
More flexible to_bool, extra comments;
Also added institution_id method.
Note: OpenILS::Event->new returns a hash, not a true object.
script_x_check.sh is executable.
Irony: this script could have been used to detect itself.
Typo in Cronscript POD.
Signed-off-by: Joe Atzberger <atz@esilibrary.com>
git-svn-id: svn://svn.open-ils.org/ILS/trunk@16597 dcc99617-32d9-48b4-a31d-7c20da2025e4
scottmk [Fri, 4 Jun 2010 19:00:55 +0000 (19:00 +0000)]
Add two little utility functions to convert from intervals to seconds.
M Open-ILS/src/sql/Pg/999.functions.global.sql
M Open-ILS/src/sql/Pg/002.schema.config.sql
A Open-ILS/src/sql/Pg/upgrade/0293.function.interval-to-seconds.sql
dbs [Fri, 4 Jun 2010 03:54:14 +0000 (03:54 +0000)]
Improve circ transaction performance by indexing NULL circs (Launchpad 587031)
Creating a unique index on target_copy in the action.circulation table where
the checkin_time is NULL will increase the speed of circ transactions,
particularly on systems with a lot of traffic. The uniqueness also
ensures that a given item will not be able to be checked out multiple times
concurrently.
Thanks to James Fournie from BC Sitka for suggesting the index in Launchpad
bug 587031!
dbs [Fri, 4 Jun 2010 03:29:03 +0000 (03:29 +0000)]
Improve database performance for partial indexes on boolean columns (bug 587028 in Launchpad)
PostgreSQL 8.3/8.4 treats "IS FALSE" and "= FALSE" expressions differently,
which can have a significant impact on database performance if an index is
created with one and a query uses the other. This patch addresses all existing
partial indexes on boolean columns to enable the query planner to use an index
scan whether the query uses either expression.
Thanks to James Fournie of BC Sitka for noticing the problem with the index
on asset.copy and opening bug 587028 in Launchpad with the suggested fix!
scottmk [Thu, 3 Jun 2010 20:02:39 +0000 (20:02 +0000)]
Various tweaks:
1. When resetting the timeout for a session: if the session object
carries an endtime, and the expiration time is within a designated
interval, extend the expiration time a bit instead of reapplying the
entire original timeout from the current time.
This feature is unreachable at the moment because it is designed for
persistent sessions, which aren't otherwise implemented yet. The
purpose is to avoid rudely terminating an active session, but without
extending it too much.
2. Whenever possible, use integral types instead of doubles.
3. Instead of calling osrfCacheSetExpire(), call osrfCachePutObject()
directly, which does the same thing with less overhead.
4. Tinkered with white space and comments here and there.
erickson [Thu, 3 Jun 2010 19:56:53 +0000 (19:56 +0000)]
implemented a simple mechanism to allow for linking to record detail pages by ISBN. If no record ID is present in the URL and the URL has a search type of isbn and an isbn value, do an ISBN lookup and display the first record we get back from the search.
dbs [Thu, 3 Jun 2010 02:52:10 +0000 (02:52 +0000)]
password reset URI needs a trailing slash, and this enables the aupr entry to be created, but:
* Server is now returning a 500 instead of 200, which causes an error dialogue
to be displayed instead of "success!" and JavaScript errors to cascade
* We don't want to hard-code the en-US locale; need to pull that from current locale
scottmk [Wed, 2 Jun 2010 19:24:14 +0000 (19:24 +0000)]
Replace most of the serial schema with a different set of tables. Only
the serial.record_entry table remains unscathed.
In addition: a new table asset.copy_template.
M Open-ILS/src/sql/Pg/002.schema.config.sql
M Open-ILS/src/sql/Pg/040.schema.asset.sql
A Open-ILS/src/sql/Pg/upgrade/0288.schema.serial-overhaul.sql
M Open-ILS/src/sql/Pg/210.schema.serials.sql
M Open-ILS/examples/fm_IDL.xml
miker [Wed, 2 Jun 2010 14:38:58 +0000 (14:38 +0000)]
get rid of search.staged_fts() and supporting functions -- entirely replaced by search.query_parser_fts(); deprecating only, no upgrade script required
senator [Tue, 1 Jun 2010 20:35:21 +0000 (20:35 +0000)]
Move credit card processing ML code into the circ module, removing API method
for direct payment processing. (Using open-ils.circ.money.payment with auth
can invoke CC processing).
senator [Tue, 1 Jun 2010 17:38:21 +0000 (17:38 +0000)]
Remove accidentally committed OPAC CC payment test code.
Only the changes in payment.js and selfcheck.js were supposed to be commited
in 16542. The opac changes themselves were only a rough test and aren't
seaworthy.
erickson [Tue, 1 Jun 2010 17:21:31 +0000 (17:21 +0000)]
in the SIP server plugin, don't connect and start a transaction by default with every cstore handle. only connect/begin when necessary. also, making use of new CStoreEditor::init() call for setting up the editor environment when initial load was done before the IDL was available.
scottmk [Mon, 31 May 2010 03:03:03 +0000 (03:03 +0000)]
1. Add support for function calls. Note that certain functions have
peculiar calling syntax. They will require special handling as exceptions,
and are not yet supported.
2. Add a bit of sanity checking for numeric and string literal expressions.
3. Eliminate the function_id member of Expression.
M Open-ILS/include/openils/oils_buildq.h
M Open-ILS/src/c-apps/oils_storedq.c
M Open-ILS/src/c-apps/buildSQL.c
scottmk [Sun, 30 May 2010 03:50:47 +0000 (03:50 +0000)]
For various updatable views based on query.expression:
add COALESCE to the insert rule so that we don't always
have to specify a value for the "negate" column.
Also: eliminate a harmless but annoying duplication of
the create statements for the query.expr_xbind view.
M Open-ILS/src/sql/Pg/002.schema.config.sql
M Open-ILS/src/sql/Pg/008.schema.query.sql
A Open-ILS/src/sql/Pg/upgrade/0286.schema.query-coalesce-negate.sql
M Open-ILS/src/sql/Pg/002.schema.config.sql
A Open-ILS/src/sql/Pg/upgrade/0284.data.persistent-login-interval.sql
M Open-ILS/src/sql/Pg/950.data.seed-values.sql
erickson [Fri, 28 May 2010 13:25:47 +0000 (13:25 +0000)]
repaired misnamed function oils_json_to_string -> oils_json_to_text; updated funcs to use the setting name provided by the seed data retention_start_date -> retention_start
scottmk [Fri, 28 May 2010 01:46:29 +0000 (01:46 +0000)]
Support series expressions, i.e. a series of expressions
separated by operators or commas. This construct will
be especially useful for chains of ANDs or ORs.
M Open-ILS/include/openils/oils_buildq.h
M Open-ILS/src/c-apps/oils_storedq.c
M Open-ILS/src/c-apps/buildSQL.c
scottmk [Thu, 27 May 2010 16:10:50 +0000 (16:10 +0000)]
Add new expression type 'xser' to represent series expressions,
i.e. a series of expressions separated by operators, such as a
chain of ANDed conditions.
M Open-ILS/src/sql/Pg/002.schema.config.sql
M Open-ILS/src/sql/Pg/008.schema.query.sql
A Open-ILS/src/sql/Pg/upgrade/0280.schema.query-xser.sql
M Open-ILS/examples/fm_IDL.xml
erickson [Thu, 27 May 2010 13:18:45 +0000 (13:18 +0000)]
added Replace Barcode option into new patron reg. interface. Also added a basic See All operation that shows all attached barcodes for a user, provides no editing capabilities
scottmk [Thu, 27 May 2010 12:38:48 +0000 (12:38 +0000)]
Bug fix in verifyObjectPCRUD().
When traversing a chain of rows according to the "jump" attribute:
if you encounter a null foreign key, just stop looking, without
issuing an exception.
scottmk [Wed, 26 May 2010 19:03:25 +0000 (19:03 +0000)]
Correcting some diverging drift in the usr_merge function
M Open-ILS/src/sql/Pg/999.functions.global.sql
M Open-ILS/src/sql/Pg/002.schema.config.sql
A Open-ILS/src/sql/Pg/upgrade/0278.function.usr-merge-drift.sql
scottmk [Wed, 26 May 2010 13:27:29 +0000 (13:27 +0000)]
Bug fixes in verifyObjectPCRUD():
1. Don't throw an exception just because a foreign key is null.
2. When looking for local or foreign contexts, always do a lookup of
the current row, even if you already have an image of that row in
hand. The image you have may not include the foreign key(s) you need.
The latter fix is simple but inefficient. It should be possible to
avoid the extra lookup most of the time, and maybe all of the time,
for the search, retrieve, and id_list methods. However that will
involve additional complications, not yet implemented. Let's make
it correct first, and worry about efficiency later.
scottmk [Tue, 25 May 2010 17:53:43 +0000 (17:53 +0000)]
Correcting an upgrade script.
The value column in actor.org_unit_setting should be valid JSON. In this
revised version the new value is jiggered to make it a string instead of a
number. This conversion is a bit simplistic and can be defeated by various
kinds of improbable input.
M Open-ILS/src/sql/Pg/upgrade/0274.data.org-setting-type-est-wait.sql
scottmk [Tue, 25 May 2010 16:21:56 +0000 (16:21 +0000)]
Plug some memory leaks, and eliminate some unnecessary
memory allocations.
In oils_utils.[ch]:
-- Create a new function, oilsFMGetStringConst(), similar to
oilsFMGetString() except that it doesn't allocate memory; it returns
a const pointer to a string internal to the specified object.
-- Add some comments, tidy up white space.
In oils_sql.c:
-- Replace oilsFMGetString() with oilsFMGetStringConst in a number
of places; partly to reduce memory churn, and partly to plug some
memory leaks where the function call was nested within a
parameter list.
-- Change org_tree_root() so as to return a const pointer to a
static buffer (which was already in use as a cache) instead of
allocating a copy of the string. This change reduces memory
churn. In addition the allocated string was leaking anyway, and
now that leak is plugged.
M Open-ILS/include/openils/oils_utils.h
M Open-ILS/src/c-apps/oils_sql.c
M Open-ILS/src/c-apps/oils_utils.c