From 3635a596cfdd4351be302ba8d2ab3e7aa9c5d38c Mon Sep 17 00:00:00 2001 From: tipaul Date: Wed, 11 Feb 2004 08:35:31 +0000 Subject: [PATCH] synch'ing 2.0.0 branch and head --- C4/Biblio.pm | 36 ++++++++---- C4/BookShelves.pm | 28 ++++----- C4/Catalogue.pm | 7 ++- C4/Circulation/Circ2.pm | 6 +- C4/Members.pm | 3 - C4/Output.pm | 2 +- C4/Search.pm | 11 ++-- acqui.simple/addbiblio.pl | 15 ++--- acqui.simple/additem.pl | 2 +- acqui/addorder.pl | 25 +++++--- acqui/basket.pl | 1 + acqui/newbiblio.pl | 3 +- acqui/order.pl | 1 + admin/branches.pl | 1 - admin/itemtypes.pl | 15 +++-- admin/koha2marclinks.pl | 4 +- admin/thesaurus.pl | 4 +- catalogue-home.pl | 2 +- detail.pl | 3 +- detailprint.pl | 105 +++++++++++++++++++++++++++++++++ insertidata.pl | 87 +++++++++++++++++----------- memberentry.pl | 6 +- newmember.pl | 4 +- release_notes_191.txt | 19 ------ release_notes_192.txt | 77 ------------------------ release_notes_193.txt | 76 ------------------------ release_notes_200RC1.txt | 84 --------------------------- release_notes_200pre1.txt | 72 ----------------------- release_notes_200pre2.txt | 59 ------------------- release_notes_200pre3.txt | 79 ------------------------- release_notes_200pre4.txt | 29 ---------- release_notes_200pre5.txt | 76 ------------------------ search.pl | 13 +++-- shelves.pl | 119 +++++++++++++++++++------------------- thesaurus_popup.pl | 24 ++++++-- 35 files changed, 352 insertions(+), 746 deletions(-) create mode 100755 detailprint.pl delete mode 100644 release_notes_191.txt delete mode 100644 release_notes_192.txt delete mode 100644 release_notes_193.txt delete mode 100644 release_notes_200RC1.txt delete mode 100644 release_notes_200pre1.txt delete mode 100644 release_notes_200pre2.txt delete mode 100644 release_notes_200pre3.txt delete mode 100644 release_notes_200pre4.txt delete mode 100644 release_notes_200pre5.txt diff --git a/C4/Biblio.pm b/C4/Biblio.pm index b705088957..43a9edfabe 100644 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -566,7 +566,6 @@ sub MARCmoditem { if ($oldrecord eq $record) { return; } - # otherwise, skip through each subfield... my @fields = $record->fields(); # search old MARC item @@ -694,7 +693,7 @@ sub MARCdelsubfield { my ($dbh,$bibid,$tag,$tagorder,$subfield,$subfieldorder) = @_; $dbh->do("delete from marc_subfield_table where bibid='$bibid' and tag='$tag' and tagorder='$tagorder' - and subfieldcode='$subfield' and subfieldorder='$subfieldorder + and subfieldcode='$subfield' and subfieldorder='$subfieldorder' "); } @@ -1434,14 +1433,14 @@ sub OLDnewitems { homebranch = ?, holdingbranch = ?, price = ?, replacementprice = ?, replacementpricedate = NOW(), itemnotes = ?, - notforloan = ? + bulk =?, notforloan = ? "); $sth->execute($itemnumber, $item->{'biblionumber'}, $item->{'biblioitemnumber'},$barcode, $item->{'booksellerid'},$item->{'dateaccessioned'}, $item->{'homebranch'},$item->{'holdingbranch'}, $item->{'price'},$item->{'replacementprice'}, - $item->{'itemnotes'},$item->{'notforloan'}); + $item->{'itemnotes'},$item->{'bulk'},$item->{'notforloan'}); } else { $sth=$dbh->prepare("Insert into items set itemnumber = ?, biblionumber = ?, @@ -1450,14 +1449,14 @@ sub OLDnewitems { homebranch = ?, holdingbranch = ?, price = ?, replacementprice = ?, replacementpricedate = NOW(), itemnotes = ?, - notforloan = ? + bulk = ? , notforloan = ? "); $sth->execute($itemnumber, $item->{'biblionumber'}, $item->{'biblioitemnumber'},$barcode, $item->{'booksellerid'}, $item->{'homebranch'},$item->{'holdingbranch'}, $item->{'price'},$item->{'replacementprice'}, - $item->{'itemnotes'},$item->{'notforloan'}); + $item->{'itemnotes'},$item->{'bulk'},$item->{'notforloan'}); } if (defined $sth->errstr) { $error .= $sth->errstr; @@ -1471,8 +1470,8 @@ sub OLDmoditem { # my ($dbh,$loan,$itemnum,$bibitemnum,$barcode,$notes,$homebranch,$lost,$wthdrawn,$replacement)=@_; # my $dbh=C4Connect; $item->{'itemnum'}=$item->{'itemnumber'} unless $item->{'itemnum'}; - my $query="update items set barcode=?,itemnotes=? where itemnumber=?"; - my @bind = ($item->{'barcode'},$item->{'notes'},$item->{'itemnum'}); + my $query="update items set barcode=?,itemnotes=?,bulk=?,notforloan=? where itemnumber=?"; + my @bind = ($item->{'barcode'},$item->{'notes'},$item->{'bulk'},$item->{'notforloan'},$item->{'itemnum'}); if ($item->{'barcode'} eq ''){ $item->{'notforloan'}=0 unless $item->{'notforloan'}; $query="update items set notforloan=? where itemnumber=?"; @@ -1484,9 +1483,11 @@ $item->{'itemnum'}=$item->{'itemnumber'} unless $item->{'itemnum'}; itemnotes=?, homebranch=?, itemlost=?, - wthdrawn=? + wthdrawn=?, + bulk=?, + notforloan=?, where itemnumber=?"; - @bind = ($item->{'bibitemnum'},$item->{'barcode'},$item->{'notes'},$item->{'homebranch'},$item->{'lost'},$item->{'wthdrawn'},$item->{'itemnum'}); + @bind = ($item->{'bibitemnum'},$item->{'barcode'},$item->{'notes'},$item->{'homebranch'},$item->{'lost'},$item->{'wthdrawn'},$item->{'bulk'},$item->{'notforloan'},$item->{'itemnum'}); } if ($item->{'replacement'} ne ''){ $query=~ s/ where/,replacementprice='$item->{'replacement'}' where/; @@ -1556,7 +1557,6 @@ where biblioitemnumber = ?"); push(@bind,$data->{$temp}); } $query =~ s/\,$//; - warn "Q 1560 : $query"; my $sth2=$dbh->prepare($query); $sth2->execute(@bind); } # while @@ -1581,7 +1581,6 @@ sub OLDdelbiblio{ } #replacing the last , by ",?)" $query=~ s/\,$//; - warn "Q olddelbiblio : $query"; $sth=$dbh->prepare($query); $sth->execute(@bind); $sth->finish; @@ -2192,6 +2191,19 @@ Paul POULAIN paul.poulain@free.fr # $Id$ # $Log$ +# Revision 1.79 2004/02/11 08:40:09 tipaul +# synch'ing 2.0.0 branch and head +# +# Revision 1.78.2.3 2004/02/10 13:15:46 tipaul +# removing 2 warnings +# +# Revision 1.78.2.2 2004/01/26 10:38:06 tipaul +# dealing correctly "bulk" field +# +# Revision 1.78.2.1 2004/01/13 17:29:53 tipaul +# * minor html fixes +# * adding publisher in acquisition process (& ordering basket by publisher) +# # Revision 1.78 2003/12/09 15:57:28 tipaul # rolling back to working char_decode sub # diff --git a/C4/BookShelves.pm b/C4/BookShelves.pm index d545ee200b..55ff16677e 100755 --- a/C4/BookShelves.pm +++ b/C4/BookShelves.pm @@ -144,21 +144,17 @@ C<$env> is ignored. =cut #' sub AddToShelf { - my ($env, $itemnumber, $shelfnumber) = @_; - my $sth=$dbh->prepare("select * from shelfcontents - where shelfnumber=? and itemnumber=?"); - - $sth->execute($shelfnumber, $itemnumber); - if ($sth->rows) { -# already on shelf - } else { - $sth=$dbh->prepare("insert into shelfcontents - (shelfnumber, itemnumber, flags) values (?, ?, 0)"); + my ($env, $itemnumber, $shelfnumber) = @_; + return unless $itemnumber; + my $sth=$dbh->prepare("select * from shelfcontents where shelfnumber=? and itemnumber=?"); - # FIXME - The default for 'flags' is NULL. - # Why set it to 0? $sth->execute($shelfnumber, $itemnumber); - } + if ($sth->rows) { +# already on shelf + } else { + $sth=$dbh->prepare("insert into shelfcontents (shelfnumber, itemnumber, flags) values (?, ?, 0)"); + $sth->execute($shelfnumber, $itemnumber); + } } =item RemoveFromShelf @@ -243,6 +239,12 @@ END { } # module clean-up code here (global destructor) # # $Log$ +# Revision 1.12 2004/02/11 08:40:09 tipaul +# synch'ing 2.0.0 branch and head +# +# Revision 1.11.2.1 2004/02/06 14:16:55 tipaul +# fixing bugs in bookshelves management. +# # Revision 1.11 2003/12/15 10:57:08 slef # DBI call fix for bug 662 # diff --git a/C4/Catalogue.pm b/C4/Catalogue.pm index 699e541928..7fbb1bb2fd 100644 --- a/C4/Catalogue.pm +++ b/C4/Catalogue.pm @@ -111,7 +111,12 @@ sub basket { } else { $sth->execute($basketno); } - my @results = (); + $query.=" order by biblioitems.publishercode"; + my $sth=$dbh->prepare($query); + $sth->execute; + my @results; +# print $query; + my $i=0; while (my $data=$sth->fetchrow_hashref){ push(@results,$data); } diff --git a/C4/Circulation/Circ2.pm b/C4/Circulation/Circ2.pm index f7da836574..f2ffa29e6d 100755 --- a/C4/Circulation/Circ2.pm +++ b/C4/Circulation/Circ2.pm @@ -634,7 +634,7 @@ sub issuebook { renewbook($env,$dbh, $patroninformation->{'borrowernumber'}, $iteminformation->{'itemnumber'}); $noissue=1; } else { - $rejected=-1; + $rejected="Item on issue to this borrower, and you have chosen not to renew"; last SWITCH; } } @@ -668,14 +668,14 @@ sub issuebook { my ($resborrower, $flags)=getpatroninformation($env, $resbor,0); my $branches = getbranches(); my $branchname = $branches->{$res->{'branchcode'}}->{'branchname'}; - if ($responses->{2} eq '') { + if ($responses->{2} eq '' && $responses->{3} eq '') { $questionnumber=2; # FIXME - Assumes HTML $question="Waiting for $resborrower->{'firstname'} $resborrower->{'surname'} ($resborrower->{'cardnumber'}) at $branchname \nAllow issue?"; $defaultanswer='N'; last SWITCH; } elsif ($responses->{2} eq 'N') { - $rejected=-1; + $rejected="Issue cancelled"; last SWITCH; } else { if ($responses->{3} eq '') { diff --git a/C4/Members.pm b/C4/Members.pm index 4fb1f23d5b..dbcb262741 100644 --- a/C4/Members.pm +++ b/C4/Members.pm @@ -66,9 +66,6 @@ sub fixup_cardnumber ($) { my($cardnumber) = @_; my $autonumber_members = C4::Context->boolean_preference('autoMemberNum'); $autonumber_members = 0 unless defined $autonumber_members; - - warn "autoMemberNum is $autonumber_members\n"; - # Find out whether member numbers should be generated # automatically. Should be either "1" or something else. # Defaults to "0", which is interpreted as "no". diff --git a/C4/Output.pm b/C4/Output.pm index 2380af9586..4f308c7604 100644 --- a/C4/Output.pm +++ b/C4/Output.pm @@ -75,7 +75,7 @@ printable string. #FIXME: this is a quick fix to stop rc1 installing broken #Still trying to figure out the correct fix. -my $path = C4::Context->config('intrahtdocs')."/intranet-tmpl/default/en/includes/"; +my $path = C4::Context->config('intrahtdocs')."/default/en/includes/"; #--------------------------------------------------------------------------------------------------------- # FIXME - POD diff --git a/C4/Search.pm b/C4/Search.pm index b6244cc228..753ab91d50 100755 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -1145,7 +1145,7 @@ sub CatSearch { } } else { if ($type eq 'subject'){ - $query .= "group by subject order by subject "; + $query .= "order by subject group by subject "; } } my $sth=$dbh->prepare($query); @@ -1349,11 +1349,10 @@ sub ItemInfo { $data->{'branchname'} = $bdata->{'branchname'}; } - my $class = $data->{'classification'}; + my $class = $data->{'classification'};# FIXME : $class is useless my $dewey = $data->{'dewey'}; $dewey =~ s/0+$//; - if ($dewey eq "000.") { $dewey = "";}; # FIXME - "000" is general - # books about computer science + if ($dewey eq "000.") { $dewey = "";}; # FIXME - "000" is general books about computer science if ($dewey < 10){$dewey='00'.$dewey;} if ($dewey < 100 && $dewey > 10){$dewey='0'.$dewey;} if ($dewey <= 0){ @@ -1377,7 +1376,7 @@ sub ItemInfo { } $sth->finish; #FIXME: ordering/indentation here looks wrong - my $sth2=$dbh->prepare("Select * from aqorders where biblionumber=>"); + my $sth2=$dbh->prepare("Select * from aqorders where biblionumber=?"); $sth2->execute($biblionumber); my $data; my $ocount; @@ -1948,7 +1947,7 @@ sub allissues { $query.=" limit $limit"; } #print $query; - my $sth=$dbh->prepare(""); + my $sth=$dbh->prepare($query); $sth->execute($bornum); my @result; my $i=0; diff --git a/acqui.simple/addbiblio.pl b/acqui.simple/addbiblio.pl index ac17600ce9..a3960476eb 100755 --- a/acqui.simple/addbiblio.pl +++ b/acqui.simple/addbiblio.pl @@ -160,6 +160,7 @@ sub build_authorized_values_list ($$$$$) { =cut sub create_input () { my ($tag,$subfield,$value,$i,$tabloop,$rec,$authorised_values_sth) = @_; + $value =~ s/"/"/g; my $dbh = C4::Context->dbh; my %subfield_data; $subfield_data{tag}=$tag; @@ -196,7 +197,7 @@ sub build_tabs ($$$$) { my $i=0; my $authorised_values_sth = $dbh->prepare("select authorised_value,lib from authorised_values - where category=? order by authorised_value"); + where category=? order by lib"); # loop through each tab 0 through 9 for (my $tabloop = 0; $tabloop <= 9; $tabloop++) { @@ -212,8 +213,8 @@ sub build_tabs ($$$$) { if ($tag<10) { my $value=$field->data(); my $subfield="@"; - push(@subfields_data, &create_input($tag,$subfield,char_decode($value,$encoding),$i,$tabloop,$record,$authorised_values_sth)) - unless ($tagslib->{$tag}->{$subfield}->{tab} ne $tabloop); + next if ($tagslib->{$tag}->{$subfield}->{tab} ne $tabloop); + push(@subfields_data, &create_input($tag,$subfield,char_decode($value,$encoding),$i,$tabloop,$record,$authorised_values_sth)); $i++; } else { my @subfields=$field->subfields(); @@ -230,8 +231,8 @@ sub build_tabs ($$$$) { foreach my $subfield (sort( keys %{$tagslib->{$tag}})) { next if subfield_is_koha_internal_p($subfield); next if ($tagslib->{$tag}->{$subfield}->{tab} ne $tabloop); - next if ($tag > 10 && defined($record->field($tag)->subfield($subfield))); - next if ($tag < 10 && defined($record->field($tag)->data())); + next if ($tag<10); + next if (defined($record->field($tag)->subfield($subfield))); push(@subfields_data, &create_input($tag,$subfield,'',$i,$tabloop,$record,$authorised_values_sth)); $i++; } @@ -239,7 +240,7 @@ sub build_tabs ($$$$) { my %tag_data; $tag_data{tag} = $tag; $tag_data{tag_lib} = $tagslib->{$tag}->{lib}; - $tag_data{indicator} = $indicator; + $tag_data{indicator} = $record->field($tag)->indicator(1). $record->field($tag)->indicator(2) if ($tag>=10); $tag_data{subfield_loop} = \@subfields_data; push (@loop_data, \%tag_data); } @@ -324,7 +325,7 @@ my ($template, $loggedinuser, $cookie) query => $input, type => "intranet", authnotrequired => 0, - flagsrequired => {catalogue => 1}, + flagsrequired => {editcatalogue => 1}, debug => 1, }); diff --git a/acqui.simple/additem.pl b/acqui.simple/additem.pl index 3e0afab784..b19243ffda 100755 --- a/acqui.simple/additem.pl +++ b/acqui.simple/additem.pl @@ -274,4 +274,4 @@ $template->param(item_loop => \@item_value_loop, foreach my $error (@errors) { $template->param($error => 1); } -output_html_with_http_headers $input, $cookie, $template->output; \ No newline at end of file +output_html_with_http_headers $input, $cookie, $template->output; diff --git a/acqui/addorder.pl b/acqui/addorder.pl index 381bb59c13..6bf696b719 100755 --- a/acqui/addorder.pl +++ b/acqui/addorder.pl @@ -48,7 +48,7 @@ my ($template, $loggedinuser, $cookie) my $existing=$input->param('existing'); my $title=$input->param('title'); my $author=$input->param('author'); -my $copyright=$input->param('copyright'); +my $copyrightdate=$input->param('copyrightdate'); my $isbn=$input->param('ISBN'); my $itemtype=$input->param('format'); my $ordnum=$input->param('ordnum'); @@ -71,21 +71,22 @@ my $gst=$input->param('GST'); my $orderexists=$input->param('orderexists'); my $budget=$input->param('budget'); my $cost=$input->param('cost'); -my$sub=$input->param('sub'); +my $sub=$input->param('sub'); my $invoice=$input->param('invoice'); - +my $publishercode = $input->param('publishercode'); if ($quantity ne '0'){ #check to see if biblio exists if ($existing eq 'no'){ #if it doesnt create it $bibnum = &newbiblio({ title => $title?$title:"", author => $author?$author:"", - copyright => $copyright?$copyright:"", + copyrightdate => $copyrightdate?$copyrightdate:"", series => $series?$series:"", }); $bibitemnum = &newbiblioitem({ biblionumber => $bibnum, itemtype => $itemtype?$itemtype:"", - isbn => $isbn?$isbn:"" + isbn => $isbn?$isbn:"", + publishercode => $publishercode?$publishercode:"", }); if ($title) { newsubtitle($bibnum,$title); @@ -97,14 +98,22 @@ if ($quantity ne '0'){ if ($bibitemnum eq '' || $itemtype ne $oldtype){ $bibitemnum= &newbiblioitem({ biblionumber => $bibnum, itemtype => $itemtype?$itemtype:"", - isbn => $isbn?$isbn:"" }); + isbn => $isbn?$isbn:"" , + publishercode => $publishercode?$publishercode:"", + }); + } else { + &modbibitem({biblioitemnumber => $bibitemnum, + isbn => $isbn, + publishercode => $publishercode, + }); } &modbiblio({ biblionumber => $bibnum, title => $title?$title:"", author => $author?$author:"", - copyrightdate => $copyright?$copyright:"", - series => $series?$series:"" }); + copyrightdate => $copyrightdate?$copyrightdate:"", + series => $series?$series:"" }, + ); } if ($orderexists ne '') { modorder($title,$ordnum,$quantity,$listprice,$bibnum,$basketno,$supplier,$who,$notes,$bookfund,$bibitemnum,$rrp,$ecost,$gst,$budget,$cost,$sub,$invoice); diff --git a/acqui/basket.pl b/acqui/basket.pl index b3cfb8405e..e1f4824b4c 100755 --- a/acqui/basket.pl +++ b/acqui/basket.pl @@ -77,6 +77,7 @@ for (my $i=0;$i<$count;$i++){ $toggle=0; } $line{ordernumber} = $results[$i]->{'ordernumber'}; + $line{publishercode} = $results[$i]->{'publishercode'}; $line{isbn} = $results[$i]->{'isbn'}; $line{booksellerid} = $results[$i]->{'booksellerid'}; $line{basket}=$basket; diff --git a/acqui/newbiblio.pl b/acqui/newbiblio.pl index 90fe406be7..85abcc8f80 100755 --- a/acqui/newbiblio.pl +++ b/acqui/newbiblio.pl @@ -169,7 +169,8 @@ $template->param( existing => $biblio, rrp => $data->{'rrp'}, ecost => $data->{'ecost'}, notes => $data->{'notes'}, - barcode => $data->{'barcode'},); + barcode => $data->{'barcode'}, + publishercode => $data->{'publishercode'}); output_html_with_http_headers $input, $cookie, $template->output; diff --git a/acqui/order.pl b/acqui/order.pl index 33ce8e883c..e11db2a41c 100755 --- a/acqui/order.pl +++ b/acqui/order.pl @@ -63,6 +63,7 @@ for (my $i=0; $i<$count; $i++) { } $line{id} =$suppliers[$i]->{'id'}; $line{name} = $suppliers[$i]->{'name'}; + $line{active} = $suppliers[$i]->{'active'}; $line{total} = $orders->[0]->{'count(*)'}; $line{authorisedby} = $orders->[0]->{'authorisedby'}; $line{entrydate} = $orders->[0]->{'entrydate'}; diff --git a/admin/branches.pl b/admin/branches.pl index 42c3d66561..808f19a84a 100755 --- a/admin/branches.pl +++ b/admin/branches.pl @@ -78,7 +78,6 @@ if ($op) { else => 1); # we show only the TMPL_VAR names $op } $template->param(action => $script_name); - if ($op eq 'add') { # If the user has pressed the "add new branch" button. heading("Branches: Add Branch"); diff --git a/admin/itemtypes.pl b/admin/itemtypes.pl index bb7a7fb78f..619fbe2e20 100755 --- a/admin/itemtypes.pl +++ b/admin/itemtypes.pl @@ -96,7 +96,7 @@ if ($op eq 'add_form') { my $data; if ($itemtype) { my $dbh = C4::Context->dbh; - my $sth=$dbh->prepare("select itemtype,description,loanlength,renewalsallowed,rentalcharge from itemtypes where itemtype=?"); + my $sth=$dbh->prepare("select itemtype,description,loanlength,renewalsallowed,rentalcharge,notforloan from itemtypes where itemtype=?"); $sth->execute($itemtype); $data=$sth->fetchrow_hashref; $sth->finish; @@ -105,14 +105,16 @@ if ($op eq 'add_form') { description => $data->{'description'}, loanlength => $data->{'loanlength'}, renewalsallowed => $data->{'renewalsallowed'}, - rentalcharge => $data->{'rentalcharge'}); + rentalcharge => $data->{'rentalcharge'}, + notforloan => $data->{'notforloan'} + ); ; # END $OP eq ADD_FORM ################## ADD_VALIDATE ################################## # called by add_form, used to insert/modify data in DB } elsif ($op eq 'add_validate') { my $dbh = C4::Context->dbh; - my $query = "replace itemtypes (itemtype,description,loanlength,renewalsallowed,rentalcharge) values ("; + my $query = "replace itemtypes (itemtype,description,loanlength,renewalsallowed,rentalcharge,notforloan) values ("; $query.= $dbh->quote($input->param('itemtype')).","; $query.= $dbh->quote($input->param('description')).","; $query.= $dbh->quote($input->param('loanlength')).","; @@ -121,7 +123,12 @@ if ($op eq 'add_form') { } else { $query.= "1,"; } - $query.= $dbh->quote($input->param('rentalcharge')).")"; + $query.= $dbh->quote($input->param('rentalcharge')).","; + if ($input->param('notforloan') ne 1) { + $query.= "0)"; + } else { + $query.= "1)"; + } my $sth=$dbh->prepare($query); $sth->execute; $sth->finish; diff --git a/admin/koha2marclinks.pl b/admin/koha2marclinks.pl index 56e0cf9744..0a64bc700f 100755 --- a/admin/koha2marclinks.pl +++ b/admin/koha2marclinks.pl @@ -106,8 +106,8 @@ if ($op eq 'add_form') { $fields{$kohafield}->{liblibrarian} = $liblibrarian; } #XXX: This might not work. Maybe should use a DBI call instead of SHOW COLUMNS - my $sth2=$dbh->prepare("SHOW COLUMNS from ?"); - $sth2->execute($tablename); + my $sth2=$dbh->prepare("SHOW COLUMNS from $tablename"); + $sth2->execute; my $toggle="white"; my @loop_data = (); diff --git a/admin/thesaurus.pl b/admin/thesaurus.pl index 69f7aca1c3..c1aa2181d8 100755 --- a/admin/thesaurus.pl +++ b/admin/thesaurus.pl @@ -257,10 +257,10 @@ if ($op eq 'add_form') { branch => $branch, father => $father); if ($offset>0) { - $template->param(previous => "<< Prev"); + $template->param(previous => "$script_name?branch=$branch&search_category=$search_category&searchstring=$searchstring&offset=$prevpage"); } if ($pagesize<$count) { - $template->param(next => "Next >>"); + $template->param(next => "$script_name?branch=$branch&search_category=$search_category&searchstring=$searchstring&offset=$nextpage"); } } #---- END $OP eq DEFAULT diff --git a/catalogue-home.pl b/catalogue-home.pl index 75d908b0ac..428724c86a 100755 --- a/catalogue-home.pl +++ b/catalogue-home.pl @@ -16,7 +16,7 @@ my ($template, $loggedinuser, $cookie) query => $query, type => "intranet", authnotrequired => 0, - flagsrequired => {parameters => 1}, + flagsrequired => {catalogue => 1}, debug => 1, }); diff --git a/detail.pl b/detail.pl index 82d57e2738..2932a76bce 100755 --- a/detail.pl +++ b/detail.pl @@ -95,7 +95,8 @@ $template->param(startfrom => $startfrom+1, WEB_RESULTS => $webarray, SITE_RESULTS => $sitearray, loggedinuser => $loggedinuser, - biblionumber => $biblionumber); + biblionumber => $biblionumber, + ); output_html_with_http_headers $query, $cookie, $template->output; diff --git a/detailprint.pl b/detailprint.pl new file mode 100755 index 0000000000..dd22665ecd --- /dev/null +++ b/detailprint.pl @@ -0,0 +1,105 @@ +#!/usr/bin/perl +# NOTE: Use standard 8-space tabs for this file (indents are 4 spaces) + +# Copyright 2000-2002 Katipo Communications +# +# This file is part of Koha. +# +# Koha is free software; you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# Koha is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along with +# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, +# Suite 330, Boston, MA 02111-1307 USA + +use HTML::Template; +use strict; +require Exporter; +use C4::Context; +use C4::Output; # contains gettemplate +use CGI; +use C4::Search; +use C4::Auth; +use C4::Interface::CGI::Output; +use C4::Date; + +my $query=new CGI; +my $type=$query->param('type'); +($type) || ($type='intra'); + +my $biblionumber=$query->param('bib'); + +# change back when ive fixed request.pl +my @items = ItemInfo(undef, $biblionumber, $type); +my $norequests = 1; +foreach my $itm (@items) { + $norequests = 0 unless $itm->{'notforloan'}; +} + + + +my $dat=bibdata($biblionumber); +my ($authorcount, $addauthor)= &addauthor($biblionumber); +my ($webbiblioitemcount, @webbiblioitems) = &getwebbiblioitems($biblionumber); +my ($websitecount, @websites) = &getwebsites($biblionumber); + +$dat->{'count'}=@items; +$dat->{'norequests'} = $norequests; + +$dat->{'additional'}=$addauthor->[0]->{'author'}; +for (my $i = 1; $i < $authorcount; $i++) { + $dat->{'additional'} .= "|" . $addauthor->[$i]->{'author'}; +} # for + +my @results; + +$results[0]=$dat; + +my $resultsarray=\@results; +my $itemsarray=\@items; +my $webarray=\@webbiblioitems; +my $sitearray=\@websites; + +my $startfrom=$query->param('startfrom'); +($startfrom) || ($startfrom=0); + +my ($template, $loggedinuser, $cookie) = get_template_and_user({ + template_name => ('catalogue/detailprint.tmpl'), + query => $query, + type => "intranet", + authnotrequired => ($type eq 'opac'), + flagsrequired => {catalogue => 1}, + }); + +my $count=1; + +# now to get the items into a hash we can use and whack that thru + + +my $nextstartfrom=($startfrom+20<$count-20) ? ($startfrom+20) : ($count-20); +my $prevstartfrom=($startfrom-20>0) ? ($startfrom-20) : (0); +$template->param(startfrom => $startfrom+1, + endat => $startfrom+20, + numrecords => $count, + nextstartfrom => $nextstartfrom, + prevstartfrom => $prevstartfrom, + BIBLIO_RESULTS => $resultsarray, + ITEM_RESULTS => $itemsarray, + WEB_RESULTS => $webarray, + SITE_RESULTS => $sitearray, + loggedinuser => $loggedinuser, + biblionumber => $biblionumber, + ); + +output_html_with_http_headers $query, $cookie, $template->output; + + +# Local Variables: +# tab-width: 8 +# End: diff --git a/insertidata.pl b/insertidata.pl index f2558fe3ea..771331e59d 100755 --- a/insertidata.pl +++ b/insertidata.pl @@ -39,48 +39,69 @@ my $keyfld; my $keyval; my $problems; my $env; +my $sth2; foreach my $key (@names){ $data{$key}=$input->param($key); } my $dbh = C4::Context->dbh; -my $query="Select * from borrowers where borrowernumber=$data{'borrowernumber'}"; -my $sth=$dbh->prepare($query); -$sth->execute; +my $sth=$dbh->prepare("Select * from borrowers where borrowernumber=?"); +$sth->execute($data{'borrowernumber'}); if (my $data2=$sth->fetchrow_hashref){ - $query="update borrowers set title='$data{'title'}',expiry='$data{'expiry'}', - cardnumber='$data{'cardnumber_institution'}',sex='$data{'sex'}',ethnotes='$data{'ethnicnotes'}', - streetaddress='$data{'address'}',faxnumber='$data{'faxnumber'}',firstname='$data{'firstname'}', - altnotes='$data{'altnotes'}',dateofbirth='$data{'dateofbirth'}',contactname='$data{'contactname'}', - emailaddress='$data{'emailaddress'}',dateenrolled='$data{'joining'}',streetcity='$data{'streetcity'}', - altrelationship='$data{'altrelationship'}',othernames='$data{'othernames'}',phoneday='$data{'phoneday'}', - city='$data{'city'}',area='$data{'area'}',phone='$data{'phone'}', - borrowernotes='$data{'borrowernotes'}',altphone='$data{'altphone'}',surname='$data{'institution_name'}', - initials='$data{'initials'}',physstreet='$data{'streetaddress'}',ethnicity='$data{'ethnicity'}', - gonenoaddress='$data{'gna'}',lost='$data{'lost'}',debarred='$data{'debarred'}', - textmessaging='$data{'textmessaging'}', branchcode = '$data{'branchcode'}', - zipcode = '$data{'zipcode'}',homezipcode='$data{'homezipcode'}' - where borrowernumber=$data{'borrowernumber'}"; + $sth2=$dbh->prepare("update borrowers set title=?,expiry=?, + cardnumber=?,sex=?,ethnotes=?, + streetaddress=?,faxnumber=?,firstname=?, + altnotes=?,dateofbirth=?,contactname=?, + emailaddress=?,dateenrolled=?,streetcity=?, + altrelationship=?,othernames=?,phoneday=?, + city=?,area=?,phone=?, + borrowernotes=?,altphone=?,surname=?, + initials=?,physstreet=?,ethnicity=?, + gonenoaddress=?,lost=?,debarred=?, + textmessaging=?, branchcode = ?, + zipcode = ?,homezipcode=? + where borrowernumber=?"); + $sth2->execute($data{'title'},$data{'expiry'}, + $data{'cardnumber_institution'},$data{'sex'},$data{'ethnicnotes'}, + $data{'address'},$data{'faxnumber'},$data{'firstname'}, + $data{'altnotes'},$data{'dateofbirth'},$data{'contactname'}, + $data{'emailaddress'},$data{'joining'},$data{'streetcity'}, + $data{'altrelationship'},$data{'othernames'},$data{'phoneday'}, + $data{'city'},$data{'area'},$data{'phone'}, + $data{'borrowernotes'},$data{'altphone'},$data{'institution_name'}, + $data{'initials'},$data{'streetaddress'},$data{'ethnicity'}, + $data{'gna'},$data{'lost'},$data{'debarred'}, + $data{'textmessaging'},$data{'branchcode'}, + $data{'zipcode'},$data{'homezipcode'}, + $data{'borrowernumber'}); } else { my $surname=$data{'institution_name'}; - $query="insert into borrowers (title,expiry,cardnumber,sex,ethnotes,streetaddress,faxnumber, - firstname,altnotes,dateofbirth,contactname,emailaddress,dateenrolled,streetcity, - altrelationship,othernames,phoneday,categorycode,city,area,phone,borrowernotes,altphone,surname, - initials,ethnicity,borrowernumber,guarantor,school,branchcode,zipcode,homezipcode) - values ('','$data{'expiry'}','$data{'cardnumber_institution'}', - '','$data{'ethnotes'}','$data{'address'}','$data{'faxnumber'}', - '$data{'firstname'}','$data{'altnotes'}','','$data{'contactname'}', - '$data{'emailaddress'}', - now(),'$data{'streetcity'}','$data{'altrelationship'}','$data{'othernames'}', - '$data{'phoneday'}','I','$data{'city'}','$data{'area'}','$data{'phone'}', - '$data{'borrowernotes'}','$data{'altphone'}','$surname','$data{'initials'}', - '$data{'ethnicity'}','$data{'borrowernumber'}','','','$data{'branchcode'}','$data{'zipcode'}','$data{'homezipcode'}')"; + # note for code reading : 5 on each line + $sth2=$dbh->prepare("insert into borrowers ( + title, expiry, cardnumber, sex, ethnotes, + streetaddress, faxnumber, firstname, altnotes, dateofbirth, + contactname, emailaddress, dateenrolled, streetcity, altrelationship, + othernames, phoneday, categorycode, city, area, + phone, borrowernotes, altphone, surname, initials, + ethnicity, borrowernumber,guarantor, school, branchcode, + zipcode, homezipcode) + values ( ?,?,?,?,?, + ?,?,?,?,?, + ?,?,now(),?,?, + ?,?,?,?,?, + ?,?,?,?,?, + ?,?,?,?,?, + ?,? + )"); + $sth2->execute('', $data{'expiry'}, $data{'cardnumber_institution'}, '', $data{'ethnotes'}, + $data{'address'}, $data{'faxnumber'}, $surname, $data{'altnotes'}, '', + $data{'contactname'},$data{'emailaddress'}, $data{'streetcity'}, $data{'altrelationship'}, # only 4 because of now() + $data{'othernames'}, $data{'phoneday'}, 'I', $data{'city'}, $data{'area'}, + ''.$data{'phone'}, $data{'borrowernotes'}, $data{'altphone'}, $surname, ''.$data{'initials'}, + $data{'ethnicity'}, $data{'borrowernumber'}, '', '', $data{'branchcode'}, + $data{'zipcode'}, $data{'homezipcode'}); } -#print $query; -my $sth2=$dbh->prepare($query); -warn "==> $query"; -$sth2->execute; $sth2->finish; -#$sth->finish; +$sth->finish; print $input->redirect("/cgi-bin/koha/moremember.pl?bornum=$data{'borrowernumber'}"); diff --git a/memberentry.pl b/memberentry.pl index 2fcf7fad0c..21b0b3d640 100755 --- a/memberentry.pl +++ b/memberentry.pl @@ -59,10 +59,10 @@ my $delete=$input->param('delete'); if ($delete){ print $input->redirect("/cgi-bin/koha/deletemem.pl?member=$member"); } else { # this else goes down the whole script - if ($type ne 'Add'){ - $template->param( header => 'Update Member Details'); # bad templating style + if ($type eq 'Add'){ + $template->param( addAction => 1); } else { - $template->param( header => 'Add New Member'); + $template->param( addAction =>0); } my $data=borrdata('',$member); diff --git a/newmember.pl b/newmember.pl index 4de8406a97..01aafd434b 100755 --- a/newmember.pl +++ b/newmember.pl @@ -126,9 +126,9 @@ if ($ok == 0) { $name.="$data{'surname'} ( $data{'firstname'}, $data{'initials'})"; my $sex; if ($data{'sex'} eq 'M'){ - $sex="Male"; + $sex=1; } else { - $sex="Female"; + $sex=0; } if ($data{'joining'} eq ''){ $data{'joining'}=ParseDate('today'); diff --git a/release_notes_191.txt b/release_notes_191.txt deleted file mode 100644 index 55ebf93610..0000000000 --- a/release_notes_191.txt +++ /dev/null @@ -1,19 +0,0 @@ -RELEASE NOTES -* standard acquisition and MARC cataloguing now both useable at the same time. -* MANY bugfixes. -* almost everything now templated. A few admin scripts still to template. -* inclusion of some pictures to say "add", "modify", "delete" in many places. -* the koha-html cvs tree is now UNUSED, and no mode included in this release. the koha cvs project contains everything. - -TODO -* z39.50 support. A port from the 1.2.x z39.50 support needs to be done. Should be quick, -* fixing bugs. If you find a bug in this version, please take the plane and go for a trip to : bugs.koha.org - -FEATURE FREEZE -feature freeze is there... only z39.50 will be added until 2.0RC1, which should be the next release ! - -KNOWN BUGS *IMPORTANT* : -* koha does NOT work with MARC::Record 1.12. It works fine with MARC::Record 0.93, and maybe with other versions. -* repeted subfields in MARC/iso2709 works poorly : only the 1st subfield is stored, other are ignored. At least, the 1st is right ! (in the 1.9.0, the 1st was buggied by other subfields too) -* In the MARC search, the "not" flag does not work : the result of the query is very strange ! -* en and fr are the only languages well supported in this version. Other translator teams are waiting for more stable templates :-) \ No newline at end of file diff --git a/release_notes_192.txt b/release_notes_192.txt deleted file mode 100644 index 6dff48c339..0000000000 --- a/release_notes_192.txt +++ /dev/null @@ -1,77 +0,0 @@ -RELEASE NOTES -============= -* koha does NOT work with MARC::Record 1.12. It works fine with MARC::Record 0.93, and maybe with other versions. -* In the MARC search, the "not" flag does not work : the result of the query is very strange ! -* en and fr are the only languages well supported in this version. Other translator teams are waiting for more stable templates. -* see interim.txt, which contains install notes - -BUG FIXED (see bugs.koha.org for more infos) -========= -XXX Error in biblio modification -248 French page titles in English language Koha - Members -227 Confirm newmember lists items you can't enter -254 Next link goes to the wrong page -230 Wrong DOB entry information given in add member -234 The buildrelease script or the installer script does not kno -263 HLT isms still on Add Member page -278 Internal Server Error on Categories -249 Addl. French titles in English language Koha -228 Modifying member info scrambles DOB -255 Form fields too small for text -231 z3950servers.pl mistitled branches admin -260 Error during install - the sample data doesn't load, -235 Koha login link listed twice and I'm already logged in -266 HLT isms on member details page. -244 stats.pl needs to be templated -226 Bookfund admin page - rows not lining up under heading -250 Parameters titled Catalogue -229 Members birth years 1913 and earlier are changed to 2000's -257 Fields named wrong on modify budget page -233 OPAC - User update doesn't work. -262 Ethnicity select list still in add a member page -240 Search results page - has Log In to Koha link - already log -277 Internal Server Error in Add Institution and Add Child -291 Joining date dateformat not consistent -241 Extra td in html creates an extra little rectangle. -259 Enter stopwords field too long -290 Missing image seen briefly on log-in page. - -IMPROVEMENTS -============= -* An About page has been added, showing versions of Koha, Apache, MySQL, Perl -* repetable subfields now correctly stored : enter a repeted subfield in the form, separated by | and watch the result in the catalogue. - -Bugs still opens in bugs.koha.org -======================= -196 user input not checked for HTML tags -293 Error Issuing Book - 1 -191 View Account cannot see charges -264 Day phone not output on confirm record. -208 Confirmation screen for addition of institutional member is -236 Reserve book on future date doesn't work or copy is wrong -242 Current loan output is blank -193 Multiple search criteria in OPAC gives misleading feedback -267 Day phone not displayed on update details -237 Can request to reserve a book with an end reserve date in t -130 Branch data entry form has unlabelled check box -258 Budget treats a comma as a period. -223 Editing budget creates additinal budget for same book fund. -239 Issue limit doesn't work - able to check out more items than -251 Wrong title for image -276 Tables overlap when there are a lot of patron notes. -297 Images missing on View Account page -252 Add category page titled add authorised value -245 No mechanism provided for changing the Locations -275 Wrong size text boxes in admin/itemtypes -300 Reading record - full output same as regular reading record -292 missing image is seen when mousing to the left of search. -298 In circulation Acquistion & MARC links are blue not grey -217 querying with barcode to modify biblio - -TODO -===== -* script for migration from koha 1.2.x -> 2.0.0 -* script to upload MARC datas and items in active DB -* script to upload CSV biblio and items in active DB -* z3950 client - diff --git a/release_notes_193.txt b/release_notes_193.txt deleted file mode 100644 index 6dfb58dba5..0000000000 --- a/release_notes_193.txt +++ /dev/null @@ -1,76 +0,0 @@ -RELEASE NOTES -============= -This release add a lot of bugfixes, a 1st z3950 support, and a script for migration from previous ILS. - -FEATURE FREEZE ! ---------- -This version is the last version with new features before 2.0. -Please, report bugs on bugs.koha.org, and feel free to fix them (through patch or cvs commit) - - -PACKAGE NEEDED : ---------- -Update your MARC::Record to get the latest version (1.26). -Koha won't work with old versions, and bulkmarcimport.pl need MARC::Batch.pm, whichi is recent. -MARC::Record 1.25 works to, but reports hundred of warnings in error_log. pls upgrage to 1.26 ! - - -DB modifications : ---------- -* the marc_breeding table has been modified. A row "encoding" varchar(40) has been added. It's used to manage character encoding. -* the z3950_servers table has been modified. A row "syntax" varchar(40) has been added. It's used to manage character encoding. - -z3950 : ---------- -* the z3950 script in admin part of Koha has been fixed and can be used and translated. -* z3950 cataloguing : when you reach the MARC-cataloguing screen, a new link appear : z3950 search. -* If you click on this link, a popup appears, and the search begins. The window is refreshed every 2 seconds, until all servers answered. -* The avaible records are shown in the popup. Click on the one you want, and... the popup closes and the biblio is copied in the cataloguing screen. - -This works ONLY IF the z3950 daemon is launched. It's located at $kohadir/scripts/z3950daemon/ -* MODIFY the scripts to fit you directory structure. -* Warning : due to a small bug, processqueue is in $kohadir/cgi-bin/z3950/ directory, not in the script one. -* Start daemon in a non-X shell, or launch processqueue in a shell, and KEEP IT OPEN. - -iso2709 file import : ---------- -This tools is very important and was waiting by libraries that plans to migrate from a previous ILS. -VERY IMPORTANT : -BEFORE using this script, take care of your MARC parameters, and check them twice. If they are wrong, you will get wrong results... - -It's located (in CVS tree) at $koharoot/misc/bulkmarcimport.pl - -It loads an iso2709 file into the ACTIVE Database. My 1st tests on sample files shows it works quite fine. -Feel free to try it. -How it works ? enter ./bulkmarcimport in a console, and look. - -KNOWN LIMIT : If the barcode of an item does not exists, the scripts report an SQL error, and continue. BUT the corresponding item is not in the non-marc db, so it can't be requested or loaned. - -sample file : ---------- -The sample file has been removed from this release, as it's buggy (no MARC datas, making it quite useless) - -Templates & translations : ---------- -* Most images have been dropped from templates (all -except bugs- in french templates -* english is uptodate, and french should be too. - -BUG FIXED (see bugs.koha.org for more infos) -========= -A lot... (around 35). -Thanks to Mike that fixed a lot, -Steve that fixes some, -MJ Ray that upgraded the installer for non-root install, -and Chris that fixed some and begins backport of non-marc stuff from 1.2 - -Bugs still open in bugs.koha.org -======================= -A lot... (around 60. some being really trivial to fix, some being more important) - -TODO -===== -* some GUI reordering, as planned with Rachel from Katipo and others (paul & others) -* finishing backport of non-marc cataloguing & non-marc simple acquisition from 1.2 version (chris) -* bug fixes (everybody) -* cleaning z3950 old searches (more than 1 hour/day old ?) (paul) - diff --git a/release_notes_200RC1.txt b/release_notes_200RC1.txt deleted file mode 100644 index e5566be425..0000000000 --- a/release_notes_200RC1.txt +++ /dev/null @@ -1,84 +0,0 @@ -RELEASE NOTES -============= -This version of Koha is the first in the 2.0 "stable" series. -It does not mean that it has no bugs, but least five libraries are using it and don't encounter impossible problems. -If you want to adopt Koha, please do, but you're warned that this release candidate version may still have some bugs and missing features. If you test it and let us know about any we haven't seen yet, it will help us to fix them. - - -INSTALLATION - -* Download the package -* tar xvfz koha-version.tar.gz -* cd koha-version -* ./installer.pl -* Follow the instructions - - -UPGRADE from previous 2.0.0preX version - -* Download the package -* tar xvfz koha-version.tar.gz -* cd koha-version -* ./koha.upgrade -* Follow the instructions - - -UPGRADE from previous 1.2.x version - -This is the first koha 2 version that contains this upgrade. -It may have bugs. Please take backups and be sure that you can go back to your previous version if needed. -Otherwise, WAIT for 2.0.0RC2 or later. - -* Download the package -* tar xvfz koha-version.tar.gz -* cd koha-version -* ./koha.upgrade -* Follow the instructions -* Open a browser to Koha -* Go to Parameters >> Marc structure option and Koha-MARC links option. -* Modify default MARC structure to fit your needs -* Open a command-line on the koha server -* Enter : -cd /path/to/koha/misc -export PERL5LIB=/path/to/koha/modules -./koha2marc.pl -This "copies" the old DB to the new MARC one. -Now Koha 2.0.0RC1 is ready for you to test. - - -BUGFIXES/IMPROVEMENTS - -BUGS FIXED: -* biblio deletion now works in MARC & non MARC tables as well. tools for deletion added in MARCeditor (biblio & item deletion) -* bug in circulation that breaked the 1st circ screen -* biblio subject adding when more than 1 subject. -* bibliothesaurus : a fulltext index was missing. The updatedatabase script now creates it. -* 621 ; Returns not marking reserves waiting -* 649 : french word in english template -* 639 : unclosed
& other HTML error -* 592 : Re-issuing book does not renew correctly -* 654 : missing image -* 535 : major display problem with issues -* 678 : odd case usage in opac -* 634 : MARC21/USMARC confusion -* 385 : crash when trying to open an empty MARC::Record -* 564 : duplicate member number - -IMPROVEMENTS: -* removing some unused code -* improved polish version -* improved installer & updater for non "standard" locations (/etc...) -* adding the classification column to the variables available to the template -* new plugin for unimarc, for field 60X. - - -DB change : -* fulltext index added in bibliothesaurus. -* added missing columns in deletedXXX tables - -KNOWN BUGS : -* some bugs in circulation : english-only messages, errors issuing books, or returning books with reserves, cancelling reserves. -Note that those bugs doesn't appear everytime (they need specific circumstances it seems). -* MARC upload fails silently (in breeding farm) -* autobarcode not calculated even if autobarcode system parameter is set. -* the MARC21 english default parameter setup is working, but some librarians reports that some choices are poor. If you use MARC21, tweak some setups to fit your needs. diff --git a/release_notes_200pre1.txt b/release_notes_200pre1.txt deleted file mode 100644 index 24524b778c..0000000000 --- a/release_notes_200pre1.txt +++ /dev/null @@ -1,72 +0,0 @@ -RELEASE NOTES -============= -This release add many bugfixes, and some improvment in z3950 and repetable fields management. -It has been placed in the "unstable tree" because there are still some bugs. -But it's fully usable, and should not be modified a lot until a stable version is released. - -PACKAGE NEEDED : ---------- -Nothing new. Note MARC::Record has new releases, but older one (1.26) works fine. - -DB modifications : ---------- -* added field in aqbudget, primary key : - aqbudgetid tinyint(4) NOT NULL auto_increment - PRIMARY KEY (aqbudgetid) -* added field in systempref : - options text -* bibliothesaurus - field father changed to char(80) (was bigint) - added full text index : FULLTEXT KEY category_2 (category,freelib) - - -z3950 : ---------- -* works on biblio adding & modifying -* works on ISBN, author, title, the 1st found being the one used. - -various : ----------- -* added subject and subtitle to MARC subfields mapped to Koha old-DB. -* reordered bookfunds/budget admin tools. - -languages/languages : -------------- -DEFAULT template : -* english works. -* french should work, mostly. If you experiment some problems, test with english templates, and report the problem as general of french specific -NEW template : -a "unido" template is in this release. It's uncomplete, and based on vanilla template. - -GUI reordering ------------------- -* Some unused links have been dropped. -* a "submenu" shows some operation below main menu. -* the MARC link disappeared. It's managed by the MARC=ON/OFF systempref. (the breeding import is now in Parameters section) -* acquisition and cataloguing are now separated. acquisition=simple/normal in systempref and cataloguing is MARC/nonMARC depending on MARC=ON/OFF systempref. - -Should be easier to understand. - -Bugs still open in bugs.koha.org -======================= -always some, but less than in 1.9.3 (40 at this time. more than 20 of them are minor : spellcheck, image missing...) -Some of them (for more details, see http://bugs.koha.org) : -* 426 Reserving a book (with a reserve fee) results in a hostile message -* 452 Payment due flags not showing up for children -* 185 Barcode not auto-calculated when autobarcode is on -* 425 Add new website feature doesn't work -* 318 allow or not a book to be loan -* 236 Reserve book on future date doesn't work or copy is wrong -* -bugs not reported here are either unconfirmed, not understood, minor, or partially fixed. - - - - -Feel free to ask for bugfixes and new features in bugs.koha.org. -NOTE that NEW FEATURES or IMPROVEMENTS will only be for 2.0.1 unless it's a very trivial or blocking one. - -TODO -===== -* bug fixes (everybody) -* cleaning z3950 old searches (more than 1 hour/day old ?) (paul) diff --git a/release_notes_200pre2.txt b/release_notes_200pre2.txt deleted file mode 100644 index 9b10345378..0000000000 --- a/release_notes_200pre2.txt +++ /dev/null @@ -1,59 +0,0 @@ -RELEASE NOTES -============= -Bugfixes & some improvements (security & perf only) -It has been placed in the "unstable tree" because there are still some bugs. -But it's fully usable, and should not be modified a lot until a stable version is released. - -DB modifications : ---------- -None, but check that your systempreferences table is : -CREATE TABLE systempreferences ( - variable varchar(50) NOT NULL default '', - value varchar(200) default NULL, - explanation varchar(200) NOT NULL default '', - options text, - type varchar(20) default NULL, - PRIMARY KEY (variable) -) PACK_KEYS=1; - -If you installed a 2.0.0pre1 from scratch, it should be ok. -If your version was a 1.9.x, it should not be ok. - -SYSTEMPREFS : ---------- -In systempreferences, add a gist field. Used to calculate gst when ordering, in acquisition module. Enter 0.12 for 12% rate. - -IMPROVMENTS : ---------- -* checkmarc.pl : added a check on fields mapped to item marc tag (by Paul). -* overdue books backported from 1.2.x (& templated) (by Chris) -* some additionals check to verify a borrower can borrow a book (by Esiee) -* MARC search (in intranet) : -- dramaticaly improving the speed of a MARC search in case of a A OR B search (by Paul) -- Users can search using more than 3 criterias (criterias are now added dynamically) (by Esiee) -- Results can be displayed using 20,50 or 100 results per page. (by Esiee) -- Added arrows and numbers to walk through the results (as in OPAC) (by Esiee) - -BUGS FIXED : ---------- -* 2 stupids & majors bug in MARC editor, due to too fast copy/paste. (fixed by Paul) -* bug 479 : I have problem to assign a Sticky due date, it uses day date as year due date !!! (fixed by ?) -* bug 471 : missing next / previous in itemtype admin page, in case there is more than 20 itemtypes (fixed by Paul) -* bug 474 : alternate contact no more required (fixed by Paul) -* bug 478 : value modification with single quote now works (in parameters section) (fixed by Paul) -* bug 489 : poor file copying during install (fixed by MJR) -* bug 526 : gst rate hardcoded. Moved to systempref (see SYSTEMPREFS chapter). (fixed by Paul) - If supplier parameters are set to do it, the gst are now auto calculated with javascript. -* bug 512 : bibliosubject table is not being populated (fixed by Paul) -* bug 513 : marclinks: default mapping typo (fixed by Paul) -* updatedatabase bugs : now, the updatedatabase script (located in scripts/updater) works and update your DB structure. - note it only adds fields & tables. The MARC parameter tables won't be populated, neither the MARC-DB. (fixed by Paul) - -KNOWN BUGS : -------- -* bug 510 : new doc needs to be integrated -* bug 487 : upgrade problem from a previous version. If you install from scratch, it should be fine. -* bug 515 : biblio.notes ignores Marclinks mapping durring import -* bug 293 : Error Issuing Book - 1 in some specific cases -* bug 523 : requests does not store dates in reserves table -plus some other, less critical. diff --git a/release_notes_200pre3.txt b/release_notes_200pre3.txt deleted file mode 100644 index 473ab2ee81..0000000000 --- a/release_notes_200pre3.txt +++ /dev/null @@ -1,79 +0,0 @@ -RELEASE NOTES -============= - -This version of Koha is still in the "unstable" directory, because some bugs are still reported. But it's fully useable and used in (at least) 3 libraries in "real world" : -* Nelsonville Public Library, Ohio, USA -* Esiee, high school, France -* Dombes Abbey, France - -The next version should/might be the 2.0.0RC1. -The only missing features are : -* a migration tool for libraries already using Koha1.2.x -* an automated upgrading tool for future version. It's possible to upgrade manually. - -IMPROVEMENTS : ---------- -* adding a demo setup : if you set "demo=1" in /etc/koha.conf, Koha is in "demo mode". In this mode, user can connect with "demo/demo", even if this user is not in members table. -He can do everything, except that any modif/add/delete done in systempref or marc structure is NOT saved in the DB. This avoid demo user breaking the demo config. -* adding javascript function to focus on 1st field for issues / returns. Thus, librarian don't need manual mouse focus & can scan barcode immediatly. -* authories/thesaurus management : adding the possibility to add an authority directly. - -UPGRADING : ---------- -People using a previous 2.0.0preX version can upgrade code and use the same DB, there's no DB change. -To upgrade mannually : -- mv /etc/koha.conf /etc/koha.conf_previous -- install in a new directory /var/www/html/koha_200pre3 for example. -- delete the 2.0.0pre3 DB -- modify /etc/koha.conf to point to 2.0.0pre3 DB -- modify httpd.conf to have Koha root directory pointing to 200pre3 install instead of 200pre2 -- restart Apache. - -Note : you can use the 2.0.0pre2 login/password. -If you do, mySQL may complaint about "already existing DB user". It's not a problem. - -Note : you can also use "CVS symlink installation" of Koha if you prefer. See http://www.saas.nsw.edu.au/wiki/index.php?page=CVSSymLinkInstallation - -BUGFIXES : ---------- -(the bug number refers to bugzilla number. See bugs.koha.org) -512 : bibliosubject table is not being populated -564 : Member card number not checked unique -567 : classlist not filled in when using catalogue-home.pl -593 : data duplication in MARC-DB -562 : Returns not showing 'on reserve' message for holds -565 : item barcode not checked unique -516 : biblioitems.itemtype does not load -556 : OPAC subject search with class specified returns error -103 : Need additional Perl module checks in installer.pl -570 : Subject search returns duplicate results -493 : add member error -563 : Keyword search does not search author names -583 : values in marc_word table should have quotation marks, etc, -499 : Members display by letter -561 : Javascript link doesn't work -164 : Editing member details loses postal address -233 : OPAC - User update doesn't work. -525 : If itemtype is not set, we get a broken more detail page, We -129 : Choosing to install MARC tables gave errors -152 : Install.pm missing from main branch -363 : Searching on contains works only with full names. -553 : broken html (neither valid nor well-formed) -582 : Move error message contents out of newmember.pl -153 : opachtdocs and intrahtdocs in koha.conf not initialized -474 : Alternate contact should not be required -558 : Member search results table doesn't show alternating colors -542 : Move HTML out of itemtypes.pl -490 : Poor display -558 : Member search results table doesn't show alternating colors -548 : Spelling of Catalog/Catalogue -547/546 : some improvements in koha docs (located at docs/kohadoc.sgml) -540 : Missing requests.gif or equivalent -XXX : Many french translation improvements. -XXX : some installer improvments. -XXX : fix for publicationyear : extracting numeric value from MARC string, like for copyrightdate. -XXX : fixing font size bug, & minor change in submenu look. -XXX : modifying MARC21 default setup : using Nelsonville setup, that is working. User just need to define itemtypes. -XXX : fixing small bug : escaping twice the ' in title & author. - -(XXX : bugfixes not in bugs.koha.org) \ No newline at end of file diff --git a/release_notes_200pre4.txt b/release_notes_200pre4.txt deleted file mode 100644 index 8a22d36dca..0000000000 --- a/release_notes_200pre4.txt +++ /dev/null @@ -1,29 +0,0 @@ -RELEASE NOTES -============= - -This version of Koha is still in the "unstable" directory, because some bugs are still reported. But it's fully useable and used in (at least) 4 libraries in "real world" : -* Nelsonville Public Library, Ohio, USA -* Esiee, high school, France -* Dombes Abbey, France -* Wesford school, France - -This release fixes a few bugs, and MANY french translation fixes/improvements. - -BUGFIXES/IMPROVEMENTS ---------- -* new script : koha/koha/misc/overduenotices.pl - This is a script for the use of printing, and emailing overdue notices. - The script must be run from the command line - Documentation is contained in the script -* fix for bug 603 : patron searches are wonky when first letter of first and last name are the same -* removing trailing "," in subject. -* fixing some bugs in charges.pl, script that fills the categoryitem table. - The categoryitem table contains fines for every itemtype-borrowercategory. - Still has to be templated and added to admin part of Koha -* notforloan bug fix : now, if a specific item is "notforloan" and the itemtype "forloan", the "notforloan" is used. Before this fix, it was overwritted by the itemtype info/ -* fixing a bug that deleted the MARC part of a biblio when using full acqui system. - Now, when you acquire a book through full acqui system, what you enter during acqui appears in the right MARC fields in MARC editor. - -FRENCH SPECIFIC ---------- -More than 30 improvements/bugfixes in french templates. diff --git a/release_notes_200pre5.txt b/release_notes_200pre5.txt deleted file mode 100644 index 01e48a5777..0000000000 --- a/release_notes_200pre5.txt +++ /dev/null @@ -1,76 +0,0 @@ -RELEASE NOTES -============= -this version of Koha is the last one of the 2.0.0 series in the "unstable" tree. -5 libraries are using it, so it's quite useable. -2 last problems have to be solved before 2.0.0RC1 : -* biblio deletion : at the moment, biblio deletion is buggy (does not work in MARC, delete only non-marc data) -* upgrader is provided for the 1st time, so it's probably buggy. - -If you want to use Koha, you're welcomed, but you're warned that this version still has some bugs and missing features. - -INSTALLATION -========== -* Download the package -* tar xvfz koha-version.tar.gz -* cd koha-version -* ./installer.pl -* follow the instructions. - -NOTE: You will need to add lines to your main httpd.conf to include -/etc/koha-httpd.conf and to make sure it is listening on the right ports -(using the Listen directive). Previous versions updated the httpd.conf file, -some users thought it was bad/poor decision. - - -UPGRADE from previous 2.0.0preX version -======= -* Download the package -* tar xvfz koha-version.tar.gz -* cd koha-version -* ./koha.upgrade -* follow the instructions. - -UPGRADE from previous 1.2.x version -======= -This upgrade is possible with this release for the 1st time. -EXPECT IT TO HAVE SOME BUGS SOMEWHERE. -USE IT ONLY IF YOU KNOW HOW TO GO BACK TO PREVIOUS SITUATION. -Otherwise, WAIT for next version or so. -* Download the package -* tar xvfz koha-version.tar.gz -* cd koha-version -* ./koha.upgrade -* follow the instructions. -* launch Koha -* Go to Parameters >> Marc structure option and Koha-MARC links option. -* Modify default MARC structure to fit your needs. -* open a console/term -* Enter : -cd /path/to/koha/misc -export PERL5LIB=/path/to/koha -./koha2marc.pl -the old DB is "copied" in the new MARC one. -Koha 2.0.0 is ready. - -BUGFIXES/IMPROVEMENTS -======= -BUGS FIXED : -+++++++++ -619 : Visiting selectbranchprinter.pl automatically resets branch -618 : Add member process does not check for duplicate barcode -532 : Can't assign new password without changing UserID -599 : edited items are stored incorrectly in old Koha DB (aka : barcode non mandatory bug) -616 : MARCgetbiblio doesn't create leader -500 : [INTRANET]Only 21 items are displayed in the search result -595 : 'Add field' link in /acqui.simple/addbiblio.pl adds incorrect field. -622 : processz3950queue fails -576 : add install locale test -39 : Update Dirs in z3950 scripts -536 : bulkmarcimport.pl generates subtitle error -436 : circulation.pl only partially templated (this bug is partially fixed) - -IMPROVEMENTS -+++++++++ -* Polish version of Koha (courtesy of Benedykt) -* some useful tools in misc directory to manage the DB -* adding "fines" entry in parameters section : to manage fees when a book is returned too late diff --git a/search.pl b/search.pl index 42e70a305e..6be2a9ba21 100755 --- a/search.pl +++ b/search.pl @@ -19,9 +19,18 @@ # Suite 330, Boston, MA 02111-1307 USA # $Log$ +# Revision 1.34 2004/02/11 08:35:31 tipaul +# synch'ing 2.0.0 branch and head +# # Revision 1.33 2003/12/19 17:28:03 tipaul # fix for #683 # +# Revision 1.32.2.2 2004/01/13 17:33:39 tipaul +# removing useless (& buggy here) checkauth +# +# Revision 1.32.2.1 2003/12/19 17:28:42 tipaul +# fix for 683 +# # Revision 1.32 2003/06/11 18:37:55 tonnesen # Using boolean_preference instead of preference for 'marc' setting # @@ -42,10 +51,6 @@ use C4::Interface::CGI::Output; my $query=new CGI; my $type=$query->param('type'); -#(-e "opac") && ($type='opac'); - -my ($loggedinuser, $cookie, $sessionID) = checkauth($query, ($type eq 'opac') ? (1) : (0)); - my $startfrom=$query->param('startfrom'); ($startfrom) || ($startfrom=0); diff --git a/shelves.pl b/shelves.pl index fd06a41504..cdbafaa93b 100755 --- a/shelves.pl +++ b/shelves.pl @@ -4,8 +4,6 @@ # # $Header$ # - - # Copyright 2000-2002 Katipo Communications # # This file is part of Koha. @@ -35,7 +33,6 @@ use HTML::Template; my $env; my $query = new CGI; -#print $query->header(-cookie => $cookie); my $headerbackgroundcolor='#663266'; my $circbackgroundcolor='#555555'; my $circbackgroundcolor='#550000'; @@ -44,41 +41,38 @@ my $linecolor2='#dddddd'; my ($template, $loggedinuser, $cookie) = get_template_and_user({template_name => "shelves.tmpl", query => $query, - type => "intranet", - authnotrequired => 0, - flagsrequired => {parameters => 1}, - }); -#print startpage(); -#print startmenu('catalogue'); -#print "

Logged in as: $loggedinuser [Log Out]

\n"; - - -my ($shelflist) = GetShelfList(); + type => "intranet", + authnotrequired => 0, + flagsrequired => {catalogue => 1}, + }); if ($query->param('modifyshelfcontents')) { - my $shelfnumber=$query->param('shelfnumber'); - my $barcode=$query->param('addbarcode'); - my ($item) = getiteminformation($env, 0, $barcode); - AddToShelf($env, $item->{'itemnumber'}, $shelfnumber); - foreach ($query->param) { - if (/REM-(\d*)/) { - my $itemnumber=$1; - RemoveFromShelf($env, $itemnumber, $shelfnumber); + my $shelfnumber=$query->param('shelfnumber'); + my $barcode=$query->param('addbarcode'); + my ($item) = getiteminformation($env, 0, $barcode); + AddToShelf($env, $item->{'itemnumber'}, $shelfnumber); + foreach ($query->param) { + if (/REM-(\d*)/) { + my $itemnumber=$1; + RemoveFromShelf($env, $itemnumber, $shelfnumber); + } } - } } +my ($shelflist) = GetShelfList(); +$template->param({ loggedinuser => $loggedinuser, + headerbackgroundcolor => $headerbackgroundcolor, + circbackgroundcolor => $circbackgroundcolor }); SWITCH: { - $template->param({ loggedinuser => $loggedinuser, - viewshelf => $query->param('viewshelf'), - shelves => $query->param('shelves'), - headerbackgroundcolor => $headerbackgroundcolor, - circbackgroundcolor => $circbackgroundcolor }); - if ($query->param('viewshelf')) { viewshelf($query->param('viewshelf')); last SWITCH;} - if ($query->param('shelves')) { shelves(); last SWITCH;} - my $color=''; - my @shelvesloop; - foreach my $element (sort keys %$shelflist) { + if ($query->param('viewshelf')) { viewshelf($query->param('viewshelf')); last SWITCH;} + if ($query->param('shelves')) { shelves(); last SWITCH;} +} + +($shelflist) = GetShelfList(); # rebuild shelflist in case a shelf has been added + +my $color=''; +my @shelvesloop; +foreach my $element (sort keys %$shelflist) { my %line; ($color eq $linecolor1) ? ($color=$linecolor2) : ($color=$linecolor1); $line{'color'}= $color; @@ -86,22 +80,20 @@ SWITCH: { $line{'shelfname'}=$shelflist->{$element}->{'shelfname'}; $line{'shelfbookcount'}=$shelflist->{$element}->{'count'}; push (@shelvesloop, \%line); - } - $template->param(shelvesloop => \@shelvesloop); } +$template->param(shelvesloop => \@shelvesloop); output_html_with_http_headers $query, $cookie, $template->output; - sub shelves { - if (my $newshelf=$query->param('addshelf')) { - my ($status, $string) = AddShelf($env,$newshelf); - if ($status) { - $template->param(status1 => $status, string1 => $string); + if (my $newshelf=$query->param('addshelf')) { + my ($status, $string) = AddShelf($env,$newshelf); + if ($status) { + $template->param(status1 => $status, string1 => $string); + } } - } my @paramsloop; - foreach ($query->param()) { + foreach ($query->param()) { my %line; if (/DEL-(\d+)/) { my $delshelf=$1; @@ -113,12 +105,12 @@ sub shelves { } #if the shelf is not deleted, %line points on null push(@paramsloop,\%line); - } + } $template->param(paramsloop => \@paramsloop); - my ($shelflist) = GetShelfList(); - my $color=''; + my ($shelflist) = GetShelfList(); + my $color=''; my @shelvesloop; - foreach my $element (sort keys %$shelflist) { + foreach my $element (sort keys %$shelflist) { my %line; ($color eq $linecolor1) ? ($color=$linecolor2) : ($color=$linecolor1); $line{'color'}=$color; @@ -126,19 +118,19 @@ sub shelves { $line{'shelfname'}=$shelflist->{$element}->{'shelfname'} ; $line{'shelfbookcount'}=$shelflist->{$element}->{'count'} ; push(@shelvesloop, \%line); - } - $template->param(shelvesloop=>\@shelvesloop); + } + $template->param(shelvesloop=>\@shelvesloop, + shelves => 1, + ); } - - sub viewshelf { - my $shelfnumber=shift; - my ($itemlist) = GetShelfContents($env, $shelfnumber); - my $item=''; - my $color=''; + my $shelfnumber=shift; + my ($itemlist) = GetShelfContents($env, $shelfnumber); + my $item=''; + my $color=''; my @itemsloop; - foreach $item (sort {$a->{'barcode'} cmp $b->{'barcode'}} @$itemlist) { + foreach $item (sort {$a->{'barcode'} cmp $b->{'barcode'}} @$itemlist) { my %line; ($color eq $linecolor1) ? ($color=$linecolor2) : ($color=$linecolor1); $line{'color'}=$color; @@ -147,17 +139,22 @@ sub viewshelf { $line{'title'}=$item->{'title'}; $line{'author'}=$item->{'author'}; push(@itemsloop, \%line); - } - $template->param( itemsloop => \@itemsloop); - $template->param( shelfname => $shelflist->{$shelfnumber}->{'shelfname'}); - $template->param( shelfnumber => $shelfnumber); + } + $template->param( itemsloop => \@itemsloop, + shelfname => $shelflist->{$shelfnumber}->{'shelfname'}, + shelfnumber => $shelfnumber, + viewshelf => $query->param('viewshelf'), + ); } -#print endpage(); -#print endmenu('catalogue'); - # # $Log$ +# Revision 1.13 2004/02/11 08:35:31 tipaul +# synch'ing 2.0.0 branch and head +# +# Revision 1.12.2.1 2004/02/06 14:22:19 tipaul +# fixing bugs in bookshelves management. +# # Revision 1.12 2003/02/05 10:04:14 acli # Worked around weirdness with HTML::Template; without the {}, it complains # of being passed an odd number of arguments even though we are not diff --git a/thesaurus_popup.pl b/thesaurus_popup.pl index c4ef269562..62518ba37d 100755 --- a/thesaurus_popup.pl +++ b/thesaurus_popup.pl @@ -36,12 +36,13 @@ my %env; my $input = new CGI; my $result = $input->param('result'); my $search_string= $input->param('search_string'); +$search_string = $result unless ($search_string); my $op = $input->param('op'); my $id = $input->param('id'); my $category = $input->param('category'); my $index= $input->param('index'); my $insert = $input->param('insert'); - +my $nohierarchy = $input->param('nohierarchy'); # if 1, just show the last part of entry (Marseille). If 0, show everything (Europe -- France --Marseille) my $dbh = C4::Context->dbh; # make the page ... @@ -51,9 +52,17 @@ if ($op eq "select") { $sti->execute($id); my ($father,$freelib_text) = $sti->fetchrow_array; if (length($result)>0) { - $result .= "|$father $freelib_text"; + if ($nohierarchy) { + $result .= "|$freelib_text"; + } else { + $result .= "|$father $freelib_text"; + } } else { - $result = "$father $freelib_text"; + if ($nohierarchy) { + $result = "$freelib_text"; + } else { + $result = "$father $freelib_text"; + } } } if ($op eq "add") { @@ -77,7 +86,11 @@ if ($search_string) { my $sti=$dbh->prepare("select id,freelib,father from bibliothesaurus where match (category,freelib) AGAINST (?) and category =?"); $sti->execute($search_string,$category); while (my $line=$sti->fetchrow_hashref) { - $stdlib{$line->{'id'}} = "$line->{'father'} $line->{'freelib'}"; + if ($nohierarchy) { + $stdlib{$line->{'id'}} = "$line->{'freelib'}"; + } else { + $stdlib{$line->{'id'}} = "$line->{'father'} $line->{'freelib'}"; + } push(@freelib,$line->{'id'}); } $select_list= CGI::scrolling_list( -name=>'id', @@ -105,7 +118,8 @@ $template->param(select_list => $select_list, dig_list => $dig_list, result => $result, category => $category, - index => $index + index => $index, + nohierarchy => $nohierarchy, ); output_html_with_http_headers $input, $cookie, $template->output; -- 2.39.5