Currently, the misc/cronjobs script cleanup_database truncates the session table (deleting all records, including active sessions).
With an additional parameter sessdays, this behavior could be changed or (perhaps better) extended. If the parameter sessdays is passed along with a number of days, the script only deletes older session records. This is accomplished by examining the values of lasttime, atime or ctime in the record.
So, calling the script like:
./cleanup_database.pl -v -sessions -sessdays 7
will only delete sessions records older than 7 days. The "old style" call
./cleanup_database.pl -v -sessions
still works too and truncates the table as before.
Patch can be applied to 3.0.x and master.
This patch applies to 3.0.x only and solves a little bug in using the localtime function when writing to tmp/sessionlog. It should be called in scalar context iinstead of list context.
Previous commit on bug 4263 reintroduced bug 2466 namely item subfields would not be wiped out.
This patch takes the need for dateacessioned not to be blanked.
But also wipe out desired item subfields.
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
This patch fix the call to moditemtransfert in the case of automaticitemtransfert set to ON.
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
this delete duplicate code that generate an error in a sql query and can't work when "pass on loan items" is checked.
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
The called function AddReturn is in C4::Circulation which is not loaded, this patch do it.
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
If any part of concat is null, all the address field is null.
Now we use IFNULL() from mysql.
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
Since the update of biblios would be done AFTER the deletion of biblios,
and since biblios would be updated just before being deleted (in order to delete the items)
update process would recreate the biblio.
This patch fixes the order in order to do the deletion AFTER the update.
A few lines of code in additem.pl make it possible to add the Change event next to Blur and Focus for item plugins. This prevents running the plugin if the data has not changed. Patch sent for 3.0.x.
Currently, the default for this marc field is hardcoded in the plugin code of
marc21_field_008_authorities.pl (two occurrences).
I suggest to move this value to a new system preference. If this pref should
not exist, the old hardcoded value could still be used.
Furthermore, the default for position 14 (heading use: main or added entry)
should be dependent on the authority type. For CHRON_TERM, GENRE/FORM and
TOPIC_TERM, it should be b (not appropriate) instead of a (appropriate).
This patch applies to 3.0.x only. Additional patch submitted for master.
The line binmode STDOUT, ':utf8'; garbles the output. It was already utf8. The statement should be used on binary data, not on plain text. The statement occurred more frequently in older versions of the script; this last occurrence must be deleted too.