koha-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-cvs] koha/cataloguing addbiblio-nomarc.pl additem-no...


From: paul poulain
Subject: [Koha-cvs] koha/cataloguing addbiblio-nomarc.pl additem-no...
Date: Thu, 29 Mar 2007 13:29:48 +0000

CVSROOT:        /sources/koha
Module name:    koha
Changes by:     paul poulain <tipaul>   07/03/29 13:29:48

Removed files:
        cataloguing    : addbiblio-nomarc.pl additem-nomarc.pl 
                         savebiblio.pl saveitem.pl 

Log message:
        removing marc=off scripts

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/cataloguing/addbiblio-nomarc.pl?cvsroot=koha&r1=1.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/cataloguing/additem-nomarc.pl?cvsroot=koha&r1=1.6&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/cataloguing/savebiblio.pl?cvsroot=koha&r1=1.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/cataloguing/saveitem.pl?cvsroot=koha&r1=1.3&r2=0

Patches:
Index: addbiblio-nomarc.pl
===================================================================
RCS file: addbiblio-nomarc.pl
diff -N addbiblio-nomarc.pl
--- addbiblio-nomarc.pl 9 Mar 2007 15:36:10 -0000       1.3
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,77 +0,0 @@
-#!/usr/bin/perl
-
-# $Id: addbiblio-nomarc.pl,v 1.3 2007/03/09 15:36:10 tipaul Exp $
-
-#
-# 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: addbiblio-nomarc.pl,v $
-# 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;

Index: additem-nomarc.pl
===================================================================
RCS file: additem-nomarc.pl
diff -N additem-nomarc.pl
--- additem-nomarc.pl   9 Mar 2007 15:36:10 -0000       1.6
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,235 +0,0 @@
-#!/usr/bin/perl
-
-# $Id: additem-nomarc.pl,v 1.6 2007/03/09 15:36:10 tipaul Exp $
-
-# 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: additem-nomarc.pl,v $
-# 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'} = address@hidden;
-        }    # 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  => address@hidden,
-            branchloop  => address@hidden,
-            itemtypeloop => address@hidden,
-
-    ( $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'} = address@hidden;
-        }    # 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  => address@hidden,
-            BRANCHES  => address@hidden,
-            ITEMTYPES => address@hidden,
-
-        );
-
-        output_html_with_http_headers $input, $cookie, $template->output;
-    }    # if
-}    # if

Index: savebiblio.pl
===================================================================
RCS file: savebiblio.pl
diff -N savebiblio.pl
--- savebiblio.pl       9 Mar 2007 15:36:10 -0000       1.3
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -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

Index: saveitem.pl
===================================================================
RCS file: saveitem.pl
diff -N saveitem.pl
--- saveitem.pl 9 Mar 2007 15:36:10 -0000       1.3
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,95 +0,0 @@
-#!/usr/bin/perl
-
-# $Id: saveitem.pl,v 1.3 2007/03/09 15:36:10 tipaul Exp $
-
-# 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]