[Koha-patches] [PATCH] remove old files
Marc Chantreux
marc.chantreux at biblibre.com
Wed Jul 30 13:28:17 CEST 2008
as they are no more used
---
cataloguing/thesaurus_popup.pl | 121 ---------------
cataloguing/value_builder/unimarc_field_60X.pl | 132 -----------------
.../value_builder/unimarc_field_700_701_702.pl | 156 --------------------
3 files changed, 0 insertions(+), 409 deletions(-)
delete mode 100755 cataloguing/thesaurus_popup.pl
delete mode 100755 cataloguing/value_builder/unimarc_field_60X.pl
delete mode 100755 cataloguing/value_builder/unimarc_field_700_701_702.pl
diff --git a/cataloguing/thesaurus_popup.pl b/cataloguing/thesaurus_popup.pl
deleted file mode 100755
index 1dd3fca..0000000
--- a/cataloguing/thesaurus_popup.pl
+++ /dev/null
@@ -1,121 +0,0 @@
-#!/usr/bin/perl
-
-# written 10/5/2002 by Paul
-# build result field using bibliothesaurus table
-
-
-# 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 strict;
-use CGI;
-use C4::Auth;
-use C4::Context;
-use C4::Output;
-use C4::Authorities;
-# get all the data ....
-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 ...
-#print $input->header;
-if ($op eq "select") {
- my $sti = $dbh->prepare("select father,stdlib from bibliothesaurus where id=?");
- $sti->execute($id);
- my ($father,$freelib_text) = $sti->fetchrow_array;
- if (length($result)>0) {
- if ($nohierarchy) {
- $result .= "|$freelib_text";
- } else {
- $result .= "|$father $freelib_text";
- }
- } else {
- if ($nohierarchy) {
- $result = "$freelib_text";
- } else {
- $result = "$father $freelib_text";
- }
- }
-}
-if ($op eq "add") {
- newauthority($dbh,$category,$insert,$insert,'',1,'');
- $search_string=$insert;
-}
-my ($template, $loggedinuser, $cookie)
- = get_template_and_user({template_name => "cataloguing/thesaurus_popup.tmpl",
- query => $input,
- type => "intranet",
- authnotrequired => 0,
- flagsrequired => {editcatalogue => 1},
- debug => 1,
- });
-# /search thesaurus terms starting by search_string
-my @freelib;
-my %stdlib;
-my $select_list;
-if ($search_string) {
-# my $sti=$dbh->prepare("select id,freelib from bibliothesaurus where freelib like '".$search_string."%' and category ='$category'");
- 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) {
- 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',
- -values=> \@freelib,
- -default=> "",
- -size=>1,
- -multiple=>0,
- -labels=> \%stdlib
- );
-}
-my @x = SearchDeeper('',$category,$search_string);
-#my @son;
-#foreach (my $value @$x) {
-# warn \@$x[$value]->{'stdlib'};
-#}
-my $dig_list= CGI::scrolling_list( -name=>'search_string',
- -values=> \@x,
- -default=> "",
- -size=>1,
- -multiple=>0,
- );
-
-$template->param(select_list => $select_list,
- search_string => $search_string,
- dig_list => $dig_list,
- result => $result,
- category => $category,
- index => $index,
- nohierarchy => $nohierarchy,
- );
-output_html_with_http_headers $input, $cookie, $template->output;
-
-
diff --git a/cataloguing/value_builder/unimarc_field_60X.pl b/cataloguing/value_builder/unimarc_field_60X.pl
deleted file mode 100755
index 68451b2..0000000
--- a/cataloguing/value_builder/unimarc_field_60X.pl
+++ /dev/null
@@ -1,132 +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 strict;
-use C4::Auth;
-use CGI;
-use C4::Context;
-
-use C4::Search;
-use C4::Output;
-use C4::Authorities;
-
-sub plugin_javascript {
- my ( $dbh, $record, $tagslib, $field_number, $tabloop ) = @_;
- my $function_name = $field_number;
- my $res = "
- <script type=\"text/javascript\">
- function Focus$function_name(subfield_managed) {
- return 1;
- }
-
- function Blur$function_name(subfield_managed) {
- return 1;
- }
-
- function Clic$function_name(index) {
- defaultvalue=document.getElementById(\"$field_number\").value;
- window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_60X.pl&index=$field_number&result=\"+defaultvalue,\"unimarc 600\",'width=700,height=300,toolbar=false,scrollbars=yes');
-
- }
- </script>
- ";
-
- return ( $function_name, $res );
-}
-
-sub plugin {
- my ($input) = @_;
- my $dbh = C4::Context->dbh;
- my $index = $input->param('index');
- my $result = $input->param('result');
- my $search_string = $input->param('search_string');
- my $op = $input->param('op');
- my $id = $input->param('id');
- my $insert = $input->param('insert');
- my %stdlib;
- my $select_list;
-
- if ( $op eq "add" ) {
- newauthority( $dbh, 'NC', $insert, $insert, '', 1, '' );
- $search_string = $insert;
- }
- if ( $op eq "select" ) {
- my $sti =
- $dbh->prepare("select stdlib from bibliothesaurus where id=?");
- $sti->execute($id);
- my ($freelib_text) = $sti->fetchrow_array;
- $result = $freelib_text;
- }
- my $Rsearch_string = "$search_string%";
- my $authoritysep = C4::Context->preference('authoritysep');
- my @splitted = /$authoritysep/, $search_string;
- my $level = $#splitted + 1;
- my $sti;
- if ($search_string)
- { # if no search pattern, returns only the 50 1st top level values
- $sti =
- $dbh->prepare(
-"select distinct freelib,father,level from bibliothesaurus where category='NC' and freelib like ? order by father,freelib"
- );
- }
- else {
- $sti =
- $dbh->prepare(
-"select distinct freelib,father,level from bibliothesaurus where category='NC' and level=0 and freelib like ? order by father,freelib limit 0,50"
- );
- }
- $sti->execute($Rsearch_string);
- my @results;
- while ( my ( $freelib, $father, $level ) = $sti->fetchrow ) {
- my %line;
- if ($father) {
- $line{value} = "$father $freelib";
- }
- else {
- $line{value} = "$freelib";
- }
- $line{level} = $level + 1;
- $line{father} = $father;
- push @results, \%line;
- }
- my @DeeperResults = SearchDeeper( 'NC', $search_string );
- my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
- {
- template_name => "cataloguing/value_builder/unimarc_field_60X.tmpl",
- query => $input,
- type => "intranet",
- authnotrequired => 0,
- flagsrequired => { editcatalogue => 1 },
- debug => 1,
- }
- );
-
-# builds collection list : search isbn and editor, in parent, then load collections from bibliothesaurus table
- $template->param(
- index => $index,
- result => $result,
- search_string => $search_string ? $search_string : $result,
- results => \@results,
- deeper => \@DeeperResults,
- );
- output_html_with_http_headers $input, $cookie, $template->output;
-}
-
-1;
diff --git a/cataloguing/value_builder/unimarc_field_700_701_702.pl b/cataloguing/value_builder/unimarc_field_700_701_702.pl
deleted file mode 100755
index 01f23c9..0000000
--- a/cataloguing/value_builder/unimarc_field_700_701_702.pl
+++ /dev/null
@@ -1,156 +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 strict;
-use C4::Auth;
-use CGI;
-use C4::Context;
-
-use C4::Search;
-use C4::Output;
-use C4::Authorities;
-
-sub plugin_javascript {
-my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
-my $function_name= $field_number;
-my $res="
-<script>
-function Focus$function_name(subfield_managed) {
-return 1;
-}
-
-function Blur$function_name(subfield_managed) {
- return 1;
-}
-
-function Clic$function_name(index) {
- defaultvalue=document.getElementById(\"$field_number\").value;
- newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_700_701_702.pl&index=$field_number&result=\"+defaultvalue,\"unimarc 700\",'width=700,height=300,toolbar=false,scrollbars=yes');
-
-}
-</script>
-";
-
-return ($function_name,$res);
-}
-sub plugin {
- my ($input) = @_;
- my $dbh = C4::Context->dbh;
-# my $input = new CGI;
- my $index= $input->param('index');
- my $result= $input->param('result');
- my $search_string= $input->param('search_string');
- my $op = $input->param('op');
- my $id = $input->param('id');
- my $insert = $input->param('insert');
- my @freelib;
- my %stdlib;
- my $select_list;
- my ($a,$b,$c,$f) ; # the 4 managed subfields.
- if ($op eq "add") {
- newauthority($dbh,'NP',$insert,$insert,'',1,'');
- $search_string=$insert;
- }
- if ($op eq "select") {
- my $sti = $dbh->prepare("select stdlib from bibliothesaurus where id=?");
- $sti->execute($id);
- my ($freelib_text) = $sti->fetchrow_array;
- $result = $freelib_text;
- # fill the 4 managed subfields
- my @arr = split //,$result;
- my $where = 1;
- foreach my $x (@arr) {
- next if ($x eq ')');
- if ($x eq ',') {
- $where=2;
- next;
- }
- if ($x eq '(') {
- if ($result =~ /.*;.*/) {
- $where=3;
- } else {
- $where=4;
- }
- next;
- }
- if ($x eq ';') {
- $where=4;
- next;
- }
- if ($where eq 1) {
- $a.=$x;
- }
- if ($where eq 2) {
- $b.=$x;
- }
- if ($where eq 3) {
- $c.=$x;
- }
- if ($where eq 4) {
- $f.=$x;
- }
- }
-# remove trailing blanks
- $a=~ s/^\s+//g;
- $b=~ s/^\s+//g;
- $c=~ s/^\s+//g;
- $f=~ s/^\s+//g;
- $a=~ s/\s+$//g;
- $b=~ s/\s+$//g;
- $c=~ s/\s+$//g;
- $f=~ s/^s+$//g;
- }
- if ($search_string) {
- # my $sti=$dbh->prepare("select id,freelib from bibliothesaurus where freelib like '".$search_string."%' and category ='$category'");
- my $sti=$dbh->prepare("select id,freelib from bibliothesaurus where match (category,freelib) AGAINST (?) and category ='NP'");
- $sti->execute($search_string);
- while (my $line=$sti->fetchrow_hashref) {
- $stdlib{$line->{'id'}} = "$line->{'freelib'}";
- push(@freelib,$line->{'id'});
- }
- $select_list= CGI::scrolling_list( -name=>'id',
- -values=> \@freelib,
- -default=> "",
- -size=>1,
- -multiple=>0,
- -labels=> \%stdlib
- );
- }
- my ($template, $loggedinuser, $cookie)
- = get_template_and_user({template_name => "cataloguing/value_builder/unimarc_field_700_701_702.tmpl",
- query => $input,
- type => "intranet",
- authnotrequired => 0,
- flagsrequired => { editcatalogue => 1},
- debug => 1,
- });
-# builds collection list : search isbn and editor, in parent, then load collections from bibliothesaurus table
- $template->param(index => $index,
- result =>$result,
- select_list => $select_list,
- search_string => $search_string?$search_string:$result,
- a => $a,
- b => $b,
- c => $c,
- f => $f,);
- output_html_with_http_headers $input, $cookie, $template->output;
-}
-
-1;
--
1.5.4.3
More information about the Koha-patches
mailing list