From 8830e5af8fec9ada9bfd1c7a86768985519a8a97 Mon Sep 17 00:00:00 2001 From: tipaul Date: Thu, 29 Mar 2007 13:29:48 +0000 Subject: [PATCH] removing marc=off scripts --- cataloguing/addbiblio-nomarc.pl | 77 ----------- cataloguing/additem-nomarc.pl | 235 -------------------------------- cataloguing/savebiblio.pl | 53 ------- cataloguing/saveitem.pl | 95 ------------- 4 files changed, 460 deletions(-) delete mode 100755 cataloguing/addbiblio-nomarc.pl delete mode 100755 cataloguing/additem-nomarc.pl delete mode 100755 cataloguing/savebiblio.pl delete mode 100755 cataloguing/saveitem.pl diff --git a/cataloguing/addbiblio-nomarc.pl b/cataloguing/addbiblio-nomarc.pl deleted file mode 100755 index e7a8d00546..0000000000 --- a/cataloguing/addbiblio-nomarc.pl +++ /dev/null @@ -1,77 +0,0 @@ -#!/usr/bin/perl - -# $Id$ - -# -# TODO -# -# Add info on biblioitems and items already entered as you enter new ones -# - -# 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 - -# $Log$ -# Revision 1.3 2007/03/09 15:36:10 tipaul -# rel_3_0 moved to HEAD (introducing new files) -# -# Revision 1.1.2.2 2006/12/18 16:35:18 toins -# removing use HTML::Template from *.pl. -# -# Revision 1.1.2.1 2006/09/26 16:05:05 toins -# adding missing template & fix wrong link on scripts. -# -# Revision 1.1 2006/01/17 16:40:54 tipaul -# moving acqui.simple directory to cataloguing, as acqui.simple contains cataloguing scripts... -# -# Revision 1.3 2005/05/04 08:45:22 tipaul -# synch'ing 2.2 and head -# -# Revision 1.2.4.1 2005/03/25 12:52:42 tipaul -# needs "editcatalogue" flag, not "catalogue" -# -# Revision 1.2 2003/05/09 23:47:22 rangi -# This script is now templated -# 3 more to go i think -# - -use CGI; -use strict; -use C4::Output; - -use C4::Auth; -use C4::Interface::CGI::Output; - -my $input = new CGI; -my ( $template, $loggedinuser, $cookie ) = get_template_and_user( - { - template_name => "cataloguing/addbiblio-nomarc.tmpl", - query => $input, - type => "intranet", - authnotrequired => 0, - flagsrequired => { editcatalogue => 1 }, - debug => 1, - } -); - -my $error = $input->param('error'); - -$template->param( - ERROR => $error, -); - -output_html_with_http_headers $input, $cookie, $template->output; diff --git a/cataloguing/additem-nomarc.pl b/cataloguing/additem-nomarc.pl deleted file mode 100755 index cc6cad9c6b..0000000000 --- a/cataloguing/additem-nomarc.pl +++ /dev/null @@ -1,235 +0,0 @@ -#!/usr/bin/perl - -# $Id$ - -# 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 - -# $Log$ -# Revision 1.6 2007/03/09 15:36:10 tipaul -# rel_3_0 moved to HEAD (introducing new files) -# -# Revision 1.4.2.3 2006/12/14 15:41:54 toins -# admin/branches.pl works now with mod_perl. -# New module : Branch.pm containt all functions dealings with branches. -# -# Revision 1.4.2.2 2006/12/05 11:35:30 toins -# Biblio.pm cleaned. -# additionalauthors, bibliosubject, bibliosubtitle tables are now unused. -# Some functions renamed according to the coding guidelines. -# -# Revision 1.4.2.1 2006/09/26 16:05:05 toins -# adding missing template & fix wrong link on scripts. -# -# Revision 1.4 2006/07/27 13:52:49 toins -# 1 sub renamed and cleaned. -# -# Revision 1.3 2006/07/21 10:12:00 toins -# subs renamed according to coding guidelines. -# -# Revision 1.2 2006/07/12 17:17:12 toins -# getitemtypes renamed to GetItemTypes -# -# Revision 1.1 2006/01/17 16:40:54 tipaul -# moving acqui.simple directory to cataloguing, as acqui.simple contains cataloguing scripts... -# -# Revision 1.8 2005/10/26 09:11:34 tipaul -# big commit, still breaking things... -# -# * synch with rel_2_2. Probably the last non manual synch, as rel_2_2 should not be modified deeply. -# * code cleaning (cleaning warnings from perl -w) continued -# -# Revision 1.4.2.1 2005/03/25 12:52:44 tipaul -# needs "editcatalogue" flag, not "catalogue" -# -# Revision 1.4 2004/11/19 16:41:49 tipaul -# improving behaviour when MARC=OFF -# -# Revision 1.3 2004/08/13 16:37:25 tipaul -# adding frameworkcode to API in some subs -# -# Revision 1.2 2003/05/11 06:59:11 rangi -# Mostly templated. -# Still needs some work -# - -use CGI; -use strict; -use C4::Biblio; -use C4::Koha; -use C4::Output; -use C4::Branch; # GetBranches -use C4::Auth; -use C4::Interface::CGI::Output; - -my $input = new CGI; -my $biblionumber = $input->param('biblionumber'); -my $error = $input->param('error'); -my $maxbarcode; -my $isbn; -my $bibliocount; -my @biblios; -my $biblioitemcount; -my @biblioitems; -# my @branches; -# my %branchnames; -my $itemcount; -my @items; - -if ( !$biblionumber ) { - print $input->redirect('/cgi-bin/koha/cataloguing/addbooks.pl'); -} -else { - my $input = new CGI; - my ( $template, $loggedinuser, $cookie ) = get_template_and_user( - { - template_name => "cataloguing/additem-nomarc.tmpl", - query => $input, - type => "intranet", - authnotrequired => 0, - flagsrequired => { editcatalogue => 1 }, - debug => 1, - } - ); - ( $bibliocount, @biblios ) = &GetBiblio($biblionumber); - - if ( !$bibliocount ) { - print $input->redirect('addbooks.pl'); - } - else { - @biblioitems = &GetBiblioItemByBiblioNumber($biblionumber); - $biblioitemcount = scalar @biblioitems; - my $branches = GetBranches; - my @branchloop; - foreach my $thisbranch (sort keys %$branches) { - my %row =(value => $thisbranch, - branchname => $branches->{$thisbranch}->{'branchname'}, - ); - push @branchloop, \%row; - } - my $itemtypes = &GetItemTypes; - my @itemtypeloop; - foreach my $thisitemtype (sort keys %$itemtypes) { - my %row =(value => $thisitemtype, - description => $itemtypes->{$thisitemtype}->{'description'}, - ); - push @itemtypeloop, \%row; - } - if ( $error eq "nobarcode" ) { - $template->param( NOBARCODE => 1 ); - } - elsif ( $error eq "nobiblioitem" ) { - $template->param( NOBIBLIOITEM => 1 ); - } - elsif ( $error eq "barcodeinuse" ) { - $template->param( BARCODEINUSE => 1 ); - } # elsif - - for ( my $i = 0 ; $i < $biblioitemcount ; $i++ ) { - if ( $biblioitems[$i]->{'itemtype'} eq "WEB" ) { - $biblioitems[$i]->{'WEB'} = 1; - } - $biblioitems[$i]->{'dewey'} =~ /(\d*\.\d\d)/; - $biblioitems[$i]->{'dewey'} = $1; - ( $itemcount, @items ) = &getitemsbybiblioitem( $biblioitems[$i]->{'biblioitemnumber'} ); - $biblioitems[$i]->{'items'} = \@items; - } # for - $template->param( - BIBNUM => $biblionumber, - AUTHOR => $biblios[0]->{'author'}, - TITLE => $biblios[0]->{'title'}, - COPYRIGHT => $biblios[0]->{'copyrightdate'}, - SERIES => $biblios[0]->{'seriestitle'}, - NOTES => $biblios[0]->{'notes'}, - BIBITEMS => \@biblioitems, - branchloop => \@branchloop, - itemtypeloop => \@itemtypeloop, - - ( $bibliocount, @biblios ) = &GetBiblio($biblionumber); - - if ( !$bibliocount ) { - print $input->redirect('addbooks.pl'); - } - else { - - @biblioitems =&GetBiblioItemByBiblioNumber($biblionumber); - $biblioitemcount = scalar @biblioitems; - @branches = &GetBranches; - ( $itemtypecount, @itemtypes ) = &GetItemTypes; - - for ( my $i = 0 ; $i < $itemtypecount ; $i++ ) { - $itemtypedescriptions{ $itemtypes[$i]->{'itemtype'} } = - $itemtypes[$i]->{'description'}; - } # for - - for ( my $i = 0 ; $i < $#branches ; $i++ ) { - $branchnames{ $branches[$i]->{'branchcode'} } = - $branches[$i]->{'branchname'}; - } # for - - # print $input->header; - # print startpage(); - # print startmenu('acquisitions'); - my $input = new CGI; - my ( $template, $loggedinuser, $cookie ) = get_template_and_user( - { - template_name => "cataloguing/additem-nomarc.tmpl", - query => $input, - type => "intranet", - authnotrequired => 0, - flagsrequired => { editcatalogue => 1 }, - debug => 1, - } - ); - - if ( $error eq "nobarcode" ) { - $template->param( NOBARCODE => 1 ); - } - elsif ( $error eq "nobiblioitem" ) { - $template->param( NOBIBLIOITEM => 1 ); - } - elsif ( $error eq "barcodeinuse" ) { - $template->param( BARCODEINUSE => 1 ); - } # elsif - - for ( my $i = 0 ; $i < $biblioitemcount ; $i++ ) { - if ( $biblioitems[$i]->{'itemtype'} eq "WEB" ) { - $biblioitems[$i]->{'WEB'} = 1; - - } - $biblioitems[$i]->{'dewey'} =~ /(\d*\.\d\d)/; - $biblioitems[$i]->{'dewey'} = $1; - ( $itemcount, @items ) = - &getitemsbybiblioitem( $biblioitems[$i]->{'biblioitemnumber'} ); - $biblioitems[$i]->{'items'} = \@items; - } # for - $template->param( - BIBNUM => $biblionumber, - AUTHOR => $biblios[0]->{'author'}, - TITLE => $biblios[0]->{'title'}, - COPYRIGHT => $biblios[0]->{'copyrightdate'}, - SERIES => $biblios[0]->{'seriestitle'}, - NOTES => $biblios[0]->{'notes'}, - BIBITEMS => \@biblioitems, - BRANCHES => \@branches, - ITEMTYPES => \@itemtypes, - - ); - - output_html_with_http_headers $input, $cookie, $template->output; - } # if -} # if diff --git a/cataloguing/savebiblio.pl b/cataloguing/savebiblio.pl deleted file mode 100755 index f2dbc805d5..0000000000 --- a/cataloguing/savebiblio.pl +++ /dev/null @@ -1,53 +0,0 @@ -#!/usr/bin/perl - -# 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 CGI; -use strict; -use C4::Biblio; - -my $input = new CGI; -my $biblio = { - title => $input->param('title'), - subtitle => $input->param('subtitle') ? $input->param('subtitle') : "", - author => $input->param('author') ? $input->param('author') : "", - seriestitle => $input->param('seriestitle') ? $input->param('seriestitle') - : "", - copyrightdate => $input->param('copyrightdate') - ? $input->param('copyrightdate') - : "", - abstract => $input->param('abstract') ? $input->param('abstract') : "", - notes => $input->param('notes') ? $input->param('notes') : "" -}; # my $biblio - -my $subjectheadings = $input->param('subjectheadings'); -# Different O.S.es use different codes to end lines. This ensures that all cases -# are allowed for. -my @subjects = split ( /\n|\r|\n\r|\r\n/, $subjectheadings ); -my $biblionumber; -my $aauthors = $input->param('additionalauthors'); -my @authors = split ( /\n|\r|\n\r|\r\n/, $aauthors ); -my $force = $input->param('force'); - -if ( !$biblio->{'title'} ) { - print $input->redirect('addbiblio-nomarc.pl?error=notitle'); -} -else { - $biblionumber = &newbiblio($biblio); - print $input->redirect("additem-nomarc.pl?biblionumber=$biblionumber"); -} # else diff --git a/cataloguing/saveitem.pl b/cataloguing/saveitem.pl deleted file mode 100755 index dadf0f8c37..0000000000 --- a/cataloguing/saveitem.pl +++ /dev/null @@ -1,95 +0,0 @@ -#!/usr/bin/perl - -# $Id$ - -# 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 CGI; -use strict; -# use C4::Catalogue; -use C4::Biblio; - -my $input = new CGI; -my $barcode = $input->param('barcode'); -my $biblionumber = $input->param('biblionumber'); -my $biblioitemnumber = $input->param('biblioitemnumber'); -my $item = { - biblionumber => $biblionumber, - biblioitemnumber => $biblioitemnumber?$biblioitemnumber:"", - homebranch => $input->param('homebranch'), - holdingbranch => $input->param('homebranch'), - replacementprice => $input->param('replacementprice')?$input->param('replacementprice'):"", - itemnotes => $input->param('notes')?$input->param('notes'):"" -}; # my $item -my $biblioitem = { - biblionumber => $biblionumber, - itemtype => $input->param('itemtype'), - isbn => $input->param('isbn')?$input->param('isbn'):"", - publishercode => $input->param('publishercode')?$input->param('publishercode'):"", - publicationyear => $input->param('publicationyear')?$input->param('publicationyear'):"", - place => $input->param('place')?$input->param('place'):"", - illus => $input->param('illus')?$input->param('illus'):"", - url => $input->param('url')?$input->param('url'):"", - dewey => $input->param('dewey')?$input->param('dewey'):"", - subclass => $input->param('subclass')?$input->param('subclass'):"", - issn => $input->param('issn')?$input->param('issn'):"", - lccn => $input->param('lccn')?$input->param('lccn'):"", - volume => $input->param('volume')?$input->param('volume'):"", - number => $input->param('number')?$input->param('number'):"", - volumeddesc => $input->param('volumeddesc')?$input->param('volumeddesc'):"", - pages => $input->param('pages')?$input->param('pages'):"", - size => $input->param('size')?$input->param('size'):"", - notes => $input->param('itemnotes')?$input->param('itemnotes'):"" -}; # my biblioitem -my $newgroup = 0; -my $website = 0; -my $count; -my @results; - -if ($input->param('newgroup')) { - $newgroup = 1; - if ($biblioitem->{'itemtype'} eq "WEB") { - $website = 1; - } # if -} # if - -if (! $biblionumber) { - print $input->redirect('addbooks.pl'); -} elsif ((! $barcode) && (! $website)) { - print $input->redirect("additem-nomarc.pl?biblionumber=$biblionumber&error=nobarcode"); -} elsif ((! $newgroup) && (! $biblioitemnumber)) { - print $input->redirect("additem-nomarc.pl?biblionumber=$biblionumber&error=nobiblioitem"); -} else { - - if ($website) { - &newbiblioitem($biblioitem); - print $input->redirect("additem-nomarc.pl?biblionumber=$biblionumber"); - } elsif (&checkitems(1,$barcode)) { - print $input->redirect("additem-nomarc.pl?biblionumber=$biblionumber&error=barcodeinuse"); - } else { - - if ($newgroup) { - $biblioitemnumber = &newbiblioitem($biblioitem); - $item->{'biblioitemnumber'} = $biblioitemnumber; - } # if - - &newitems($item, ($barcode)); - - print $input->redirect("additem-nomarc.pl?biblionumber=$biblionumber"); - } # else -} # else -- 2.39.5