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
Frédéric Demians [Sun, 14 Jun 2009 05:17:40 +0000 (07:17 +0200)]
Bug 3301 - Speed up rebuild_zebra script
With this patch, rebuild_zebra can re-index a whole Koha DB
quickly:
rebuild_zebra -r -b -nosanitize
Biblio (authority) records are dump directly in a file
from marcxml field without beeing transformed into
MARC::Record object and corrected.
DOCUMENTATION:
rebuild_zebra.pl new paramater:
-nosanitize export biblio/authority records directly from DB marcxml
field without sanitizing records. It speed up
dump process but could fail if DB contains badly
encoded records. Works now only with -x and -b
Joe Atzberger [Sat, 20 Jun 2009 00:32:42 +0000 (19:32 -0500)]
checkoverdues should not require $dbh
Passing $dbh around is an ancient style that doesn't know
to use C4::Context. C4::Context->dbh is efficient, especially
for modules that already use Context, including almost all C4.
I also internalized $today into the SQL using NOW() in the query
and removed sth->finish. Even though I dislike the return style
that gives the count, then the array, I left it becuase I don't
have time to fix/test all the callers. However, I did convert
it so it doesn't require a $count variable and its own loop.
Joe Atzberger [Sat, 20 Jun 2009 00:32:44 +0000 (19:32 -0500)]
Return amount for CREDITS, POD rework.
The main change here is to get an {amount} field for CREDITS,
not just CHARGES. I also use a fallback to default value (5)
in case noissuescharge has been deleted or set to 0.
POD is reworked to keep the salient chunks
about patronflags in the correct section and format them for
easier reference. Deprecated display layer code.
Joe Atzberger [Sat, 20 Jun 2009 00:32:45 +0000 (19:32 -0500)]
Cleanup Members.pm - minor
MoveMemberToDeleted is problematic. It has a bad name, since it
only copies, not moves. Also the POD for it referenced a totally
different function name and was largely useless. Sanity checks inserted.
Jane Wagner [Fri, 19 Jun 2009 13:10:20 +0000 (09:10 -0400)]
Bug # 2368 Change holds to pull default date range
Delivered range was 10 years ago to yesterday; changed default
to be two days ago to today. Also removed notes field from report
output; 5xx fields can be quite large and including them in the
display resulted in a very lengthy printout for staff.
Joe Atzberger [Mon, 22 Jun 2009 19:40:56 +0000 (14:40 -0500)]
Bug 3350 - fail on queued emails w/ no address
If a patron has no email address, we need to avoid stockpiling all
their messages indefinitely. Otherwise they get mailbombed when
their email IS added.
Note that overdues should not be affected, since the overdues job
checks whether the patron email exists before sending the message
(falling back to the admin). The other messaging features are the
targets affected by this patch.
Ryan Higgins [Mon, 15 Jun 2009 22:20:29 +0000 (17:20 -0500)]
Add MARC21 Fast-add Framework.
Development is in progress for brief records
in Koha; until that's done, this framework can
be used to add a minimal record.
Created by debra.denault@liblime.com
Joe Atzberger [Fri, 12 Jun 2009 14:25:47 +0000 (09:25 -0500)]
Cleanup - admin scripts
Fixed useless redirect statements that weren't even printed.
Removed unused javascript and script variables;
Removed sth->finish. Use get instead of post on "cancel" button (no data to post).
Reduce duplicative variables (e.g. scriptname and script_name).
Many other problems are still in the scripts, including use of META-REFRESH instead of
redirect, and the whole idea of redirecting back to the same page for no valid reason.
We should be able to formulate the right response on THIS pass, not ask the browser to start over.