Bug 11687: remove disused script statecollection.pl
authorJonathan Druart <jonathan.druart@biblibre.com>
Wed, 5 Feb 2014 09:39:26 +0000 (10:39 +0100)
committerGalen Charlton <gmc@esilibrary.com>
Fri, 7 Feb 2014 15:22:43 +0000 (15:22 +0000)
It can be removed.

Test plan:
  git grep statecollection
returns no occurrence.

Signed-off-by: Holger Meissner <h.meissner.82@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
serials/statecollection.pl [deleted file]

diff --git a/serials/statecollection.pl b/serials/statecollection.pl
deleted file mode 100755 (executable)
index 6d01c35..0000000
+++ /dev/null
@@ -1,97 +0,0 @@
-#!/usr/bin/perl
-
-# 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.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-
-use strict;
-use warnings;
-use CGI;
-use C4::Auth;
-use C4::Dates qw/format_date format_date_in_iso/;
-use C4::Output;
-use C4::Context;
-use C4::Serials;
-
-my $query = new CGI;
-my $op = $query->param('op') || q{};
-my $dbh = C4::Context->dbh;
-my $subscriptionid = $query->param('subscriptionid');
-my $auser = $query->param('user');
-my $histstartdate = format_date_in_iso($query->param('histstartdate'));
-my $enddate = format_date_in_iso($query->param('enddate'));
-my $recievedlist = $query->param('recievedlist');
-my $missinglist = $query->param('missinglist');
-my $opacnote = $query->param('opacnote');
-my $librariannote = $query->param('librariannote');
-my @serialids = $query->param('serialid');
-my @serialseqs = $query->param('serialseq');
-my @planneddates = $query->param('planneddate');
-my @notes = $query->param('notes');
-my @status = $query->param('status');
-
-my ($template, $loggedinuser, $cookie)
-= get_template_and_user({template_name => "serials/statecollection.tmpl",
-                               query => $query,
-                               type => "intranet",
-                               authnotrequired => 0,
-                               flagsrequired => {serials => '*'},
-                               debug => 1,
-                               });
-
-my $HasSubscriptionExpired = HasSubscriptionExpired($subscriptionid);
-my $subscription=GetSubscription($subscriptionid);
-if ($op eq 'modsubscriptionhistory') {
-       modsubscriptionhistory($subscriptionid,$histstartdate,$enddate,$recievedlist,$missinglist,$opacnote,$librariannote);
-}
-# change status except, if subscription has expired, for the "waited" issue.
-if ($op eq 'serialchangestatus') {
-       my $sth = $dbh->prepare("select status from serial where serialid=?");
-       for (my $i=0;$i<=$#serialids;$i++) {
-               $sth->execute($serialids[$i]);
-               my ($oldstatus) = $sth->fetchrow;
-               if ($serialids[$i]) {
-                       serialchangestatus($serialids[$i],$serialseqs[$i],format_date_in_iso($planneddates[$i]),$status[$i],$notes[$i]) unless ($HasSubscriptionExpired && $oldstatus == 1);
-               } else {
-                       # add a special issue
-                       if ($serialseqs[$i]) {
-                               my $sub=getsubscription($subscriptionid);
-                               newissue($serialseqs[$i],$subscriptionid,$sub->{biblionumber},$status[$i], format_date_in_iso($planneddates[$i]));
-                       }
-               }
-       }
-}
-my $subs = &GetSubscription($subscriptionid);
-my ($totalissues,@serialslist) = GetSerials($subscriptionid,10);
-
-my $sth=$dbh->prepare("select * from subscriptionhistory where subscriptionid = ?");
-$sth->execute($subscriptionid);
-my $solhistory = $sth->fetchrow_hashref;
-
-       $template->param(
-                       serialslist => \@serialslist,
-                       biblionumber => $subscription->{biblionumber},
-                       histstartdate => format_date($solhistory->{'histstartdate'}),
-                       enddate => format_date($solhistory->{'enddate'}),
-                       recievedlist => $solhistory->{'recievedlist'},
-                       missinglist => $solhistory->{'missinglist'},
-                       opacnote => $solhistory->{'opacnote'},
-                       librariannote => $solhistory->{'librariannote'},
-                       subscriptionid => $subscriptionid,
-                       bibliotitle => $subs->{bibliotitle},
-                       biblionumber => $subs->{biblionumber},
-                       hassubscriptionexpired =>$HasSubscriptionExpired,
-               );
-output_html_with_http_headers $query, $cookie, $template->output;