The values are not escaped in javascript, so if there is double quotes, the authority cannot be imported because of javascript error. This patch fix this.
Colin Campbell [Thu, 20 Aug 2009 10:12:57 +0000 (11:12 +0100)]
Avoid numeric comparisons with leading zeroes
Numbers in perl with leading zeros are interpreted in octal
Ensure that comparisons are done using string operators
or where appropriate use the MARC::Field method
Colin Campbell [Tue, 11 Aug 2009 16:43:02 +0000 (17:43 +0100)]
Bug 3522 Refactor Create Update Delete letter for consistency and readability
Fixed inconsistent usuage of primary key in delete
Refactored:
Moved operations to separate subroutines to clarify data flow
Removed unnecessary redirects to self
Renamed confusingly named else variable passed to template
Other changes for code clarity
NB Outstanding:
database reading/writing should live in appropriate module
not duplicate it here.
Galen Charlton [Tue, 11 Aug 2009 14:46:20 +0000 (10:46 -0400)]
bug 3520: fix crash when adding or editing items
Fix the following crash when adding or editing an
item record in the staff interface:
Can't call method "append_fields" on an undefined value at
/usr/local/share/perl/5.10.0/MARC/File/SAX.pm line 92.
at /usr/local/share/perl/5.10.0/MARC/File/SAX.pm line 92
This crash appears only if a version of MARC::File::XML
greater than 0.88 is installed, and was triggered by
C4::Biblio::TransformHtmlToXml() failing to create a valid
MARCXML blob, which must include a <record> element.
This patch also fixes the indicator values generated by
TransformHtmlToXml(), setting them to " " instead of
"" when no indicator value is supplied.
Galen Charlton [Mon, 10 Aug 2009 04:18:08 +0000 (00:18 -0400)]
bug 2157: add ability to 'clean' staged record batches
batches, it is now possible to 'clean' a batch by
removing all bib and item records staged in the batch. This
has the effect of helping to reduce database space used
by old import batches as well as removing staged records
from the cataloging reservoir search. Note that 'cleaning'
a batch affects only the copies of the records that were staged;
if the batch was committed, cleaning the batch does not
affect any bibs and items that were committed into the catalog.
Also note that once you clean a committed batch of records, it is
impossible to undo the previous commit operation.
Michael Hafen [Mon, 10 Aug 2009 17:24:05 +0000 (11:24 -0600)]
bugfix opac-user stomps mylibraryfirst value in quick search label
the system preference mylibraryfirst is exported by Auth containing the logged
in users branchcode. It is also exported as the value of the syspref by
opac-user.pl. The effect is that when mylibraryfirst is on and the user
logged in the text label for the OPAC quick search instead of displaying
'Search (in [branchcode] only)' shows 'Search (in 1 only)'. Other user pages
are uneffected.
Galen Charlton [Sat, 1 Aug 2009 16:17:18 +0000 (12:17 -0400)]
bug 3465: enhance DB update reporting by web installer
This enhances the web installer so that messages from updatedatabase.pl will
be displayed to the user running a database update. Messages printed to STDOUT
will be displayed as the update report, while messages printed to STDERR will
be displayed as update errors.
This patch introduces a new module dependency, IPC::Cmd.
IPC::Cmd lets one run an external program such as updatedatabase.pl and easily
capture STDERR and STDOUT for further munging. IPC::Cmd is core in Perl 5.10
and stable in Perl 5.8.
This little script establishes a framework for database cleanup on some regular
schedule. Initial implementation provides for brute truncation of the sessions
table, and selective-by-age cleanup of the zebraqueue.
Bug 1607: Fixes the delete checkboxes in purchase suggestions.
If a user views suggestions of another user, syspref (OPACViewOthersSuggestions), a selection check box for deletion appeared next to all of the suggested titles whether the logged-in user owned them or not. - fixed
Also fixes the "Clear all" and "Select all" links which appeared for anonymouse users, if AnonSuggestions is turned on.
Joe Atzberger [Wed, 8 Jul 2009 20:27:45 +0000 (15:27 -0500)]
Search.pm minor cleanup
Trying to move towards enabling warnings.
Add warn for unknown $query_type.
Use common $dbh.
push @array, ({key1=>value1...}); is the same as
push @array, {key1=>value1...};
if ( scalar(@$arrayref) > 0 ) is the same as
if (scalar @$arrayref)
Lines like:
my @operators = @$operators if $operators;
are bad because we need @operators to be declared and in scope later,
even if it is undef. Without $operators, the variable is not in scope.
(Bug 3402) Serials issue name not escaped when passed forward to routing slip
The issue descriptor was not being escaped before being passed on to the
routing slip, causing truncation. It's truly impossible to know for sure
what will be there, so uri_escape-ing seemed the best way to ensure that
it gets handed forward and makes it all the way to the printable slip.
Joe Atzberger [Wed, 22 Jul 2009 15:23:16 +0000 (10:23 -0500)]
Cleanup _Findgroupreserve.
Mostly formatting SELECT statement for readability. Also updated POD
and added a comment. This command:
git diff -w C4/Reserves.pm
shows only the POD and comment chnages.
Bug 3322: Fixes expandedSearchOption in opac. Makes "fewer options" possible.
Copies the logic of catalogue/search.pl to fix the expanded search option in opac. When expanded search is the default, it was impossible to go to the "fewer" options.
Bug 3423 - In Cataloging, fields are not ordered by tag number
In cataloging, depending on installation and how biblio framework has been
created/modified, fields are not displayed ordered by tag number. For example,
in UNIMARC you can have in tab '2':
225
200
210
This patch order fields in tabs by tag and letter in the tag.
Bug 2553: Fixes the alphabetization of the drop-down lists for the Most-Circulated items report.
This patch alphabetizes the descriptions that appear in the Library, Item type, and patron category drop-down lists of the Most-Circulated Items report form.
Bug 2553: Fixes drop-down alphabetization in acquisitions - New order and Receive order.
Fixes alphabetization of library dropdown in New Order, and the shelf location, item type, and collection code in the Receive Items pages. This patch takes care of Joann's original purpose of creating the bug enhancement.
Bug 3408: Tag cloud says login when logged in - fix.
Changed the logic in the html form to have the login prompt only appear if a user is not logged in. Separated the hidemylist functionality from the "show tags from other users" option. Created a link for "hide my tags" or "show my tags" depending on context.
The user can now choose how many tags of other users to show, and can also choose whether to show their own tags or not.
Joe Atzberger [Mon, 20 Jul 2009 20:37:24 +0000 (15:37 -0500)]
Cannot use the same TMPL_VAR to select ALL options.
Only one select can be selected in this case. If preselection of search type is
desired, I recommend a clean implementation w/ jquery instead of adding a conditional
for each select. Please note, that is the only good way to get multiple preselections,
since the same .inc file will be used in each case. So a single variable like
<TMPL_IF NAME="index_bc_selected">
cannot be used, since it would set for ALL (3) advanced search dropdowns.
Joe Atzberger [Mon, 20 Jul 2009 22:47:42 +0000 (17:47 -0500)]
Remove bogus "selected" logic from OPAC adv. search.
The only reason the TMPL_VAR works where it does is because it is part
of the TMPL_LOOP. It doesn't mean anything outside the loops, since
*everything* would be selected with the same variable, indiscriminantly.
Joe Atzberger [Fri, 17 Jul 2009 14:56:31 +0000 (09:56 -0500)]
Add crontab instructrions.
Too many people have been confused about crontab dependent functions
"not working" automatically on their installations. This is probably
because there was no explicit step telling them to schedule the jobs.
The maintainers of the other INSTALL.* docs would be well advised
to insert similar lines in their docs, after confirming proper operation,
since cron/crontab are very system dependent.
(bug #3393) take care of default rules in overdues
This fix the overdues notices script, that doesn't take care of default rules.
Now if there is no specific rules for a branchcode, the script use the default rule if it exists.
The hash keys were made using a base and $item->{date_due}, but this key doesn't exists, so the possibility to have duplicate keys exists, and sometimes the others items were not shown. This patch fix this bug.
Garry Collum [Sat, 27 Jun 2009 17:48:18 +0000 (13:48 -0400)]
Bug 3317: Adds author and added-author to email sent from basket (Cart).
Adds the author and added author fields to the email that is sent from the shopping cart. This makes the data sent via email consistent with the data that is viewed in the basket.
There is still a problem with author authority records other than 100 tags appearing correctly in the shopping cart.
Joe Atzberger [Tue, 30 Jun 2009 14:14:50 +0000 (09:14 -0500)]
LDAP overhaul
Allow replicate and update to be zero.
Break out logic into separate subs.
Do only one bind attempt depending on setting, instead of
necessarily failing first before trying auth_by_bind.
POD added for active directory and to document permutations of
behavior given different conditions. Fixed mistaken debug lines
that called "print STDERR printf ...", i.e. printed the line to output
and "1" to the error log. Added principal_name feature for generating
bind user from Koha userid.
For UNIMARC installations, this patch only works after
updating the "NoZebraIndexes" system preference to
UNIMARC indexes (by default, NoZebraIndexes is being
wrongly set to MARC21 values in UNIMARC installations).
That has also been reported as a Bug, by me (see Bug 2178):
Bug 2178 - "NoZebraIndexes" system preference is being set
to MARC21 values in UNIMARC installations
http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=2178