koha-cvs
[Top][All Lists]
Advanced

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

[Koha-cvs] koha/value_builder marc21_field_008.pl [dev_week]


From: Joshua Ferraro
Subject: [Koha-cvs] koha/value_builder marc21_field_008.pl [dev_week]
Date: Tue, 11 Jul 2006 17:51:07 +0000

CVSROOT:        /sources/koha
Module name:    koha
Branch:         dev_week
Changes by:     Joshua Ferraro <kados>  06/07/11 17:51:07

Modified files:
        value_builder  : marc21_field_008.pl 

Log message:
        Fix for bug 1106: MARC 21 008 record editor plugin deletes first six 
008 positions

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/value_builder/marc21_field_008.pl?cvsroot=koha&only_with_tag=dev_week&r1=1.1.2.4&r2=1.1.2.4.2.1

Patches:
Index: marc21_field_008.pl
===================================================================
RCS file: /sources/koha/koha/value_builder/Attic/marc21_field_008.pl,v
retrieving revision 1.1.2.4
retrieving revision 1.1.2.4.2.1
diff -u -b -r1.1.2.4 -r1.1.2.4.2.1
--- marc21_field_008.pl 2 Apr 2006 18:33:40 -0000       1.1.2.4
+++ marc21_field_008.pl 11 Jul 2006 17:51:07 -0000      1.1.2.4.2.1
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-# $Id: marc21_field_008.pl,v 1.1.2.4 2006/04/02 18:33:40 kados Exp $
+# $Id: marc21_field_008.pl,v 1.1.2.4.2.1 2006/07/11 17:51:07 kados Exp $
 
 # Copyright 2000-2002 Katipo Communications
 #
@@ -38,14 +38,14 @@
 $year +=1900; $mon +=1;
 my $dateentered = substr($year,2,2).sprintf ("%0.2d", $mon).sprintf 
("%0.2d",$mday);
 sub plugin_parameters {
-my ($dbh,$record,$tagslib,$i,$tabloop) = @_;
-return "";
+       my ($dbh,$record,$tagslib,$i,$tabloop) = @_;
+       return "";
 }
 
 sub plugin_javascript {
-my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
-my $function_name= "100".(int(rand(100000))+1);
-my $res="
+       my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
+       my $function_name= "100".(int(rand(100000))+1);
+       my $res="
 <script>
 function Focus$function_name(subfield_managed) {
     for (i=0 ; i<document.f.field_value.length ; i++) {
@@ -70,10 +70,10 @@
 </script>
 ";
 
-return ($function_name,$res);
+       return ($function_name,$res);
 }
 sub plugin {
-my ($input) = @_;
+       my ($input) = @_;
        my %env;
 
 #      my $input = new CGI;
@@ -83,7 +83,7 @@
 
        my $dbh = C4::Context->dbh;
 
-my ($template, $loggedinuser, $cookie)
+       my ($template, $loggedinuser, $cookie)
     = get_template_and_user({template_name => 
"value_builder/marc21_field_008.tmpl",
                             query => $input,
                             type => "intranet",
@@ -112,8 +112,8 @@
        my $f38 = substr($result,38,1);
        my $f39 = substr($result,39,1);
 
-if (!$f1){
-       $f1=$dateentered
+if ((!$f1) ||($f1 =~ m/ /)){
+       $f1=$dateentered;
 }
 
        $template->param(                               index => $index,




reply via email to

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