Changeset 11881


Ignore:
Timestamp:
2006-05-30T11:11:46+12:00 (18 years ago)
Author:
kjdon
Message:

added a test for image file in case there isn't one, in process_item

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/perllib/plugins/PagedImgPlug.pm

    r11834 r11881  
    856856        # the page number becomes the Title
    857857        $doc_obj->set_utf8_metadata_element($cursection, 'Title', $pagenum);
    858         # process the image for this page
    859         my $result = $self->process_image($dir.$imgname, $imgname, $doc_obj, $cursection, $rotate);
    860        
    861         if (!defined $result)
    862         {
    863         print "PagedImgPlug: couldn't process image \"$dir.$imgname\" for item \"$filename\"\n";
     858        # process the image for this page if there is one
     859        if (defined $imgname && $imgname ne "") {
     860        my $result1 = $self->process_image($dir.$imgname, $imgname, $doc_obj, $cursection, $rotate);
     861       
     862        if (!defined $result1)
     863        {
     864            print "PagedImgPlug: couldn't process image \"$dir.$imgname\" for item \"$filename\"\n";
     865        }
    864866        }
    865        
    866867        # process the text file if one is there
    867868        if (defined $txtname && $txtname ne "") {
    868         $result = undef;
    869         $result = $self->process_text ($dir.$txtname, $txtname, $doc_obj, $cursection);
    870         if (!defined $result) {
     869        my $result2 = $self->process_text ($dir.$txtname, $txtname, $doc_obj, $cursection);
     870        if (!defined $result2) {
    871871            print "PagedImgPlug: couldn't process text file \"$dir.$txtname\" for item \"$filename\"\n";
    872872        }
Note: See TracChangeset for help on using the changeset viewer.