Changeset 21344


Ignore:
Timestamp:
12/14/09 14:49:27 (11 years ago)
Author:
kjdon
Message:

inheriting plugins can now set store_file_paths, and ImageConverter will store the real file path for thumbnail, screenview and converted original

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/plugins/ImageConverter.pm

    r20540 r21344  
    163163    $self->init_cache_for_file($filename_full_path);
    164164    }
    165 
     165    if ($self->{'store_file_paths'}) {
     166    $self->{'orig_file'} = "";
     167    $self->{'thumb_file'} = "";
     168    $self->{'screen_file'} = "";
     169    }
    166170    my $verbosity = $self->{'verbosity'};
    167171    my $outhandle = $self->{'outhandle'};
     
    201205    $filename_no_path = "$filehead.$type";
    202206    $url_to_filename_no_path = "$url_to_filehead.$type";
     207    if ($self->{'store_file_paths'}) {
     208        $self->{'orig_file'} = $converted_filename_full_path;
     209    }
    203210    }
    204211
     
    279286        $doc_obj->add_metadata ($section, "ThumbHeight", $2);
    280287    }
     288    if ($self->{'store_file_paths'}) {
     289        $self->{'thumb_file'} = $thumbnailfile;
     290    }
     291
    281292    } else {
    282293    my $outhandle = $self->{'outhandle'};
     
    323334        $doc_obj->add_metadata ($section, "ScreenHeight", $2);
    324335    }
     336
     337    if ($self->{'store_file_paths'}) {
     338        $self->{'screen_file'} = $screenviewfilename;
     339    }
     340
    325341    } else {
    326342    my $outhandle = $self->{'outhandle'};
Note: See TracChangeset for help on using the changeset viewer.