From 8f55696a4dcf07f2da9eb1b8576f08c2479272a1 Mon Sep 17 00:00:00 2001 From: Chris Nighswonger Date: Tue, 22 Jul 2008 13:43:34 -0500 Subject: [PATCH] kohabug 2374 Corrects autoBarcode behavior in additem.pl There should be a documenation change at least for 3.0 to the effect that on systems not running JavaScript, 'incremental' is the only option available for autoBarcode although other options appear. A fix for this will hopefully appear in 3.2. Signed-off-by: Galen Charlton Signed-off-by: Joshua Ferraro --- cataloguing/additem.pl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl index ce5cb4ccce..da09dd091e 100755 --- a/cataloguing/additem.pl +++ b/cataloguing/additem.pl @@ -96,8 +96,10 @@ if ($op eq "additem") { my @indicator = $input->param('indicator'); my $xml = TransformHtmlToXml(\@tags,\@subfields,\@values,\@indicator,\@ind_tag, 'ITEM'); my $record=MARC::Record::new_from_xml($xml, 'UTF-8'); - # if autoBarcode is ON, calculate barcode... - if (C4::Context->preference('autoBarcode')) { + # if autoBarcode is set to 'incremental', calculate barcode... + # NOTE: This code is subject to change in 3.2 with the implemenation of ajax based autobarcode code + # NOTE: 'incremental' is the ONLY autoBarcode option available to those not using javascript + if (C4::Context->preference('autoBarcode') eq 'incremental') { my ($tagfield,$tagsubfield) = &GetMarcFromKohaField("items.barcode",$frameworkcode); unless ($record->field($tagfield)->subfield($tagsubfield)) { my $sth_barcode = $dbh->prepare("select max(abs(barcode)) from items"); -- 2.39.5