Changeset 9351


Ignore:
Timestamp:
2005-03-10T11:55:52+13:00 (19 years ago)
Author:
davidb
Message:

Two changes:

  1. Fusing files with the same root filename is meant to be selective based on plugin options, e.g. -in_order_ext pdf,doc,txt however as the code stood, ALL filenames with the same root were merged. Additional book-keeping information added to allow for the more selective version.
  1. Format for start_doclink revised to be more general (needs Or, parent ...)
File:
1 edited

Legend:

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

    r9067 r9351  
    354354    if ((defined $associate_ext) && ($associate_ext ne "")) {
    355355    my @exts = split(/,/,$associate_ext);
    356    
     356
    357357    my %associate_ext_lookup = ();
    358358    foreach my $e (@exts) {
    359         $assoicate_ext_lookup{$e} = 1;
     359        $associate_ext_lookup{$e} = 1;
    360360    }
    361361
     
    486486        }
    487487        else {
    488         $file_prefix_rec->{'exts'}->{$file_ext} = 1;
     488        if (defined $self->{'associate_ext_lookup'}->{$file_ext}) {
     489            $file_prefix_rec->{'exts'}->{$file_ext} = 1;
     490        }
    489491        }
    490492    }
     
    515517    if (defined $file_prefix_rec) {
    516518    my $tie_to = $file_prefix_rec->{'tie_to'};
     519
    517520    if (defined $tie_to) {
    518521        if ($tie_to eq $file_ext) {
     
    555558    my $associate_ext = $self->{'associate_ext'};
    556559
     560
    557561    return 0 if (!$associate_ext);
    558562
     
    564568
    565569    my $file_prefix_rec = $self->{'shared_fileroot'}->{$file_prefix};
    566 
     570   
    567571    if ($self->tie_to_filename($file_ext,$file_prefix_rec)) {
    568572
     
    966970       
    967971        my ($doc_ext) = ($tail_filename =~ m/^.*\.(.*)$/);
    968         my $start_doclink = "<a href=\"_httpcollection_/index/assoc/[archivedir]/$tail_filename\">";
     972        my $start_doclink = "<a href=\"_httpcollection_/index/assoc/{Or}{[parent(Top):archivedir],[archivedir]}/$tail_filename\">";
    969973        my $srcicon = "_icon".$doc_ext."_";
    970974        my $end_doclink = "</a>";
Note: See TracChangeset for help on using the changeset viewer.