koha-cvs
[Top][All Lists]
Advanced

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

[Koha-cvs] koha/C4 Labels.pm [dev_week]


From: Mason James
Subject: [Koha-cvs] koha/C4 Labels.pm [dev_week]
Date: Wed, 18 Jul 2007 00:04:13 +0000

CVSROOT:        /sources/koha
Module name:    koha
Branch:         dev_week
Changes by:     Mason James <sushi>     07/07/18 00:04:13

Modified files:
        C4             : Labels.pm 

Log message:
        fixes classification field display, caused by 'class' column mismatch

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Labels.pm?cvsroot=koha&only_with_tag=dev_week&r1=1.3.4.32&r2=1.3.4.33

Patches:
Index: Labels.pm
===================================================================
RCS file: /sources/koha/koha/C4/Labels.pm,v
retrieving revision 1.3.4.32
retrieving revision 1.3.4.33
diff -u -b -r1.3.4.32 -r1.3.4.33
--- Labels.pm   17 Jul 2007 21:45:13 -0000      1.3.4.32
+++ Labels.pm   18 Jul 2007 00:04:13 -0000      1.3.4.33
@@ -212,7 +212,7 @@
     $d = { code => 'isbn', desc => "ISBN", 
             order => $sortorder->{'isbn'} };
     $e = {
-        code  => 'classification',
+        code  => 'class',
         desc  => "Classification",
         order => $sortorder->{'class'}
     };
@@ -626,7 +626,7 @@
 sub GetItemFields {
     my @fields = qw (
       barcode title
-      dewey isbn issn author classification
+      dewey isbn issn author class
       itemtype subclass itemcallnumber
 
     );
@@ -639,11 +639,15 @@
         $text_wrap_cols, $item, $conf_data )
       = @_;
 
+# hack to fix column name mismatch betwen labels_conf.class, 
+# and bibitems.classification
+  $$item->{'class'} = $$item->{'classification'};
+
     $Text::Wrap::columns   = $text_wrap_cols;
     $Text::Wrap::separator = "\n";
 
     my $str;
-    ##      $item
+###      $item
 
     my $top_text_margin = ( $fontsize + 3 );
     my $line_spacer = ($fontsize);    # number of pixels between text rows.
@@ -667,16 +671,17 @@
     foreach my $field (@fields) {
 
         # testing hack
-#     $$item->{"$field"} = $field . ": " . $$item->{"$field"};
+ #    $$item->{"$field"} = $field . ": " . $$item->{"$field"};
 
         # if the display option for this field is selected in the DB,
         # and the item record has some values for this field, display it.
         if ( $$conf_data->{"$field"} && $$item->{"$field"} ) {
 
-            #            warn "CONF_TYPE = $field";
+            warn "CONF_TYPE = $field";
 
             # get the string
             $str = $$item->{"$field"};
+### $str
 
             # strip out naughty existing nl/cr's
             $str =~ s/\n//g;




reply via email to

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