Ignore:
Timestamp:
2022-08-16T19:38:05+12:00 (21 months ago)
Author:
kjdon
Message:

tidy up of extrametautil, renaming some methods to make them easier to understand, removing anything unused. then modifying plugins to use new methods. Also, moved some common code to MetadataRead function, can call this from several plugins instead of duplicating code. This is an interim commit, where I have left in the old code to make it easier to track changes. Next commit will have everything tidied up.

File:
1 edited

Legend:

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

    r36297 r36372  
    171171    }
    172172   
     173    if (defined $lom_srcdoc) {
     174    $self->store_meta_in_extrametadata($filename_re, $self->{'saved_metadata'}, $file, $filename_full_path, $extrametakeys, $extrametadata, $extrametafile);
     175    } else {
     176    $self->store_meta_in_extrametadata($filename_for_metadata, $self->{'saved_metadata'}, undef, undef, $extrametakeys, $extrametadata, $extrametafile);
     177    }
     178    $self->{'lom_srcdoc'} = undef; # reset for next file to be processed
    173179    # Indexing into the extrameta data structures requires the filename's style of slashes to be in URL format
    174180    # Then need to convert the filename to a regex, no longer to protect windows directory chars \, but for
    175181    # protecting special characters like brackets in the filepath such as "C:\Program Files (x86)\Greenstone".
     182    if (0) {
    176183    $file_re = &util::filepath_to_url_format($file_re);
    177184    $file_re = &util::filename_to_regex($file_re);
     
    188195    &extrametautil::setmetafile_for_named_file($extrametafile, $file_re, $file, $filename_full_path);
    189196    }
    190    
     197    }
    191198    return 1;
    192199}
Note: See TracChangeset for help on using the changeset viewer.