Changeset 21601


Ignore:
Timestamp:
2010-01-25T14:20:45+13:00 (14 years ago)
Author:
davidb
Message:

section level indexing support

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gs3-extensions/pharos-imageis/trunk/perllib/plugins/PharosImageIndexer.pm

    r21342 r21601  
    142142    }
    143143    # pass in the jpg thumbnail, and the doc obj
    144     my ($filename_full_path, $doc_obj) = @_;
     144    my ($filename_full_path, $doc_obj, $docid) = @_;
    145145    print STDERR "pharos indexing $filename_full_path\n";
    146146
    147147    my $collection = &util::get_current_collection_name();
    148     my $id = $doc_obj->get_OID();
    149148
    150     my $cmd = "perl -S pharos-imageis-add.pl $collection $filename_full_path $id 2>&1";
     149    if (!defined $docid) {
     150    $docid = $doc_obj->get_OID();
     151    }
     152
     153    my $cmd = "perl -S pharos-imageis-add.pl $collection $filename_full_path $docid 2>&1";
    151154    print STDERR "Running command $cmd\n";
    152155    my $result = `$cmd`;
     
    155158    my $outhandle = $self->{'outhandle'};
    156159    if ($return_value != 0) {
    157     print $outhandle "Pharos Indexing failed for $filename_full_path, $id\n";
     160    print $outhandle "Pharos Indexing failed for $filename_full_path, $docid\n";
    158161    }
    159162    print $outhandle "$result\n";
Note: See TracChangeset for help on using the changeset viewer.